import { DEFAULT_THEMES, DIFFS_TAG_NAME, HEADER_METADATA_SLOT_ID, UNSAFE_CSS_ATTRIBUTE } from "../constants.js";
import { LineSelectionManager, pluckLineSelectionOptions } from "../managers/LineSelectionManager.js";
import { MouseEventManager, pluckMouseEventOptions } from "../managers/MouseEventManager.js";
import { ResizeManager } from "../managers/ResizeManager.js";
import { areRenderRangesEqual } from "../utils/areRenderRangesEqual.js";
import { getLineAnnotationName } from "../utils/getLineAnnotationName.js";
import { FileRenderer } from "../renderers/FileRenderer.js";
import { SVGSpriteSheet } from "../sprite.js";
import { areFilesEqual } from "../utils/areFilesEqual.js";
import { areLineAnnotationsEqual } from "../utils/areLineAnnotationsEqual.js";
import { arePrePropertiesEqual } from "../utils/arePrePropertiesEqual.js";
import { createAnnotationWrapperNode } from "../utils/createAnnotationWrapperNode.js";
import { createHoverContentNode } from "../utils/createHoverContentNode.js";
import { createUnsafeCSSStyleNode } from "../utils/createUnsafeCSSStyleNode.js";
import { wrapUnsafeCSS } from "../utils/cssWrappers.js";
import { getOrCreateCodeNode } from "../utils/getOrCreateCodeNode.js";
import { prerenderHTMLIfNecessary } from "../utils/prerenderHTMLIfNecessary.js";
import { setPreNodeProperties } from "../utils/setWrapperNodeProps.js";
import { DiffsContainerLoaded } from "./web-components.js";
import { toHtml } from "hast-util-to-html";

//#region src/components/File.ts
const EMPTY_STRINGS = [];
let instanceId = -1;
var File = class {
	static LoadedCustomComponent = DiffsContainerLoaded;
	__id = `file:${++instanceId}`;
	fileContainer;
	spriteSVG;
	pre;
	code;
	bufferBefore;
	bufferAfter;
	unsafeCSSStyle;
	hoverContent;
	errorWrapper;
	placeHolder;
	lastRenderedHeaderHTML;
	appliedPreAttributes;
	lastRowCount;
	headerElement;
	headerMetadata;
	fileRenderer;
	resizeManager;
	mouseEventManager;
	lineSelectionManager;
	annotationCache = /* @__PURE__ */ new Map();
	lineAnnotations = [];
	file;
	renderRange;
	constructor(options = { theme: DEFAULT_THEMES }, workerManager, isContainerManaged = false) {
		this.options = options;
		this.workerManager = workerManager;
		this.isContainerManaged = isContainerManaged;
		this.fileRenderer = new FileRenderer(options, this.handleHighlightRender, this.workerManager);
		this.resizeManager = new ResizeManager();
		this.mouseEventManager = new MouseEventManager("file", pluckMouseEventOptions(options));
		this.lineSelectionManager = new LineSelectionManager(pluckLineSelectionOptions(options));
		this.workerManager?.subscribeToThemeChanges(this);
	}
	handleHighlightRender = () => {
		this.rerender();
	};
	rerender() {
		if (this.file == null) return;
		this.render({
			file: this.file,
			forceRender: true,
			renderRange: this.renderRange
		});
	}
	setOptions(options) {
		if (options == null) return;
		this.options = options;
		this.mouseEventManager.setOptions(pluckMouseEventOptions(options));
		this.lineSelectionManager.setOptions(pluckLineSelectionOptions(options));
	}
	mergeOptions(options) {
		this.options = {
			...this.options,
			...options
		};
	}
	setThemeType(themeType) {
		if ((this.options.themeType ?? "system") === themeType) return;
		this.mergeOptions({ themeType });
		this.fileRenderer.setThemeType(themeType);
		if (this.headerElement != null) if (themeType === "system") delete this.headerElement.dataset.themeType;
		else this.headerElement.dataset.themeType = themeType;
		if (this.pre != null) switch (themeType) {
			case "system":
				delete this.pre.dataset.themeType;
				break;
			case "light":
			case "dark":
				this.pre.dataset.themeType = themeType;
				break;
		}
	}
	getHoveredLine = () => {
		return this.mouseEventManager.getHoveredLine();
	};
	setLineAnnotations(lineAnnotations) {
		this.lineAnnotations = lineAnnotations;
	}
	setSelectedLines(range) {
		this.lineSelectionManager.setSelection(range);
	}
	cleanUp() {
		this.fileRenderer.cleanUp();
		this.resizeManager.cleanUp();
		this.mouseEventManager.cleanUp();
		this.lineSelectionManager.cleanUp();
		this.workerManager?.unsubscribeToThemeChanges(this);
		this.workerManager = void 0;
		this.renderRange = void 0;
		this.file = void 0;
		if (!this.isContainerManaged) this.fileContainer?.parentNode?.removeChild(this.fileContainer);
		if (this.fileContainer?.shadowRoot != null) this.fileContainer.shadowRoot.innerHTML = "";
		this.fileContainer = void 0;
		this.pre = void 0;
		this.bufferBefore = void 0;
		this.bufferAfter = void 0;
		this.appliedPreAttributes = void 0;
		this.lastRowCount = void 0;
		this.headerElement = void 0;
		this.lastRenderedHeaderHTML = void 0;
		this.errorWrapper = void 0;
		this.unsafeCSSStyle = void 0;
		this.placeHolder = void 0;
	}
	hydrate(props) {
		const { fileContainer, prerenderedHTML } = props;
		prerenderHTMLIfNecessary(fileContainer, prerenderedHTML);
		for (const element of Array.from(fileContainer.shadowRoot?.children ?? [])) {
			if (element instanceof SVGElement) {
				this.spriteSVG = element;
				continue;
			}
			if (!(element instanceof HTMLElement)) continue;
			if (element instanceof HTMLPreElement) {
				this.pre = element;
				this.appliedPreAttributes = void 0;
				continue;
			}
			if (element instanceof HTMLStyleElement && element.hasAttribute(UNSAFE_CSS_ATTRIBUTE)) {
				this.unsafeCSSStyle = element;
				continue;
			}
			if ("diffsHeader" in element.dataset) {
				this.headerElement = element;
				this.lastRenderedHeaderHTML = void 0;
				continue;
			}
		}
		if (this.pre == null) this.render(props);
		else {
			const { file, lineAnnotations } = props;
			const { overflow = "scroll" } = this.options;
			this.fileContainer = fileContainer;
			delete this.pre.dataset.dehydrated;
			this.lineAnnotations = lineAnnotations ?? this.lineAnnotations;
			this.file = file;
			this.fileRenderer.hydrate(file);
			this.renderAnnotations();
			this.renderHoverUtility();
			this.injectUnsafeCSS();
			this.mouseEventManager.setup(this.pre);
			this.lineSelectionManager.setup(this.pre);
			this.resizeManager.setup(this.pre, overflow === "wrap");
		}
	}
	getOrCreateLineCache(file = this.file) {
		return file != null ? this.fileRenderer.getOrCreateLineCache(file) : EMPTY_STRINGS;
	}
	render({ file, fileContainer, forceRender = false, containerWrapper, lineAnnotations, renderRange }) {
		const previousRenderRange = this.renderRange;
		const annotationsChanged = lineAnnotations != null && (lineAnnotations.length > 0 || this.lineAnnotations.length > 0) ? lineAnnotations !== this.lineAnnotations : false;
		const didFileChange = !areFilesEqual(this.file, file);
		if (!forceRender && areRenderRangesEqual(renderRange, this.renderRange) && !didFileChange && !annotationsChanged) return false;
		this.renderRange = renderRange;
		this.file = file;
		this.fileRenderer.setOptions(this.options);
		if (lineAnnotations != null) this.setLineAnnotations(lineAnnotations);
		this.fileRenderer.setLineAnnotations(this.lineAnnotations);
		const { disableErrorHandling = false, disableFileHeader = false, overflow = "scroll" } = this.options;
		if (disableFileHeader) {
			if (this.headerElement != null) {
				this.headerElement.parentNode?.removeChild(this.headerElement);
				this.headerElement = void 0;
				this.lastRenderedHeaderHTML = void 0;
			}
		}
		fileContainer = this.getOrCreateFileContainerNode(fileContainer, containerWrapper);
		try {
			const pre = this.getOrCreatePreNode(fileContainer);
			if (!this.canPartiallyRender(forceRender, annotationsChanged, didFileChange) || !this.applyPartialRender(previousRenderRange, renderRange)) {
				const fileResult = this.fileRenderer.renderFile(file, renderRange);
				if (fileResult == null) {
					if (this.workerManager?.isInitialized() === false) this.workerManager.initialize().then(() => this.rerender());
					return false;
				}
				if (fileResult.headerAST != null) this.applyHeaderToDOM(fileResult.headerAST, fileContainer);
				this.applyFullRender(fileResult, pre);
			}
			this.applyBuffers(pre, renderRange);
			this.injectUnsafeCSS();
			this.mouseEventManager.setup(pre);
			this.lineSelectionManager.setup(pre);
			this.resizeManager.setup(pre, overflow === "wrap");
			this.renderAnnotations();
			this.renderHoverUtility();
		} catch (error) {
			if (disableErrorHandling) throw error;
			console.error(error);
			if (error instanceof Error) this.applyErrorToDOM(error, fileContainer);
		}
		return true;
	}
	canPartiallyRender(forceRender, annotationsChanged, didContentChange) {
		if (forceRender || annotationsChanged || didContentChange) return false;
		return true;
	}
	renderPlaceholder(height) {
		if (this.fileContainer == null) return false;
		this.cleanChildNodes();
		if (this.placeHolder == null) {
			const shadowRoot = this.fileContainer.shadowRoot ?? this.fileContainer.attachShadow({ mode: "open" });
			this.placeHolder = document.createElement("div");
			this.placeHolder.dataset.placeholder = "";
			shadowRoot.appendChild(this.placeHolder);
		}
		this.placeHolder.style.setProperty("height", `${height}px`);
		return true;
	}
	cleanChildNodes() {
		this.resizeManager.cleanUp();
		this.mouseEventManager.cleanUp();
		this.lineSelectionManager.cleanUp();
		this.bufferAfter?.remove();
		this.bufferBefore?.remove();
		this.code?.remove();
		this.errorWrapper?.remove();
		this.headerElement?.remove();
		this.hoverContent?.remove();
		this.pre?.remove();
		this.spriteSVG?.remove();
		this.unsafeCSSStyle?.remove();
		this.bufferAfter = void 0;
		this.bufferBefore = void 0;
		this.code = void 0;
		this.errorWrapper = void 0;
		this.headerElement = void 0;
		this.hoverContent = void 0;
		this.pre = void 0;
		this.spriteSVG = void 0;
		this.unsafeCSSStyle = void 0;
		this.lastRenderedHeaderHTML = void 0;
		this.lastRowCount = void 0;
	}
	renderAnnotations() {
		if (this.isContainerManaged || this.fileContainer == null) {
			for (const { element } of this.annotationCache.values()) element.parentNode?.removeChild(element);
			this.annotationCache.clear();
			return;
		}
		const staleAnnotations = new Map(this.annotationCache);
		const { renderAnnotation } = this.options;
		if (renderAnnotation != null && this.lineAnnotations.length > 0) for (const [index, annotation] of this.lineAnnotations.entries()) {
			const id = `${index}-${getLineAnnotationName(annotation)}`;
			let cache = this.annotationCache.get(id);
			if (cache == null || !areLineAnnotationsEqual(annotation, cache.annotation)) {
				cache?.element.parentElement?.removeChild(cache.element);
				const content = renderAnnotation(annotation);
				if (content == null) continue;
				cache = {
					element: createAnnotationWrapperNode(getLineAnnotationName(annotation)),
					annotation
				};
				cache.element.appendChild(content);
				this.fileContainer.appendChild(cache.element);
				this.annotationCache.set(id, cache);
			}
			staleAnnotations.delete(id);
		}
		for (const [id, { element }] of staleAnnotations.entries()) {
			this.annotationCache.delete(id);
			element.parentNode?.removeChild(element);
		}
	}
	renderHoverUtility() {
		const { renderHoverUtility } = this.options;
		if (this.fileContainer == null || renderHoverUtility == null) return;
		const element = renderHoverUtility(this.mouseEventManager.getHoveredLine);
		if (element != null && this.hoverContent != null) return;
		else if (element == null) {
			this.hoverContent?.parentNode?.removeChild(this.hoverContent);
			this.hoverContent = void 0;
			return;
		}
		this.hoverContent = createHoverContentNode();
		this.hoverContent.appendChild(element);
		this.fileContainer.appendChild(this.hoverContent);
	}
	injectUnsafeCSS() {
		if (this.fileContainer?.shadowRoot == null) return;
		const { unsafeCSS } = this.options;
		if (unsafeCSS == null || unsafeCSS === "") {
			if (this.unsafeCSSStyle != null) {
				this.unsafeCSSStyle.parentNode?.removeChild(this.unsafeCSSStyle);
				this.unsafeCSSStyle = void 0;
			}
			return;
		}
		if (this.unsafeCSSStyle == null) {
			this.unsafeCSSStyle = createUnsafeCSSStyleNode();
			this.fileContainer.shadowRoot.appendChild(this.unsafeCSSStyle);
		}
		this.unsafeCSSStyle.innerText = wrapUnsafeCSS(unsafeCSS);
	}
	applyFullRender(result, pre) {
		this.cleanupErrorWrapper();
		this.applyPreNodeAttributes(pre, result);
		this.code = getOrCreateCodeNode({ code: this.code });
		this.code.innerHTML = this.fileRenderer.renderPartialHTML(this.fileRenderer.renderCodeAST(result));
		pre.replaceChildren(this.code);
		this.lastRowCount = result.rowCount;
	}
	applyPartialRender(previousRenderRange, renderRange) {
		if (previousRenderRange == null || renderRange == null) return false;
		const { file, code } = this;
		const columns = code != null ? this.getColumns(code) : void 0;
		if (file == null || code == null || columns == null) return false;
		const previousStart = previousRenderRange.startingLine;
		const nextStart = renderRange.startingLine;
		const previousEnd = previousRenderRange.totalLines === Infinity ? Number.POSITIVE_INFINITY : previousStart + previousRenderRange.totalLines;
		const nextEnd = renderRange.totalLines === Infinity ? Number.POSITIVE_INFINITY : nextStart + renderRange.totalLines;
		const overlapStart = Math.max(previousStart, nextStart);
		const overlapEnd = Math.min(previousEnd, nextEnd);
		if (overlapEnd <= overlapStart) return false;
		if (!this.trimDOMToOverlap(columns.gutter, overlapStart, overlapEnd) || !this.trimDOMToOverlap(columns.content, overlapStart, overlapEnd)) return false;
		let { length: rowCount } = columns.content.children;
		const renderChunk = (startingLine, totalLines) => {
			if (totalLines <= 0) return;
			return this.fileRenderer.renderFile(file, {
				startingLine,
				totalLines,
				bufferBefore: 0,
				bufferAfter: 0
			});
		};
		const prependResult = nextStart < overlapStart ? renderChunk(nextStart, overlapStart - nextStart) : void 0;
		if (prependResult === void 0 && nextStart < overlapStart) return false;
		const appendTotalLines = nextEnd === Number.POSITIVE_INFINITY ? Number.POSITIVE_INFINITY : Math.max(0, nextEnd - overlapEnd);
		const appendResult = nextEnd > overlapEnd ? renderChunk(overlapEnd, appendTotalLines) : void 0;
		if (appendResult === void 0 && nextEnd > overlapEnd) return false;
		this.cleanupErrorWrapper();
		if (prependResult != null) {
			columns.gutter.insertAdjacentHTML("afterbegin", this.fileRenderer.renderPartialHTML(prependResult.gutterAST));
			columns.content.insertAdjacentHTML("afterbegin", this.fileRenderer.renderPartialHTML(prependResult.contentAST));
			rowCount += prependResult.rowCount;
		}
		if (appendResult != null) {
			columns.gutter.insertAdjacentHTML("beforeend", this.fileRenderer.renderPartialHTML(appendResult.gutterAST));
			columns.content.insertAdjacentHTML("beforeend", this.fileRenderer.renderPartialHTML(appendResult.contentAST));
			rowCount += appendResult.rowCount;
		}
		if (this.lastRowCount !== rowCount) {
			columns.gutter.style.setProperty("grid-row", `span ${rowCount}`);
			columns.content.style.setProperty("grid-row", `span ${rowCount}`);
			this.lastRowCount = rowCount;
		}
		return true;
	}
	getColumns(code) {
		const gutter = code.children[0];
		const content = code.children[1];
		if (!(gutter instanceof HTMLElement) || !(content instanceof HTMLElement) || gutter.dataset.gutter == null || content.dataset.content == null) return;
		return {
			gutter,
			content
		};
	}
	trimDOMToOverlap(container, overlapStart, overlapEnd) {
		const boundaryIndices = this.getDOMBoundaryIndices(container, [overlapStart, overlapEnd]);
		const startIndex = boundaryIndices.get(overlapStart) ?? container.children.length;
		const endIndex = boundaryIndices.get(overlapEnd) ?? container.children.length;
		if (startIndex > endIndex) return false;
		for (let i = container.children.length - 1; i >= endIndex; i -= 1) container.children[i]?.remove();
		for (let i = startIndex - 1; i >= 0; i -= 1) container.children[i]?.remove();
		return true;
	}
	getDOMBoundaryIndices(container, boundaries) {
		const sortedBoundaries = [...new Set(boundaries)].sort((a, b) => a - b);
		const boundaryIndices = /* @__PURE__ */ new Map();
		if (sortedBoundaries.length === 0) return boundaryIndices;
		let boundaryIndex = 0;
		let nextBoundary = sortedBoundaries[boundaryIndex];
		const { children } = container;
		for (let i = 0; i < children.length; i += 1) {
			const child = children[i];
			if (!(child instanceof HTMLElement)) continue;
			const lineIndex = this.getLineIndexFromDOMNode(child);
			if (lineIndex == null) continue;
			while (nextBoundary != null && lineIndex >= nextBoundary) {
				boundaryIndices.set(nextBoundary, i);
				boundaryIndex += 1;
				nextBoundary = sortedBoundaries[boundaryIndex];
			}
			if (boundaryIndex >= sortedBoundaries.length) break;
		}
		for (const boundary of sortedBoundaries) if (!boundaryIndices.has(boundary)) boundaryIndices.set(boundary, children.length);
		return boundaryIndices;
	}
	getLineIndexFromDOMNode(node) {
		const lineIndexAttr = node.dataset.lineIndex;
		if (lineIndexAttr == null) return;
		const parsed = Number(lineIndexAttr);
		return Number.isNaN(parsed) ? void 0 : parsed;
	}
	applyBuffers(pre, renderRange) {
		const { disableVirtualizationBuffers = false } = this.options;
		if (disableVirtualizationBuffers || renderRange == null) {
			if (this.bufferBefore != null) {
				this.bufferBefore.parentNode?.removeChild(this.bufferBefore);
				this.bufferBefore = void 0;
			}
			if (this.bufferAfter != null) {
				this.bufferAfter.parentNode?.removeChild(this.bufferAfter);
				this.bufferAfter = void 0;
			}
			return;
		}
		if (renderRange.bufferBefore > 0) {
			if (this.bufferBefore == null) {
				this.bufferBefore = document.createElement("div");
				this.bufferBefore.dataset.virtualizerBuffer = "before";
				pre.before(this.bufferBefore);
			}
			this.bufferBefore.style.setProperty("height", `${renderRange.bufferBefore}px`);
			this.bufferBefore.style.setProperty("contain", "strict");
		} else if (this.bufferBefore != null) {
			this.bufferBefore.parentNode?.removeChild(this.bufferBefore);
			this.bufferBefore = void 0;
		}
		if (renderRange.bufferAfter > 0) {
			if (this.bufferAfter == null) {
				this.bufferAfter = document.createElement("div");
				this.bufferAfter.dataset.virtualizerBuffer = "after";
				pre.after(this.bufferAfter);
			}
			this.bufferAfter.style.setProperty("height", `${renderRange.bufferAfter}px`);
			this.bufferAfter.style.setProperty("contain", "strict");
		} else if (this.bufferAfter != null) {
			this.bufferAfter.parentNode?.removeChild(this.bufferAfter);
			this.bufferAfter = void 0;
		}
	}
	applyHeaderToDOM(headerAST, container) {
		const { file } = this;
		if (file == null) return;
		this.cleanupErrorWrapper();
		this.placeHolder?.remove();
		this.placeHolder = void 0;
		const headerHTML = toHtml(headerAST);
		if (headerHTML !== this.lastRenderedHeaderHTML) {
			const tempDiv = document.createElement("div");
			tempDiv.innerHTML = headerHTML;
			const newHeader = tempDiv.firstElementChild;
			if (!(newHeader instanceof HTMLElement)) return;
			if (this.headerElement != null) container.shadowRoot?.replaceChild(newHeader, this.headerElement);
			else container.shadowRoot?.prepend(newHeader);
			this.headerElement = newHeader;
			this.lastRenderedHeaderHTML = headerHTML;
		}
		if (this.isContainerManaged) return;
		const { renderCustomMetadata } = this.options;
		if (this.headerMetadata != null) this.headerMetadata.parentNode?.removeChild(this.headerMetadata);
		const content = renderCustomMetadata?.(file) ?? void 0;
		if (content != null) {
			this.headerMetadata = document.createElement("div");
			this.headerMetadata.slot = HEADER_METADATA_SLOT_ID;
			if (content instanceof Element) this.headerMetadata.appendChild(content);
			else this.headerMetadata.innerText = `${content}`;
			container.appendChild(this.headerMetadata);
		}
	}
	getOrCreateFileContainerNode(fileContainer, parentNode) {
		const previousContainer = this.fileContainer;
		this.fileContainer = fileContainer ?? this.fileContainer ?? document.createElement(DIFFS_TAG_NAME);
		if (previousContainer != null && previousContainer !== this.fileContainer) {
			this.lastRenderedHeaderHTML = void 0;
			this.headerElement = void 0;
		}
		if (parentNode != null && this.fileContainer.parentNode !== parentNode) parentNode.appendChild(this.fileContainer);
		if (this.spriteSVG == null) {
			const fragment = document.createElement("div");
			fragment.innerHTML = SVGSpriteSheet;
			const firstChild = fragment.firstChild;
			if (firstChild instanceof SVGElement) {
				this.spriteSVG = firstChild;
				this.fileContainer.shadowRoot?.appendChild(this.spriteSVG);
			}
		}
		return this.fileContainer;
	}
	getOrCreatePreNode(container) {
		const shadowRoot = container.shadowRoot ?? container.attachShadow({ mode: "open" });
		if (this.pre == null) {
			this.pre = document.createElement("pre");
			this.appliedPreAttributes = void 0;
			this.code = void 0;
			shadowRoot.appendChild(this.pre);
		} else if (this.pre.parentNode !== shadowRoot) {
			container.shadowRoot?.appendChild(this.pre);
			this.appliedPreAttributes = void 0;
		}
		this.placeHolder?.remove();
		this.placeHolder = void 0;
		return this.pre;
	}
	applyPreNodeAttributes(pre, { totalLines, themeStyles, baseThemeType }) {
		const { overflow = "scroll", themeType = "system", disableLineNumbers = false } = this.options;
		const preProperties = {
			type: "file",
			split: false,
			themeStyles,
			overflow,
			disableLineNumbers,
			themeType: baseThemeType ?? themeType,
			diffIndicators: "none",
			disableBackground: true,
			totalLines
		};
		if (arePrePropertiesEqual(preProperties, this.appliedPreAttributes)) return;
		setPreNodeProperties(pre, preProperties);
		this.appliedPreAttributes = preProperties;
	}
	applyErrorToDOM(error, container) {
		this.cleanupErrorWrapper();
		const pre = this.getOrCreatePreNode(container);
		pre.innerHTML = "";
		pre.parentNode?.removeChild(pre);
		this.pre = void 0;
		this.appliedPreAttributes = void 0;
		const shadowRoot = container.shadowRoot ?? container.attachShadow({ mode: "open" });
		this.errorWrapper ??= document.createElement("div");
		this.errorWrapper.dataset.errorWrapper = "";
		this.errorWrapper.innerHTML = "";
		shadowRoot.appendChild(this.errorWrapper);
		const errorMessage = document.createElement("div");
		errorMessage.dataset.errorMessage = "";
		errorMessage.innerText = error.message;
		this.errorWrapper.appendChild(errorMessage);
		const errorStack = document.createElement("pre");
		errorStack.dataset.errorStack = "";
		errorStack.innerText = error.stack ?? "No Error Stack";
		this.errorWrapper.appendChild(errorStack);
	}
	cleanupErrorWrapper() {
		this.errorWrapper?.parentNode?.removeChild(this.errorWrapper);
		this.errorWrapper = void 0;
	}
};

//#endregion
export { File };
//# sourceMappingURL=File.js.map