//#region rolldown:runtime var __create = Object.create; var __defProp$2 = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res); var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports); var __export = (all, symbols$1) => { let target = {}; for (var name in all) { __defProp$2(target, name, { get: all[name], enumerable: true }); } if (symbols$1) { __defProp$2(target, Symbol.toStringTag, { value: "Module" }); } return target; }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (var keys$1 = __getOwnPropNames(from), i$7 = 0, n$9 = keys$1.length, key; i$7 < n$9; i$7++) { key = keys$1[i$7]; if (!__hasOwnProp.call(to, key) && key !== except) { __defProp$2(to, key, { get: ((k$2) => from[k$2]).bind(null, key), enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } } } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp$2(target, "default", { value: mod, enumerable: true }) : target, mod)); var __require = /* @__PURE__ */ ((x$2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x$2, { get: (a$2, b$3) => (typeof require !== "undefined" ? require : a$2)[b$3] }) : x$2)(function(x$2) { if (typeof require !== "undefined") return require.apply(this, arguments); throw Error("Calling `require` for \"" + x$2 + "\" in an environment that doesn't expose the `require` function."); }); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/pi-ai-stub.js var pi_ai_stub_exports = /* @__PURE__ */ __export({ AssistantMessageEventStream: () => AssistantMessageEventStream, StringEnum: () => StringEnum, agentLoop: () => agentLoop, complete: () => complete, getModel: () => getModel, getModels: () => getModels, getProviders: () => getProviders, parseStreamingJson: () => parseStreamingJson }); function getModel(provider, id) { return { ...DEFAULT_MODEL, provider, id, name: id }; } function getModels() { return [DEFAULT_MODEL]; } function getProviders() { return [{ id: DEFAULT_MODEL.provider, name: "Anthropic", models: getModels() }]; } async function complete() { return { text: "" }; } function agentLoop() { throw new Error("agentLoop is not available in embedded web chat"); } function parseStreamingJson() { return null; } var DEFAULT_MODEL, AssistantMessageEventStream, StringEnum; var init_pi_ai_stub = __esmMin((() => { DEFAULT_MODEL = { provider: "anthropic", id: "claude-opus-4-5", name: "Claude 3.5 Sonnet", api: "anthropic-messages", input: ["text"], output: ["text"], maxTokens: 2e5, reasoning: true, headers: undefined, baseUrl: undefined }; AssistantMessageEventStream = class { push() {} end() {} }; StringEnum = (values, options = {}) => ({ enum: [...values], description: options.description }); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/agent/agent.js var agent_exports = /* @__PURE__ */ __export({ Agent: () => Agent }); function defaultMessageTransformer(messages) { return messages.filter((m$3) => { return m$3.role === "user" || m$3.role === "assistant" || m$3.role === "toolResult"; }).map((m$3) => { if (m$3.role === "user") { const { attachments, ...rest } = m$3; return rest; } return m$3; }); } var Agent; var init_agent = __esmMin((() => { init_pi_ai_stub(); Agent = class { constructor(opts) { this._state = { systemPrompt: "", model: getModel("google", "gemini-2.5-flash-lite-preview-06-17"), thinkingLevel: "off", tools: [], messages: [], isStreaming: false, streamMessage: null, pendingToolCalls: new Set(), error: undefined }; this.listeners = new Set(); this.messageQueue = []; this._state = { ...this._state, ...opts.initialState }; this.debugListener = opts.debugListener; this.transport = opts.transport; this.messageTransformer = opts.messageTransformer || defaultMessageTransformer; } get state() { return this._state; } subscribe(fn) { this.listeners.add(fn); fn({ type: "state-update", state: this._state }); return () => this.listeners.delete(fn); } setSystemPrompt(v$3) { this.patch({ systemPrompt: v$3 }); } setModel(m$3) { this.patch({ model: m$3 }); } setThinkingLevel(l$3) { this.patch({ thinkingLevel: l$3 }); } setTools(t$6) { this.patch({ tools: t$6 }); } replaceMessages(ms) { this.patch({ messages: ms.slice() }); } appendMessage(m$3) { this.patch({ messages: [...this._state.messages, m$3] }); } async queueMessage(m$3) { const transformed = await this.messageTransformer([m$3]); this.messageQueue.push({ original: m$3, llm: transformed[0] }); } clearMessages() { this.patch({ messages: [] }); } abort() { this.abortController?.abort(); } logState(message) { const { systemPrompt, model, messages } = this._state; console.log(message, { systemPrompt, model, messages }); } async prompt(input, attachments, opts) { const model = this._state.model; if (!model) { this.emit({ type: "error-no-model" }); return; } const content = [{ type: "text", text: input }]; if (attachments?.length) { for (const a$2 of attachments) { if (a$2.type === "image") { content.push({ type: "image", data: a$2.content, mimeType: a$2.mimeType }); } else if (a$2.type === "document" && a$2.extractedText) { content.push({ type: "text", text: `\n\n[Document: ${a$2.fileName}]\n${a$2.extractedText}`, isDocument: true }); } } } const userMessage = { role: "user", content, attachments: attachments?.length ? attachments : undefined, timestamp: Date.now() }; this.abortController = new AbortController(); this.patch({ isStreaming: true, streamMessage: null, error: undefined }); this.emit({ type: "started" }); const thinkingLevel = opts?.thinkingOverride ?? this._state.thinkingLevel ?? "off"; const reasoning = thinkingLevel === "off" ? undefined : thinkingLevel === "minimal" ? "low" : thinkingLevel; const shouldSendOverride = opts?.transient === true; const cfg = { systemPrompt: this._state.systemPrompt, tools: this._state.tools, model, reasoning, thinkingOverride: shouldSendOverride ? thinkingLevel : undefined, thinkingOnce: shouldSendOverride ? thinkingLevel : undefined, getQueuedMessages: async () => { const queued = this.messageQueue.slice(); this.messageQueue = []; return queued; } }; try { let partial = null; let turnDebug = null; let turnStart = 0; this.logState("prompt started, current state:"); const llmMessages = await this.messageTransformer(this._state.messages); console.log("transformed messages:", llmMessages); for await (const ev of this.transport.run(llmMessages, userMessage, cfg, this.abortController.signal)) { switch (ev.type) { case "turn_start": { turnStart = performance.now(); const ctx = { systemPrompt: this._state.systemPrompt, messages: [...llmMessages], tools: this._state.tools }; turnDebug = { timestamp: new Date().toISOString(), request: { provider: cfg.model.provider, model: cfg.model.id, context: { ...ctx } }, sseEvents: [] }; break; } case "message_start": case "message_update": { partial = ev.message; if (ev.type === "message_update" && ev.assistantMessageEvent && turnDebug) { const copy = { ...ev.assistantMessageEvent }; if (copy && "partial" in copy) delete copy.partial; turnDebug.sseEvents.push(JSON.stringify(copy)); if (!turnDebug.ttft) turnDebug.ttft = performance.now() - turnStart; } this.patch({ streamMessage: ev.message }); break; } case "message_end": { partial = null; this.appendMessage(ev.message); this.patch({ streamMessage: null }); if (turnDebug) { if (ev.message.role !== "assistant" && ev.message.role !== "toolResult") { turnDebug.request.context.messages.push(ev.message); } if (ev.message.role === "assistant") turnDebug.response = ev.message; } break; } case "tool_execution_start": { const s$5 = new Set(this._state.pendingToolCalls); s$5.add(ev.toolCallId); this.patch({ pendingToolCalls: s$5 }); break; } case "tool_execution_end": { const s$5 = new Set(this._state.pendingToolCalls); s$5.delete(ev.toolCallId); this.patch({ pendingToolCalls: s$5 }); break; } case "turn_end": { if (turnDebug) { turnDebug.totalTime = performance.now() - turnStart; this.debugListener?.(turnDebug); turnDebug = null; } break; } case "agent_end": { this.patch({ streamMessage: null }); break; } } } if (partial && partial.role === "assistant" && partial.content.length > 0) { const onlyEmpty = !partial.content.some((c$7) => c$7.type === "thinking" && c$7.thinking.trim().length > 0 || c$7.type === "text" && c$7.text.trim().length > 0 || c$7.type === "toolCall" && c$7.name.trim().length > 0); if (!onlyEmpty) { this.appendMessage(partial); } else { if (this.abortController?.signal.aborted) { throw new Error("Request was aborted"); } } } } catch (err) { if (String(err?.message || err) === "no-api-key") { this.emit({ type: "error-no-api-key", provider: model.provider }); } else { const msg = { role: "assistant", content: [{ type: "text", text: "" }], api: model.api, provider: model.provider, model: model.id, usage: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 } }, stopReason: this.abortController?.signal.aborted ? "aborted" : "error", errorMessage: err?.message || String(err), timestamp: Date.now() }; this.appendMessage(msg); this.patch({ error: err?.message || String(err) }); } } finally { this.patch({ isStreaming: false, streamMessage: null, pendingToolCalls: new Set() }); this.abortController = undefined; this.emit({ type: "completed" }); } this.logState("final state:"); } patch(p$3) { this._state = { ...this._state, ...p$3 }; this.emit({ type: "state-update", state: this._state }); } emit(e$10) { for (const listener of this.listeners) { listener(e$10); } } }; })); //#endregion //#region node_modules/@lit/reactive-element/css-tag.js var t$5, e$8, s$4, o$9, n$7, r$8, i$5, S$3, c$5; var init_css_tag = __esmMin((() => { t$5 = globalThis, e$8 = t$5.ShadowRoot && (void 0 === t$5.ShadyCSS || t$5.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$4 = Symbol(), o$9 = new WeakMap(); n$7 = class { constructor(t$6, e$10, o$10) { if (this._$cssResult$ = !0, o$10 !== s$4) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); this.cssText = t$6, this.t = e$10; } get styleSheet() { let t$6 = this.o; const s$5 = this.t; if (e$8 && void 0 === t$6) { const e$10 = void 0 !== s$5 && 1 === s$5.length; e$10 && (t$6 = o$9.get(s$5)), void 0 === t$6 && ((this.o = t$6 = new CSSStyleSheet()).replaceSync(this.cssText), e$10 && o$9.set(s$5, t$6)); } return t$6; } toString() { return this.cssText; } }; r$8 = (t$6) => new n$7("string" == typeof t$6 ? t$6 : t$6 + "", void 0, s$4), i$5 = (t$6, ...e$10) => { const o$10 = 1 === t$6.length ? t$6[0] : e$10.reduce(((e$11, s$5, o$11) => e$11 + ((t$7) => { if (!0 === t$7._$cssResult$) return t$7.cssText; if ("number" == typeof t$7) return t$7; throw Error("Value passed to 'css' function must be a 'css' function result: " + t$7 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); })(s$5) + t$6[o$11 + 1]), t$6[0]); return new n$7(o$10, t$6, s$4); }, S$3 = (s$5, o$10) => { if (e$8) s$5.adoptedStyleSheets = o$10.map(((t$6) => t$6 instanceof CSSStyleSheet ? t$6 : t$6.styleSheet)); else for (const e$10 of o$10) { const o$11 = document.createElement("style"), n$9 = t$5.litNonce; void 0 !== n$9 && o$11.setAttribute("nonce", n$9), o$11.textContent = e$10.cssText, s$5.appendChild(o$11); } }, c$5 = e$8 ? (t$6) => t$6 : (t$6) => t$6 instanceof CSSStyleSheet ? ((t$7) => { let e$10 = ""; for (const s$5 of t$7.cssRules) e$10 += s$5.cssText; return r$8(e$10); })(t$6) : t$6; })); //#endregion //#region node_modules/@lit/reactive-element/reactive-element.js var i$6, e$9, h$4, r$9, o$8, n$8, a$1, c$6, l$2, p$2, d$4, u$1, f, b$2, y$1; var init_reactive_element = __esmMin((() => { init_css_tag(); ({is: i$6, defineProperty: e$9, getOwnPropertyDescriptor: h$4, getOwnPropertyNames: r$9, getOwnPropertySymbols: o$8, getPrototypeOf: n$8} = Object), a$1 = globalThis, c$6 = a$1.trustedTypes, l$2 = c$6 ? c$6.emptyScript : "", p$2 = a$1.reactiveElementPolyfillSupport, d$4 = (t$6, s$5) => t$6, u$1 = { toAttribute(t$6, s$5) { switch (s$5) { case Boolean: t$6 = t$6 ? l$2 : null; break; case Object: case Array: t$6 = null == t$6 ? t$6 : JSON.stringify(t$6); } return t$6; }, fromAttribute(t$6, s$5) { let i$7 = t$6; switch (s$5) { case Boolean: i$7 = null !== t$6; break; case Number: i$7 = null === t$6 ? null : Number(t$6); break; case Object: case Array: try { i$7 = JSON.parse(t$6); } catch (t$7) { i$7 = null; } } return i$7; } }, f = (t$6, s$5) => !i$6(t$6, s$5), b$2 = { attribute: !0, type: String, converter: u$1, reflect: !1, useDefault: !1, hasChanged: f }; Symbol.metadata ??= Symbol("metadata"), a$1.litPropertyMetadata ??= new WeakMap(); y$1 = class extends HTMLElement { static addInitializer(t$6) { this._$Ei(), (this.l ??= []).push(t$6); } static get observedAttributes() { return this.finalize(), this._$Eh && [...this._$Eh.keys()]; } static createProperty(t$6, s$5 = b$2) { if (s$5.state && (s$5.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t$6) && ((s$5 = Object.create(s$5)).wrapped = !0), this.elementProperties.set(t$6, s$5), !s$5.noAccessor) { const i$7 = Symbol(), h$5 = this.getPropertyDescriptor(t$6, i$7, s$5); void 0 !== h$5 && e$9(this.prototype, t$6, h$5); } } static getPropertyDescriptor(t$6, s$5, i$7) { const { get: e$10, set: r$10 } = h$4(this.prototype, t$6) ?? { get() { return this[s$5]; }, set(t$7) { this[s$5] = t$7; } }; return { get: e$10, set(s$6) { const h$5 = e$10?.call(this); r$10?.call(this, s$6), this.requestUpdate(t$6, h$5, i$7); }, configurable: !0, enumerable: !0 }; } static getPropertyOptions(t$6) { return this.elementProperties.get(t$6) ?? b$2; } static _$Ei() { if (this.hasOwnProperty(d$4("elementProperties"))) return; const t$6 = n$8(this); t$6.finalize(), void 0 !== t$6.l && (this.l = [...t$6.l]), this.elementProperties = new Map(t$6.elementProperties); } static finalize() { if (this.hasOwnProperty(d$4("finalized"))) return; if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d$4("properties"))) { const t$7 = this.properties, s$5 = [...r$9(t$7), ...o$8(t$7)]; for (const i$7 of s$5) this.createProperty(i$7, t$7[i$7]); } const t$6 = this[Symbol.metadata]; if (null !== t$6) { const s$5 = litPropertyMetadata.get(t$6); if (void 0 !== s$5) for (const [t$7, i$7] of s$5) this.elementProperties.set(t$7, i$7); } this._$Eh = new Map(); for (const [t$7, s$5] of this.elementProperties) { const i$7 = this._$Eu(t$7, s$5); void 0 !== i$7 && this._$Eh.set(i$7, t$7); } this.elementStyles = this.finalizeStyles(this.styles); } static finalizeStyles(s$5) { const i$7 = []; if (Array.isArray(s$5)) { const e$10 = new Set(s$5.flat(1 / 0).reverse()); for (const s$6 of e$10) i$7.unshift(c$5(s$6)); } else void 0 !== s$5 && i$7.push(c$5(s$5)); return i$7; } static _$Eu(t$6, s$5) { const i$7 = s$5.attribute; return !1 === i$7 ? void 0 : "string" == typeof i$7 ? i$7 : "string" == typeof t$6 ? t$6.toLowerCase() : void 0; } constructor() { super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev(); } _$Ev() { this._$ES = new Promise(((t$6) => this.enableUpdating = t$6)), this._$AL = new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((t$6) => t$6(this))); } addController(t$6) { (this._$EO ??= new Set()).add(t$6), void 0 !== this.renderRoot && this.isConnected && t$6.hostConnected?.(); } removeController(t$6) { this._$EO?.delete(t$6); } _$E_() { const t$6 = new Map(), s$5 = this.constructor.elementProperties; for (const i$7 of s$5.keys()) this.hasOwnProperty(i$7) && (t$6.set(i$7, this[i$7]), delete this[i$7]); t$6.size > 0 && (this._$Ep = t$6); } createRenderRoot() { const t$6 = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); return S$3(t$6, this.constructor.elementStyles), t$6; } connectedCallback() { this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t$6) => t$6.hostConnected?.())); } enableUpdating(t$6) {} disconnectedCallback() { this._$EO?.forEach(((t$6) => t$6.hostDisconnected?.())); } attributeChangedCallback(t$6, s$5, i$7) { this._$AK(t$6, i$7); } _$ET(t$6, s$5) { const i$7 = this.constructor.elementProperties.get(t$6), e$10 = this.constructor._$Eu(t$6, i$7); if (void 0 !== e$10 && !0 === i$7.reflect) { const h$5 = (void 0 !== i$7.converter?.toAttribute ? i$7.converter : u$1).toAttribute(s$5, i$7.type); this._$Em = t$6, null == h$5 ? this.removeAttribute(e$10) : this.setAttribute(e$10, h$5), this._$Em = null; } } _$AK(t$6, s$5) { const i$7 = this.constructor, e$10 = i$7._$Eh.get(t$6); if (void 0 !== e$10 && this._$Em !== e$10) { const t$7 = i$7.getPropertyOptions(e$10), h$5 = "function" == typeof t$7.converter ? { fromAttribute: t$7.converter } : void 0 !== t$7.converter?.fromAttribute ? t$7.converter : u$1; this._$Em = e$10; const r$10 = h$5.fromAttribute(s$5, t$7.type); this[e$10] = r$10 ?? this._$Ej?.get(e$10) ?? r$10, this._$Em = null; } } requestUpdate(t$6, s$5, i$7) { if (void 0 !== t$6) { const e$10 = this.constructor, h$5 = this[t$6]; if (i$7 ??= e$10.getPropertyOptions(t$6), !((i$7.hasChanged ?? f)(h$5, s$5) || i$7.useDefault && i$7.reflect && h$5 === this._$Ej?.get(t$6) && !this.hasAttribute(e$10._$Eu(t$6, i$7)))) return; this.C(t$6, s$5, i$7); } !1 === this.isUpdatePending && (this._$ES = this._$EP()); } C(t$6, s$5, { useDefault: i$7, reflect: e$10, wrapped: h$5 }, r$10) { i$7 && !(this._$Ej ??= new Map()).has(t$6) && (this._$Ej.set(t$6, r$10 ?? s$5 ?? this[t$6]), !0 !== h$5 || void 0 !== r$10) || (this._$AL.has(t$6) || (this.hasUpdated || i$7 || (s$5 = void 0), this._$AL.set(t$6, s$5)), !0 === e$10 && this._$Em !== t$6 && (this._$Eq ??= new Set()).add(t$6)); } async _$EP() { this.isUpdatePending = !0; try { await this._$ES; } catch (t$7) { Promise.reject(t$7); } const t$6 = this.scheduleUpdate(); return null != t$6 && await t$6, !this.isUpdatePending; } scheduleUpdate() { return this.performUpdate(); } performUpdate() { if (!this.isUpdatePending) return; if (!this.hasUpdated) { if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) { for (const [t$8, s$6] of this._$Ep) this[t$8] = s$6; this._$Ep = void 0; } const t$7 = this.constructor.elementProperties; if (t$7.size > 0) for (const [s$6, i$7] of t$7) { const { wrapped: t$8 } = i$7, e$10 = this[s$6]; !0 !== t$8 || this._$AL.has(s$6) || void 0 === e$10 || this.C(s$6, void 0, i$7, e$10); } } let t$6 = !1; const s$5 = this._$AL; try { t$6 = this.shouldUpdate(s$5), t$6 ? (this.willUpdate(s$5), this._$EO?.forEach(((t$7) => t$7.hostUpdate?.())), this.update(s$5)) : this._$EM(); } catch (s$6) { throw t$6 = !1, this._$EM(), s$6; } t$6 && this._$AE(s$5); } willUpdate(t$6) {} _$AE(t$6) { this._$EO?.forEach(((t$7) => t$7.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t$6)), this.updated(t$6); } _$EM() { this._$AL = new Map(), this.isUpdatePending = !1; } get updateComplete() { return this.getUpdateComplete(); } getUpdateComplete() { return this._$ES; } shouldUpdate(t$6) { return !0; } update(t$6) { this._$Eq &&= this._$Eq.forEach(((t$7) => this._$ET(t$7, this[t$7]))), this._$EM(); } updated(t$6) {} firstUpdated(t$6) {} }; y$1.elementStyles = [], y$1.shadowRootOptions = { mode: "open" }, y$1[d$4("elementProperties")] = new Map(), y$1[d$4("finalized")] = new Map(), p$2?.({ ReactiveElement: y$1 }), (a$1.reactiveElementVersions ??= []).push("2.1.1"); })); //#endregion //#region node_modules/lit-html/lit-html.js function P$1(t$6, i$7) { if (!a(t$6) || !t$6.hasOwnProperty("raw")) throw Error("invalid template strings array"); return void 0 !== s$3 ? s$3.createHTML(i$7) : i$7; } function S$2(t$6, i$7, s$5 = t$6, e$10) { if (i$7 === T$2) return i$7; let h$5 = void 0 !== e$10 ? s$5._$Co?.[e$10] : s$5._$Cl; const o$10 = c$4(i$7) ? void 0 : i$7._$litDirective$; return h$5?.constructor !== o$10 && (h$5?._$AO?.(!1), void 0 === o$10 ? h$5 = void 0 : (h$5 = new o$10(t$6), h$5._$AT(t$6, s$5, e$10)), void 0 !== e$10 ? (s$5._$Co ??= [])[e$10] = h$5 : s$5._$Cl = h$5), void 0 !== h$5 && (i$7 = S$2(t$6, h$5._$AS(t$6, i$7.values), h$5, e$10)), i$7; } var t$4, i$4, s$3, e$7, h$3, o$7, n$6, r$7, l$1, c$4, a, u$3, d$3, f$3, v$2, _$1, m$2, p$1, g, $$2, y$2, x, b$1, w$1, T$2, E$1, A, C$1, V$1, N$1, M$2, R, k$1, H, I$1, L$1, z$1, Z, j$1, B$1; var init_lit_html = __esmMin((() => { t$4 = globalThis, i$4 = t$4.trustedTypes, s$3 = i$4 ? i$4.createPolicy("lit-html", { createHTML: (t$6) => t$6 }) : void 0, e$7 = "$lit$", h$3 = `lit$${Math.random().toFixed(9).slice(2)}$`, o$7 = "?" + h$3, n$6 = `<${o$7}>`, r$7 = document, l$1 = () => r$7.createComment(""), c$4 = (t$6) => null === t$6 || "object" != typeof t$6 && "function" != typeof t$6, a = Array.isArray, u$3 = (t$6) => a(t$6) || "function" == typeof t$6?.[Symbol.iterator], d$3 = "[ \n\f\r]", f$3 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, v$2 = /-->/g, _$1 = />/g, m$2 = RegExp(`>|${d$3}(?:([^\\s"'>=/]+)(${d$3}*=${d$3}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), p$1 = /'/g, g = /"/g, $$2 = /^(?:script|style|textarea|title)$/i, y$2 = (t$6) => (i$7, ...s$5) => ({ _$litType$: t$6, strings: i$7, values: s$5 }), x = y$2(1), b$1 = y$2(2), w$1 = y$2(3), T$2 = Symbol.for("lit-noChange"), E$1 = Symbol.for("lit-nothing"), A = new WeakMap(), C$1 = r$7.createTreeWalker(r$7, 129); V$1 = (t$6, i$7) => { const s$5 = t$6.length - 1, o$10 = []; let r$10, l$3 = 2 === i$7 ? "" : 3 === i$7 ? "" : "", c$7 = f$3; for (let i$8 = 0; i$8 < s$5; i$8++) { const s$6 = t$6[i$8]; let a$2, u$4, d$5 = -1, y$3 = 0; for (; y$3 < s$6.length && (c$7.lastIndex = y$3, u$4 = c$7.exec(s$6), null !== u$4);) y$3 = c$7.lastIndex, c$7 === f$3 ? "!--" === u$4[1] ? c$7 = v$2 : void 0 !== u$4[1] ? c$7 = _$1 : void 0 !== u$4[2] ? ($$2.test(u$4[2]) && (r$10 = RegExp("" === u$4[0] ? (c$7 = r$10 ?? f$3, d$5 = -1) : void 0 === u$4[1] ? d$5 = -2 : (d$5 = c$7.lastIndex - u$4[2].length, a$2 = u$4[1], c$7 = void 0 === u$4[3] ? m$2 : "\"" === u$4[3] ? g : p$1) : c$7 === g || c$7 === p$1 ? c$7 = m$2 : c$7 === v$2 || c$7 === _$1 ? c$7 = f$3 : (c$7 = m$2, r$10 = void 0); const x$2 = c$7 === m$2 && t$6[i$8 + 1].startsWith("/>") ? " " : ""; l$3 += c$7 === f$3 ? s$6 + n$6 : d$5 >= 0 ? (o$10.push(a$2), s$6.slice(0, d$5) + e$7 + s$6.slice(d$5) + h$3 + x$2) : s$6 + h$3 + (-2 === d$5 ? i$8 : x$2); } return [P$1(t$6, l$3 + (t$6[s$5] || "") + (2 === i$7 ? "" : 3 === i$7 ? "" : "")), o$10]; }; N$1 = class N$1 { constructor({ strings: t$6, _$litType$: s$5 }, n$9) { let r$10; this.parts = []; let c$7 = 0, a$2 = 0; const u$4 = t$6.length - 1, d$5 = this.parts, [f$4, v$3] = V$1(t$6, s$5); if (this.el = N$1.createElement(f$4, n$9), C$1.currentNode = this.el.content, 2 === s$5 || 3 === s$5) { const t$7 = this.el.content.firstChild; t$7.replaceWith(...t$7.childNodes); } for (; null !== (r$10 = C$1.nextNode()) && d$5.length < u$4;) { if (1 === r$10.nodeType) { if (r$10.hasAttributes()) for (const t$7 of r$10.getAttributeNames()) if (t$7.endsWith(e$7)) { const i$7 = v$3[a$2++], s$6 = r$10.getAttribute(t$7).split(h$3), e$10 = /([.?@])?(.*)/.exec(i$7); d$5.push({ type: 1, index: c$7, name: e$10[2], strings: s$6, ctor: "." === e$10[1] ? H : "?" === e$10[1] ? I$1 : "@" === e$10[1] ? L$1 : k$1 }), r$10.removeAttribute(t$7); } else t$7.startsWith(h$3) && (d$5.push({ type: 6, index: c$7 }), r$10.removeAttribute(t$7)); if ($$2.test(r$10.tagName)) { const t$7 = r$10.textContent.split(h$3), s$6 = t$7.length - 1; if (s$6 > 0) { r$10.textContent = i$4 ? i$4.emptyScript : ""; for (let i$7 = 0; i$7 < s$6; i$7++) r$10.append(t$7[i$7], l$1()), C$1.nextNode(), d$5.push({ type: 2, index: ++c$7 }); r$10.append(t$7[s$6], l$1()); } } } else if (8 === r$10.nodeType) if (r$10.data === o$7) d$5.push({ type: 2, index: c$7 }); else { let t$7 = -1; for (; -1 !== (t$7 = r$10.data.indexOf(h$3, t$7 + 1));) d$5.push({ type: 7, index: c$7 }), t$7 += h$3.length - 1; } c$7++; } } static createElement(t$6, i$7) { const s$5 = r$7.createElement("template"); return s$5.innerHTML = t$6, s$5; } }; M$2 = class { constructor(t$6, i$7) { this._$AV = [], this._$AN = void 0, this._$AD = t$6, this._$AM = i$7; } get parentNode() { return this._$AM.parentNode; } get _$AU() { return this._$AM._$AU; } u(t$6) { const { el: { content: i$7 }, parts: s$5 } = this._$AD, e$10 = (t$6?.creationScope ?? r$7).importNode(i$7, !0); C$1.currentNode = e$10; let h$5 = C$1.nextNode(), o$10 = 0, n$9 = 0, l$3 = s$5[0]; for (; void 0 !== l$3;) { if (o$10 === l$3.index) { let i$8; 2 === l$3.type ? i$8 = new R(h$5, h$5.nextSibling, this, t$6) : 1 === l$3.type ? i$8 = new l$3.ctor(h$5, l$3.name, l$3.strings, this, t$6) : 6 === l$3.type && (i$8 = new z$1(h$5, this, t$6)), this._$AV.push(i$8), l$3 = s$5[++n$9]; } o$10 !== l$3?.index && (h$5 = C$1.nextNode(), o$10++); } return C$1.currentNode = r$7, e$10; } p(t$6) { let i$7 = 0; for (const s$5 of this._$AV) void 0 !== s$5 && (void 0 !== s$5.strings ? (s$5._$AI(t$6, s$5, i$7), i$7 += s$5.strings.length - 2) : s$5._$AI(t$6[i$7])), i$7++; } }; R = class R { get _$AU() { return this._$AM?._$AU ?? this._$Cv; } constructor(t$6, i$7, s$5, e$10) { this.type = 2, this._$AH = E$1, this._$AN = void 0, this._$AA = t$6, this._$AB = i$7, this._$AM = s$5, this.options = e$10, this._$Cv = e$10?.isConnected ?? !0; } get parentNode() { let t$6 = this._$AA.parentNode; const i$7 = this._$AM; return void 0 !== i$7 && 11 === t$6?.nodeType && (t$6 = i$7.parentNode), t$6; } get startNode() { return this._$AA; } get endNode() { return this._$AB; } _$AI(t$6, i$7 = this) { t$6 = S$2(this, t$6, i$7), c$4(t$6) ? t$6 === E$1 || null == t$6 || "" === t$6 ? (this._$AH !== E$1 && this._$AR(), this._$AH = E$1) : t$6 !== this._$AH && t$6 !== T$2 && this._(t$6) : void 0 !== t$6._$litType$ ? this.$(t$6) : void 0 !== t$6.nodeType ? this.T(t$6) : u$3(t$6) ? this.k(t$6) : this._(t$6); } O(t$6) { return this._$AA.parentNode.insertBefore(t$6, this._$AB); } T(t$6) { this._$AH !== t$6 && (this._$AR(), this._$AH = this.O(t$6)); } _(t$6) { this._$AH !== E$1 && c$4(this._$AH) ? this._$AA.nextSibling.data = t$6 : this.T(r$7.createTextNode(t$6)), this._$AH = t$6; } $(t$6) { const { values: i$7, _$litType$: s$5 } = t$6, e$10 = "number" == typeof s$5 ? this._$AC(t$6) : (void 0 === s$5.el && (s$5.el = N$1.createElement(P$1(s$5.h, s$5.h[0]), this.options)), s$5); if (this._$AH?._$AD === e$10) this._$AH.p(i$7); else { const t$7 = new M$2(e$10, this), s$6 = t$7.u(this.options); t$7.p(i$7), this.T(s$6), this._$AH = t$7; } } _$AC(t$6) { let i$7 = A.get(t$6.strings); return void 0 === i$7 && A.set(t$6.strings, i$7 = new N$1(t$6)), i$7; } k(t$6) { a(this._$AH) || (this._$AH = [], this._$AR()); const i$7 = this._$AH; let s$5, e$10 = 0; for (const h$5 of t$6) e$10 === i$7.length ? i$7.push(s$5 = new R(this.O(l$1()), this.O(l$1()), this, this.options)) : s$5 = i$7[e$10], s$5._$AI(h$5), e$10++; e$10 < i$7.length && (this._$AR(s$5 && s$5._$AB.nextSibling, e$10), i$7.length = e$10); } _$AR(t$6 = this._$AA.nextSibling, i$7) { for (this._$AP?.(!1, !0, i$7); t$6 !== this._$AB;) { const i$8 = t$6.nextSibling; t$6.remove(), t$6 = i$8; } } setConnected(t$6) { void 0 === this._$AM && (this._$Cv = t$6, this._$AP?.(t$6)); } }; k$1 = class { get tagName() { return this.element.tagName; } get _$AU() { return this._$AM._$AU; } constructor(t$6, i$7, s$5, e$10, h$5) { this.type = 1, this._$AH = E$1, this._$AN = void 0, this.element = t$6, this.name = i$7, this._$AM = e$10, this.options = h$5, s$5.length > 2 || "" !== s$5[0] || "" !== s$5[1] ? (this._$AH = Array(s$5.length - 1).fill(new String()), this.strings = s$5) : this._$AH = E$1; } _$AI(t$6, i$7 = this, s$5, e$10) { const h$5 = this.strings; let o$10 = !1; if (void 0 === h$5) t$6 = S$2(this, t$6, i$7, 0), o$10 = !c$4(t$6) || t$6 !== this._$AH && t$6 !== T$2, o$10 && (this._$AH = t$6); else { const e$11 = t$6; let n$9, r$10; for (t$6 = h$5[0], n$9 = 0; n$9 < h$5.length - 1; n$9++) r$10 = S$2(this, e$11[s$5 + n$9], i$7, n$9), r$10 === T$2 && (r$10 = this._$AH[n$9]), o$10 ||= !c$4(r$10) || r$10 !== this._$AH[n$9], r$10 === E$1 ? t$6 = E$1 : t$6 !== E$1 && (t$6 += (r$10 ?? "") + h$5[n$9 + 1]), this._$AH[n$9] = r$10; } o$10 && !e$10 && this.j(t$6); } j(t$6) { t$6 === E$1 ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t$6 ?? ""); } }; H = class extends k$1 { constructor() { super(...arguments), this.type = 3; } j(t$6) { this.element[this.name] = t$6 === E$1 ? void 0 : t$6; } }; I$1 = class extends k$1 { constructor() { super(...arguments), this.type = 4; } j(t$6) { this.element.toggleAttribute(this.name, !!t$6 && t$6 !== E$1); } }; L$1 = class extends k$1 { constructor(t$6, i$7, s$5, e$10, h$5) { super(t$6, i$7, s$5, e$10, h$5), this.type = 5; } _$AI(t$6, i$7 = this) { if ((t$6 = S$2(this, t$6, i$7, 0) ?? E$1) === T$2) return; const s$5 = this._$AH, e$10 = t$6 === E$1 && s$5 !== E$1 || t$6.capture !== s$5.capture || t$6.once !== s$5.once || t$6.passive !== s$5.passive, h$5 = t$6 !== E$1 && (s$5 === E$1 || e$10); e$10 && this.element.removeEventListener(this.name, this, s$5), h$5 && this.element.addEventListener(this.name, this, t$6), this._$AH = t$6; } handleEvent(t$6) { "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t$6) : this._$AH.handleEvent(t$6); } }; z$1 = class { constructor(t$6, i$7, s$5) { this.element = t$6, this.type = 6, this._$AN = void 0, this._$AM = i$7, this.options = s$5; } get _$AU() { return this._$AM._$AU; } _$AI(t$6) { S$2(this, t$6); } }; Z = { M: e$7, P: h$3, A: o$7, C: 1, L: V$1, R: M$2, D: u$3, V: S$2, I: R, H: k$1, N: I$1, U: L$1, B: H, F: z$1 }, j$1 = t$4.litHtmlPolyfillSupport; j$1?.(N$1, R), (t$4.litHtmlVersions ??= []).push("3.3.1"); B$1 = (t$6, i$7, s$5) => { const e$10 = s$5?.renderBefore ?? i$7; let h$5 = e$10._$litPart$; if (void 0 === h$5) { const t$7 = s$5?.renderBefore ?? null; e$10._$litPart$ = h$5 = new R(i$7.insertBefore(l$1(), t$7), t$7, void 0, s$5 ?? {}); } return h$5._$AI(t$6), h$5; }; })); //#endregion //#region node_modules/lit-element/lit-element.js var s$2, i, o$6, n$5; var init_lit_element = __esmMin((() => { init_reactive_element(); init_reactive_element(); init_lit_html(); init_lit_html(); s$2 = globalThis; i = class extends y$1 { constructor() { super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; } createRenderRoot() { const t$6 = super.createRenderRoot(); return this.renderOptions.renderBefore ??= t$6.firstChild, t$6; } update(t$6) { const r$10 = this.render(); this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t$6), this._$Do = B$1(r$10, this.renderRoot, this.renderOptions); } connectedCallback() { super.connectedCallback(), this._$Do?.setConnected(!0); } disconnectedCallback() { super.disconnectedCallback(), this._$Do?.setConnected(!1); } render() { return T$2; } }; i._$litElement$ = !0, i["finalized"] = !0, s$2.litElementHydrateSupport?.({ LitElement: i }); o$6 = s$2.litElementPolyfillSupport; o$6?.({ LitElement: i }); n$5 = { _$AK: (t$6, e$10, r$10) => { t$6._$AK(e$10, r$10); }, _$AL: (t$6) => t$6._$AL }; (s$2.litElementVersions ??= []).push("4.2.1"); })); //#endregion //#region node_modules/lit-html/is-server.js var o$5; var init_is_server = __esmMin((() => { o$5 = !1; })); //#endregion //#region node_modules/lit/index.js var init_lit = __esmMin((() => { init_reactive_element(); init_lit_html(); init_lit_element(); init_is_server(); })); //#endregion //#region node_modules/lit-html/directive-helpers.js var t$3, i$3, n$4, e$6, l, d$2, c$3, f$2, r$6, s, v$1, u$2, m$1, p, M$1, h$2; var init_directive_helpers = __esmMin((() => { init_lit_html(); ({I: t$3} = Z), i$3 = (o$10) => null === o$10 || "object" != typeof o$10 && "function" != typeof o$10, n$4 = { HTML: 1, SVG: 2, MATHML: 3 }, e$6 = (o$10, t$6) => void 0 === t$6 ? void 0 !== o$10?._$litType$ : o$10?._$litType$ === t$6, l = (o$10) => null != o$10?._$litType$?.h, d$2 = (o$10) => void 0 !== o$10?._$litDirective$, c$3 = (o$10) => o$10?._$litDirective$, f$2 = (o$10) => void 0 === o$10.strings, r$6 = () => document.createComment(""), s = (o$10, i$7, n$9) => { const e$10 = o$10._$AA.parentNode, l$3 = void 0 === i$7 ? o$10._$AB : i$7._$AA; if (void 0 === n$9) { const i$8 = e$10.insertBefore(r$6(), l$3), d$5 = e$10.insertBefore(r$6(), l$3); n$9 = new t$3(i$8, d$5, o$10, o$10.options); } else { const t$6 = n$9._$AB.nextSibling, i$8 = n$9._$AM, d$5 = i$8 !== o$10; if (d$5) { let t$7; n$9._$AQ?.(o$10), n$9._$AM = o$10, void 0 !== n$9._$AP && (t$7 = o$10._$AU) !== i$8._$AU && n$9._$AP(t$7); } if (t$6 !== l$3 || d$5) { let o$11 = n$9._$AA; for (; o$11 !== t$6;) { const t$7 = o$11.nextSibling; e$10.insertBefore(o$11, l$3), o$11 = t$7; } } } return n$9; }, v$1 = (o$10, t$6, i$7 = o$10) => (o$10._$AI(t$6, i$7), o$10), u$2 = {}, m$1 = (o$10, t$6 = u$2) => o$10._$AH = t$6, p = (o$10) => o$10._$AH, M$1 = (o$10) => { o$10._$AR(), o$10._$AA.remove(); }, h$2 = (o$10) => { o$10._$AR(); }; })); //#endregion //#region node_modules/lit-html/directive.js var t$1, e$2, i$2; var init_directive = __esmMin((() => { t$1 = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, e$2 = (t$6) => (...e$10) => ({ _$litDirective$: t$6, values: e$10 }); i$2 = class { constructor(t$6) {} get _$AU() { return this._$AM._$AU; } _$AT(t$6, e$10, i$7) { this._$Ct = t$6, this._$AM = e$10, this._$Ci = i$7; } _$AS(t$6, e$10) { return this.update(t$6, e$10); } update(t$6, e$10) { return this.render(...e$10); } }; })); //#endregion //#region node_modules/lit-html/async-directive.js function h$1(i$7) { void 0 !== this._$AN ? (o$4(this), this._$AM = i$7, r$5(this)) : this._$AM = i$7; } function n$3(i$7, t$6 = !1, e$10 = 0) { const r$10 = this._$AH, h$5 = this._$AN; if (void 0 !== h$5 && 0 !== h$5.size) if (t$6) if (Array.isArray(r$10)) for (let i$8 = e$10; i$8 < r$10.length; i$8++) s$1(r$10[i$8], !1), o$4(r$10[i$8]); else null != r$10 && (s$1(r$10, !1), o$4(r$10)); else s$1(this, i$7); } var s$1, o$4, r$5, c$2, f$1; var init_async_directive = __esmMin((() => { init_directive_helpers(); init_directive(); s$1 = (i$7, t$6) => { const e$10 = i$7._$AN; if (void 0 === e$10) return !1; for (const i$8 of e$10) i$8._$AO?.(t$6, !1), s$1(i$8, t$6); return !0; }, o$4 = (i$7) => { let t$6, e$10; do { if (void 0 === (t$6 = i$7._$AM)) break; e$10 = t$6._$AN, e$10.delete(i$7), i$7 = t$6; } while (0 === e$10?.size); }, r$5 = (i$7) => { for (let t$6; t$6 = i$7._$AM; i$7 = t$6) { let e$10 = t$6._$AN; if (void 0 === e$10) t$6._$AN = e$10 = new Set(); else if (e$10.has(i$7)) break; e$10.add(i$7), c$2(t$6); } }; c$2 = (i$7) => { i$7.type == t$1.CHILD && (i$7._$AP ??= n$3, i$7._$AQ ??= h$1); }; f$1 = class extends i$2 { constructor() { super(...arguments), this._$AN = void 0; } _$AT(i$7, t$6, e$10) { super._$AT(i$7, t$6, e$10), r$5(this), this.isConnected = i$7._$AU; } _$AO(i$7, t$6 = !0) { i$7 !== this.isConnected && (this.isConnected = i$7, i$7 ? this.reconnected?.() : this.disconnected?.()), t$6 && (s$1(this, i$7), o$4(this)); } setValue(t$6) { if (f$2(this._$Ct)) this._$Ct._$AI(t$6, this); else { const i$7 = [...this._$Ct._$AH]; i$7[this._$Ci] = t$6, this._$Ct._$AI(i$7, this, 0); } } disconnected() {} reconnected() {} }; })); //#endregion //#region node_modules/lit-html/directives/ref.js var e, h, o$3, n; var init_ref$3 = __esmMin((() => { init_lit_html(); init_async_directive(); init_directive(); e = () => new h(); h = class {}; o$3 = new WeakMap(), n = e$2(class extends f$1 { render(i$7) { return E$1; } update(i$7, [s$5]) { const e$10 = s$5 !== this.G; return e$10 && void 0 !== this.G && this.rt(void 0), (e$10 || this.lt !== this.ct) && (this.G = s$5, this.ht = i$7.options?.host, this.rt(this.ct = i$7.element)), E$1; } rt(t$6) { if (this.isConnected || (t$6 = void 0), "function" == typeof this.G) { const i$7 = this.ht ?? globalThis; let s$5 = o$3.get(i$7); void 0 === s$5 && (s$5 = new WeakMap(), o$3.set(i$7, s$5)), void 0 !== s$5.get(this.G) && this.G.call(this.ht, void 0), s$5.set(this.G, t$6), void 0 !== t$6 && this.G.call(this.ht, t$6); } else this.G.value = t$6; } get lt() { return "function" == typeof this.G ? o$3.get(this.ht ?? globalThis)?.get(this.G) : this.G?.value; } disconnected() { this.lt === this.ct && this.rt(void 0); } reconnected() { this.rt(this.ct); } }); })); //#endregion //#region node_modules/lit/directives/ref.js var init_ref$2 = __esmMin((() => { init_ref$3(); })); //#endregion //#region node_modules/@mariozechner/mini-lit/dist/mini.js function fc(renderFn) { return (props) => renderFn(props || {}); } function createState$1(initialState) { const listeners = new Set(); const state$1 = new Proxy(initialState, { set(target, prop, value) { target[prop] = value; for (const listener of listeners) { listener(); } return true; }, get(target, prop) { if (prop === "__subscribe") { return (listener) => { listeners.add(listener); return () => listeners.delete(listener); }; } return target[prop]; } }); return state$1; } var init_mini = __esmMin((() => { init_lit(); init_ref$2(); })); //#endregion //#region node_modules/@mariozechner/mini-lit/dist/Badge.js function Badge(propsOrChildren, variant = "default", className = "") { if (typeof propsOrChildren === "object" && propsOrChildren !== null && "children" in propsOrChildren) { return _Badge(propsOrChildren); } return _Badge({ children: propsOrChildren, variant, className }); } var _Badge; var init_Badge = __esmMin((() => { init_mini(); _Badge = fc(({ variant = "default", className = "", children }) => { const variantClasses = { default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80", secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80", destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80", outline: "border-input text-foreground" }; const baseClasses = "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden"; return x` ${children} `; }); })); //#endregion //#region node_modules/@lit/reactive-element/decorators/custom-element.js var t; var init_custom_element = __esmMin((() => { t = (t$6) => (e$10, o$10) => { void 0 !== o$10 ? o$10.addInitializer((() => { customElements.define(t$6, e$10); })) : customElements.define(t$6, e$10); }; })); //#endregion //#region node_modules/@lit/reactive-element/decorators/property.js function n$1(t$6) { return (e$10, o$10) => "object" == typeof o$10 ? r$4(t$6, e$10, o$10) : ((t$7, e$11, o$11) => { const r$10 = e$11.hasOwnProperty(o$11); return e$11.constructor.createProperty(o$11, t$7), r$10 ? Object.getOwnPropertyDescriptor(e$11, o$11) : void 0; })(t$6, e$10, o$10); } var o$2, r$4; var init_property = __esmMin((() => { init_reactive_element(); o$2 = { attribute: !0, type: String, converter: u$1, reflect: !1, hasChanged: f }, r$4 = (t$6 = o$2, e$10, r$10) => { const { kind: n$9, metadata: i$7 } = r$10; let s$5 = globalThis.litPropertyMetadata.get(i$7); if (void 0 === s$5 && globalThis.litPropertyMetadata.set(i$7, s$5 = new Map()), "setter" === n$9 && ((t$6 = Object.create(t$6)).wrapped = !0), s$5.set(r$10.name, t$6), "accessor" === n$9) { const { name: o$10 } = r$10; return { set(r$11) { const n$10 = e$10.get.call(this); e$10.set.call(this, r$11), this.requestUpdate(o$10, n$10, t$6); }, init(e$11) { return void 0 !== e$11 && this.C(o$10, void 0, t$6, e$11), e$11; } }; } if ("setter" === n$9) { const { name: o$10 } = r$10; return function(r$11) { const n$10 = this[o$10]; e$10.call(this, r$11), this.requestUpdate(o$10, n$10, t$6); }; } throw Error("Unsupported decorator location: " + n$9); }; })); //#endregion //#region node_modules/@lit/reactive-element/decorators/state.js /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ function r(r$10) { return n$1({ ...r$10, state: !0, attribute: !1 }); } var init_state = __esmMin((() => { init_property(); })); //#endregion //#region node_modules/@lit/reactive-element/decorators/event-options.js /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ function t$2(t$6) { return (n$9, o$10) => { const c$7 = "function" == typeof n$9 ? n$9 : n$9[o$10]; Object.assign(c$7, t$6); }; } var init_event_options = __esmMin((() => {})); //#endregion //#region node_modules/@lit/reactive-element/decorators/base.js var e$4; var init_base$1 = __esmMin((() => { e$4 = (e$10, t$6, c$7) => (c$7.configurable = !0, c$7.enumerable = !0, Reflect.decorate && "object" != typeof t$6 && Object.defineProperty(e$10, t$6, c$7), c$7); })); //#endregion //#region node_modules/@lit/reactive-element/decorators/query.js /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ function e$1(e$10, r$10) { return (n$9, s$5, i$7) => { const o$10 = (t$6) => t$6.renderRoot?.querySelector(e$10) ?? null; if (r$10) { const { get: e$11, set: r$11 } = "object" == typeof s$5 ? n$9 : i$7 ?? (() => { const t$6 = Symbol(); return { get() { return this[t$6]; }, set(e$12) { this[t$6] = e$12; } }; })(); return e$4(n$9, s$5, { get() { let t$6 = e$11.call(this); return void 0 === t$6 && (t$6 = o$10(this), (null !== t$6 || this.hasUpdated) && r$11.call(this, t$6)), t$6; } }); } return e$4(n$9, s$5, { get() { return o$10(this); } }); }; } var init_query = __esmMin((() => { init_base$1(); })); //#endregion //#region node_modules/@lit/reactive-element/decorators/query-all.js function r$3(r$10) { return (n$9, o$10) => e$4(n$9, o$10, { get() { return (this.renderRoot ?? (e$5 ??= document.createDocumentFragment())).querySelectorAll(r$10); } }); } var e$5; var init_query_all = __esmMin((() => { init_base$1(); ; })); //#endregion //#region node_modules/@lit/reactive-element/decorators/query-async.js /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ function r$2(r$10) { return (n$9, e$10) => e$4(n$9, e$10, { async get() { return await this.updateComplete, this.renderRoot?.querySelector(r$10) ?? null; } }); } var init_query_async = __esmMin((() => { init_base$1(); })); //#endregion //#region node_modules/@lit/reactive-element/decorators/query-assigned-elements.js /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ function o$1(o$10) { return (e$10, n$9) => { const { slot: r$10, selector: s$5 } = o$10 ?? {}, c$7 = "slot" + (r$10 ? `[name=${r$10}]` : ":not([name])"); return e$4(e$10, n$9, { get() { const t$6 = this.renderRoot?.querySelector(c$7), e$11 = t$6?.assignedElements(o$10) ?? []; return void 0 === s$5 ? e$11 : e$11.filter(((t$7) => t$7.matches(s$5))); } }); }; } var init_query_assigned_elements = __esmMin((() => { init_base$1(); })); //#endregion //#region node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ function n$2(n$9) { return (o$10, r$10) => { const { slot: e$10 } = n$9 ?? {}, s$5 = "slot" + (e$10 ? `[name=${e$10}]` : ":not([name])"); return e$4(o$10, r$10, { get() { const t$6 = this.renderRoot?.querySelector(s$5); return t$6?.assignedNodes(n$9) ?? []; } }); }; } var init_query_assigned_nodes = __esmMin((() => { init_base$1(); })); //#endregion //#region node_modules/lit/decorators.js var init_decorators = __esmMin((() => { init_custom_element(); init_property(); init_state(); init_event_options(); init_query(); init_query_all(); init_query_async(); init_query_assigned_elements(); init_query_assigned_nodes(); })); //#endregion //#region node_modules/tailwind-variants/dist/chunk-LQJYWU4O.js function flatArray(arr) { const flattened = []; flat(arr, flattened); return flattened; } var SPACE_REGEX, removeExtraSpaces, cx, falsyToString, isEmptyObject, isEqual, isBoolean, joinObjects, flat, flatMergeArrays, mergeObjects; var init_chunk_LQJYWU4O = __esmMin((() => { SPACE_REGEX = /\s+/g; removeExtraSpaces = (str) => { if (typeof str !== "string" || !str) return str; return str.replace(SPACE_REGEX, " ").trim(); }; cx = (...classnames) => { const classList = []; const buildClassString = (input) => { if (!input && input !== 0 && input !== 0n) return; if (Array.isArray(input)) { for (let i$7 = 0, len = input.length; i$7 < len; i$7++) buildClassString(input[i$7]); return; } const type = typeof input; if (type === "string" || type === "number" || type === "bigint") { if (type === "number" && input !== input) return; classList.push(String(input)); } else if (type === "object") { const keys$1 = Object.keys(input); for (let i$7 = 0, len = keys$1.length; i$7 < len; i$7++) { const key = keys$1[i$7]; if (input[key]) classList.push(key); } } }; for (let i$7 = 0, len = classnames.length; i$7 < len; i$7++) { const c$7 = classnames[i$7]; if (c$7 !== null && c$7 !== void 0) buildClassString(c$7); } return classList.length > 0 ? removeExtraSpaces(classList.join(" ")) : void 0; }; falsyToString = (value) => value === false ? "false" : value === true ? "true" : value === 0 ? "0" : value; isEmptyObject = (obj) => { if (!obj || typeof obj !== "object") return true; for (const _$2 in obj) return false; return true; }; isEqual = (obj1, obj2) => { if (obj1 === obj2) return true; if (!obj1 || !obj2) return false; const keys1 = Object.keys(obj1); const keys2 = Object.keys(obj2); if (keys1.length !== keys2.length) return false; for (let i$7 = 0; i$7 < keys1.length; i$7++) { const key = keys1[i$7]; if (!keys2.includes(key)) return false; if (obj1[key] !== obj2[key]) return false; } return true; }; isBoolean = (value) => value === true || value === false; joinObjects = (obj1, obj2) => { for (const key in obj2) { if (Object.prototype.hasOwnProperty.call(obj2, key)) { const val2 = obj2[key]; if (key in obj1) { obj1[key] = cx(obj1[key], val2); } else { obj1[key] = val2; } } } return obj1; }; flat = (arr, target) => { for (let i$7 = 0; i$7 < arr.length; i$7++) { const el = arr[i$7]; if (Array.isArray(el)) flat(el, target); else if (el) target.push(el); } }; flatMergeArrays = (...arrays) => { const result = []; flat(arrays, result); const filtered = []; for (let i$7 = 0; i$7 < result.length; i$7++) { if (result[i$7]) filtered.push(result[i$7]); } return filtered; }; mergeObjects = (obj1, obj2) => { const result = {}; for (const key in obj1) { const val1 = obj1[key]; if (key in obj2) { const val2 = obj2[key]; if (Array.isArray(val1) || Array.isArray(val2)) { result[key] = flatMergeArrays(val2, val1); } else if (typeof val1 === "object" && typeof val2 === "object" && val1 && val2) { result[key] = mergeObjects(val1, val2); } else { result[key] = val2 + " " + val1; } } else { result[key] = val1; } } for (const key in obj2) { if (!(key in obj1)) { result[key] = obj2[key]; } } return result; }; })); //#endregion //#region node_modules/tailwind-variants/dist/chunk-RZF76H2U.js function createState() { let cachedTwMerge = null; let cachedTwMergeConfig = {}; let didTwMergeConfigChange = false; return { get cachedTwMerge() { return cachedTwMerge; }, set cachedTwMerge(value) { cachedTwMerge = value; }, get cachedTwMergeConfig() { return cachedTwMergeConfig; }, set cachedTwMergeConfig(value) { cachedTwMergeConfig = value; }, get didTwMergeConfigChange() { return didTwMergeConfigChange; }, set didTwMergeConfigChange(value) { didTwMergeConfigChange = value; }, reset() { cachedTwMerge = null; cachedTwMergeConfig = {}; didTwMergeConfigChange = false; } }; } var defaultConfig, state, getTailwindVariants; var init_chunk_RZF76H2U = __esmMin((() => { init_chunk_LQJYWU4O(); defaultConfig = { twMerge: true, twMergeConfig: {} }; state = createState(); getTailwindVariants = (cn$1) => { const tv$1 = (options, configProp) => { const { extend = null, slots: slotProps = {}, variants: variantsProps = {}, compoundVariants: compoundVariantsProps = [], compoundSlots = [], defaultVariants: defaultVariantsProps = {} } = options; const config = { ...defaultConfig, ...configProp }; const base = extend?.base ? cx(extend.base, options?.base) : options?.base; const variants$1 = extend?.variants && !isEmptyObject(extend.variants) ? mergeObjects(variantsProps, extend.variants) : variantsProps; const defaultVariants = extend?.defaultVariants && !isEmptyObject(extend.defaultVariants) ? { ...extend.defaultVariants, ...defaultVariantsProps } : defaultVariantsProps; if (!isEmptyObject(config.twMergeConfig) && !isEqual(config.twMergeConfig, state.cachedTwMergeConfig)) { state.didTwMergeConfigChange = true; state.cachedTwMergeConfig = config.twMergeConfig; } const isExtendedSlotsEmpty = isEmptyObject(extend?.slots); const componentSlots = !isEmptyObject(slotProps) ? { base: cx(options?.base, isExtendedSlotsEmpty && extend?.base), ...slotProps } : {}; const slots = isExtendedSlotsEmpty ? componentSlots : joinObjects({ ...extend?.slots }, isEmptyObject(componentSlots) ? { base: options?.base } : componentSlots); const compoundVariants = isEmptyObject(extend?.compoundVariants) ? compoundVariantsProps : flatMergeArrays(extend?.compoundVariants, compoundVariantsProps); const component = (props) => { if (isEmptyObject(variants$1) && isEmptyObject(slotProps) && isExtendedSlotsEmpty) { return cn$1(base, props?.class, props?.className)(config); } if (compoundVariants && !Array.isArray(compoundVariants)) { throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof compoundVariants}`); } if (compoundSlots && !Array.isArray(compoundSlots)) { throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof compoundSlots}`); } const getVariantValue = (variant, vrs = variants$1, _slotKey = null, slotProps2 = null) => { const variantObj = vrs[variant]; if (!variantObj || isEmptyObject(variantObj)) { return null; } const variantProp = slotProps2?.[variant] ?? props?.[variant]; if (variantProp === null) return null; const variantKey = falsyToString(variantProp); if (typeof variantKey === "object") { return null; } const defaultVariantProp = defaultVariants?.[variant]; const key = variantKey != null ? variantKey : falsyToString(defaultVariantProp); const value = variantObj[key || "false"]; return value; }; const getVariantClassNames = () => { if (!variants$1) return null; const keys$1 = Object.keys(variants$1); const result = []; for (let i$7 = 0; i$7 < keys$1.length; i$7++) { const value = getVariantValue(keys$1[i$7], variants$1); if (value) result.push(value); } return result; }; const getVariantClassNamesBySlotKey = (slotKey, slotProps2) => { if (!variants$1 || typeof variants$1 !== "object") return null; const result = []; for (const variant in variants$1) { const variantValue = getVariantValue(variant, variants$1, slotKey, slotProps2); const value = slotKey === "base" && typeof variantValue === "string" ? variantValue : variantValue && variantValue[slotKey]; if (value) result.push(value); } return result; }; const propsWithoutUndefined = {}; for (const prop in props) { const value = props[prop]; if (value !== void 0) propsWithoutUndefined[prop] = value; } const getCompleteProps = (key, slotProps2) => { const initialProp = typeof props?.[key] === "object" ? { [key]: props[key]?.initial } : {}; return { ...defaultVariants, ...propsWithoutUndefined, ...initialProp, ...slotProps2 }; }; const getCompoundVariantsValue = (cv = [], slotProps2) => { const result = []; const cvLength = cv.length; for (let i$7 = 0; i$7 < cvLength; i$7++) { const { class: tvClass, className: tvClassName, ...compoundVariantOptions } = cv[i$7]; let isValid = true; const completeProps = getCompleteProps(null, slotProps2); for (const key in compoundVariantOptions) { const value = compoundVariantOptions[key]; const completePropsValue = completeProps[key]; if (Array.isArray(value)) { if (!value.includes(completePropsValue)) { isValid = false; break; } } else { if ((value == null || value === false) && (completePropsValue == null || completePropsValue === false)) continue; if (completePropsValue !== value) { isValid = false; break; } } } if (isValid) { if (tvClass) result.push(tvClass); if (tvClassName) result.push(tvClassName); } } return result; }; const getCompoundVariantClassNamesBySlot = (slotProps2) => { const compoundClassNames = getCompoundVariantsValue(compoundVariants, slotProps2); if (!Array.isArray(compoundClassNames)) return compoundClassNames; const result = {}; const cnFn = cn$1; for (let i$7 = 0; i$7 < compoundClassNames.length; i$7++) { const className = compoundClassNames[i$7]; if (typeof className === "string") { result.base = cnFn(result.base, className)(config); } else if (typeof className === "object") { for (const slot in className) { result[slot] = cnFn(result[slot], className[slot])(config); } } } return result; }; const getCompoundSlotClassNameBySlot = (slotProps2) => { if (compoundSlots.length < 1) return null; const result = {}; const completeProps = getCompleteProps(null, slotProps2); for (let i$7 = 0; i$7 < compoundSlots.length; i$7++) { const { slots: slots2 = [], class: slotClass, className: slotClassName, ...slotVariants } = compoundSlots[i$7]; if (!isEmptyObject(slotVariants)) { let isValid = true; for (const key in slotVariants) { const completePropsValue = completeProps[key]; const slotVariantValue = slotVariants[key]; if (completePropsValue === void 0 || (Array.isArray(slotVariantValue) ? !slotVariantValue.includes(completePropsValue) : slotVariantValue !== completePropsValue)) { isValid = false; break; } } if (!isValid) continue; } for (let j$2 = 0; j$2 < slots2.length; j$2++) { const slotName = slots2[j$2]; if (!result[slotName]) result[slotName] = []; result[slotName].push([slotClass, slotClassName]); } } return result; }; if (!isEmptyObject(slotProps) || !isExtendedSlotsEmpty) { const slotsFns = {}; if (typeof slots === "object" && !isEmptyObject(slots)) { const cnFn = cn$1; for (const slotKey in slots) { slotsFns[slotKey] = (slotProps2) => { const compoundVariantClasses = getCompoundVariantClassNamesBySlot(slotProps2); const compoundSlotClasses = getCompoundSlotClassNameBySlot(slotProps2); return cnFn(slots[slotKey], getVariantClassNamesBySlotKey(slotKey, slotProps2), compoundVariantClasses ? compoundVariantClasses[slotKey] : void 0, compoundSlotClasses ? compoundSlotClasses[slotKey] : void 0, slotProps2?.class, slotProps2?.className)(config); }; } } return slotsFns; } return cn$1(base, getVariantClassNames(), getCompoundVariantsValue(compoundVariants), props?.class, props?.className)(config); }; const getVariantKeys = () => { if (!variants$1 || typeof variants$1 !== "object") return; return Object.keys(variants$1); }; component.variantKeys = getVariantKeys(); component.extend = extend; component.base = base; component.slots = slots; component.variants = variants$1; component.defaultVariants = defaultVariants; component.compoundSlots = compoundSlots; component.compoundVariants = compoundVariants; return component; }; const createTV$1 = (configProp) => { return (options, config) => tv$1(options, config ? mergeObjects(configProp, config) : configProp); }; return { tv: tv$1, createTV: createTV$1 }; }; })); //#endregion //#region node_modules/tailwind-merge/dist/bundle-mjs.mjs var concatArrays, createClassValidatorObject, createClassPartObject, CLASS_PART_SEPARATOR, EMPTY_CONFLICTS, ARBITRARY_PROPERTY_PREFIX, createClassGroupUtils, getGroupRecursive, getGroupIdForArbitraryProperty, createClassMap, processClassGroups, processClassesRecursively, processClassDefinition, processStringDefinition, processFunctionDefinition, processObjectDefinition, getPart, isThemeGetter, createLruCache, IMPORTANT_MODIFIER, MODIFIER_SEPARATOR, EMPTY_MODIFIERS, createResultObject, createParseClassName, createSortModifiers, createConfigUtils, SPLIT_CLASSES_REGEX, mergeClassList, twJoin, toValue, createTailwindMerge, fallbackThemeArr, fromTheme, arbitraryValueRegex, arbitraryVariableRegex, fractionRegex, tshirtUnitRegex, lengthUnitRegex, colorFunctionRegex, shadowRegex, imageRegex, isFraction, isNumber, isInteger, isPercent, isTshirtSize, isAny, isLengthOnly, isNever, isShadow, isImage, isAnyNonArbitrary, isArbitrarySize, isArbitraryValue, isArbitraryLength, isArbitraryNumber, isArbitraryPosition, isArbitraryImage, isArbitraryShadow, isArbitraryVariable, isArbitraryVariableLength, isArbitraryVariableFamilyName, isArbitraryVariablePosition, isArbitraryVariableSize, isArbitraryVariableImage, isArbitraryVariableShadow, getIsArbitraryValue, getIsArbitraryVariable, isLabelPosition, isLabelImage, isLabelSize, isLabelLength, isLabelNumber, isLabelFamilyName, isLabelShadow, validators, getDefaultConfig, mergeConfigs, overrideProperty, overrideConfigProperties, mergeConfigProperties, mergeArrayProperties, extendTailwindMerge, twMerge; var init_bundle_mjs = __esmMin((() => { concatArrays = (array1, array2) => { const combinedArray = new Array(array1.length + array2.length); for (let i$7 = 0; i$7 < array1.length; i$7++) { combinedArray[i$7] = array1[i$7]; } for (let i$7 = 0; i$7 < array2.length; i$7++) { combinedArray[array1.length + i$7] = array2[i$7]; } return combinedArray; }; createClassValidatorObject = (classGroupId, validator) => ({ classGroupId, validator }); createClassPartObject = (nextPart = new Map(), validators$1 = null, classGroupId) => ({ nextPart, validators: validators$1, classGroupId }); CLASS_PART_SEPARATOR = "-"; EMPTY_CONFLICTS = []; ARBITRARY_PROPERTY_PREFIX = "arbitrary.."; createClassGroupUtils = (config) => { const classMap = createClassMap(config); const { conflictingClassGroups, conflictingClassGroupModifiers } = config; const getClassGroupId = (className) => { if (className.startsWith("[") && className.endsWith("]")) { return getGroupIdForArbitraryProperty(className); } const classParts = className.split(CLASS_PART_SEPARATOR); const startIndex = classParts[0] === "" && classParts.length > 1 ? 1 : 0; return getGroupRecursive(classParts, startIndex, classMap); }; const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => { if (hasPostfixModifier) { const modifierConflicts = conflictingClassGroupModifiers[classGroupId]; const baseConflicts = conflictingClassGroups[classGroupId]; if (modifierConflicts) { if (baseConflicts) { return concatArrays(baseConflicts, modifierConflicts); } return modifierConflicts; } return baseConflicts || EMPTY_CONFLICTS; } return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS; }; return { getClassGroupId, getConflictingClassGroupIds }; }; getGroupRecursive = (classParts, startIndex, classPartObject) => { const classPathsLength = classParts.length - startIndex; if (classPathsLength === 0) { return classPartObject.classGroupId; } const currentClassPart = classParts[startIndex]; const nextClassPartObject = classPartObject.nextPart.get(currentClassPart); if (nextClassPartObject) { const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject); if (result) return result; } const validators$1 = classPartObject.validators; if (validators$1 === null) { return undefined; } const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR); const validatorsLength = validators$1.length; for (let i$7 = 0; i$7 < validatorsLength; i$7++) { const validatorObj = validators$1[i$7]; if (validatorObj.validator(classRest)) { return validatorObj.classGroupId; } } return undefined; }; getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).indexOf(":") === -1 ? undefined : (() => { const content = className.slice(1, -1); const colonIndex = content.indexOf(":"); const property = content.slice(0, colonIndex); return property ? ARBITRARY_PROPERTY_PREFIX + property : undefined; })(); createClassMap = (config) => { const { theme, classGroups } = config; return processClassGroups(classGroups, theme); }; processClassGroups = (classGroups, theme) => { const classMap = createClassPartObject(); for (const classGroupId in classGroups) { const group = classGroups[classGroupId]; processClassesRecursively(group, classMap, classGroupId, theme); } return classMap; }; processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => { const len = classGroup.length; for (let i$7 = 0; i$7 < len; i$7++) { const classDefinition = classGroup[i$7]; processClassDefinition(classDefinition, classPartObject, classGroupId, theme); } }; processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => { if (typeof classDefinition === "string") { processStringDefinition(classDefinition, classPartObject, classGroupId); return; } if (typeof classDefinition === "function") { processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme); return; } processObjectDefinition(classDefinition, classPartObject, classGroupId, theme); }; processStringDefinition = (classDefinition, classPartObject, classGroupId) => { const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition); classPartObjectToEdit.classGroupId = classGroupId; }; processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => { if (isThemeGetter(classDefinition)) { processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme); return; } if (classPartObject.validators === null) { classPartObject.validators = []; } classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition)); }; processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => { const entries = Object.entries(classDefinition); const len = entries.length; for (let i$7 = 0; i$7 < len; i$7++) { const [key, value] = entries[i$7]; processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme); } }; getPart = (classPartObject, path$1) => { let current = classPartObject; const parts = path$1.split(CLASS_PART_SEPARATOR); const len = parts.length; for (let i$7 = 0; i$7 < len; i$7++) { const part = parts[i$7]; let next = current.nextPart.get(part); if (!next) { next = createClassPartObject(); current.nextPart.set(part, next); } current = next; } return current; }; isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true; createLruCache = (maxCacheSize) => { if (maxCacheSize < 1) { return { get: () => undefined, set: () => {} }; } let cacheSize = 0; let cache = Object.create(null); let previousCache = Object.create(null); const update = (key, value) => { cache[key] = value; cacheSize++; if (cacheSize > maxCacheSize) { cacheSize = 0; previousCache = cache; cache = Object.create(null); } }; return { get(key) { let value = cache[key]; if (value !== undefined) { return value; } if ((value = previousCache[key]) !== undefined) { update(key, value); return value; } }, set(key, value) { if (key in cache) { cache[key] = value; } else { update(key, value); } } }; }; IMPORTANT_MODIFIER = "!"; MODIFIER_SEPARATOR = ":"; EMPTY_MODIFIERS = []; createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({ modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal }); createParseClassName = (config) => { const { prefix, experimentalParseClassName } = config; /** * Parse class name into parts. * * Inspired by `splitAtTopLevelOnly` used in Tailwind CSS * @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js */ let parseClassName = (className) => { const modifiers = []; let bracketDepth = 0; let parenDepth = 0; let modifierStart = 0; let postfixModifierPosition; const len = className.length; for (let index = 0; index < len; index++) { const currentCharacter = className[index]; if (bracketDepth === 0 && parenDepth === 0) { if (currentCharacter === MODIFIER_SEPARATOR) { modifiers.push(className.slice(modifierStart, index)); modifierStart = index + 1; continue; } if (currentCharacter === "/") { postfixModifierPosition = index; continue; } } if (currentCharacter === "[") bracketDepth++; else if (currentCharacter === "]") bracketDepth--; else if (currentCharacter === "(") parenDepth++; else if (currentCharacter === ")") parenDepth--; } const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart); let baseClassName = baseClassNameWithImportantModifier; let hasImportantModifier = false; if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) { baseClassName = baseClassNameWithImportantModifier.slice(0, -1); hasImportantModifier = true; } else if (baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)) { baseClassName = baseClassNameWithImportantModifier.slice(1); hasImportantModifier = true; } const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined; return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition); }; if (prefix) { const fullPrefix = prefix + MODIFIER_SEPARATOR; const parseClassNameOriginal = parseClassName; parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, undefined, true); } if (experimentalParseClassName) { const parseClassNameOriginal = parseClassName; parseClassName = (className) => experimentalParseClassName({ className, parseClassName: parseClassNameOriginal }); } return parseClassName; }; createSortModifiers = (config) => { const modifierWeights = new Map(); config.orderSensitiveModifiers.forEach((mod, index) => { modifierWeights.set(mod, 1e6 + index); }); return (modifiers) => { const result = []; let currentSegment = []; for (let i$7 = 0; i$7 < modifiers.length; i$7++) { const modifier = modifiers[i$7]; const isArbitrary = modifier[0] === "["; const isOrderSensitive = modifierWeights.has(modifier); if (isArbitrary || isOrderSensitive) { if (currentSegment.length > 0) { currentSegment.sort(); result.push(...currentSegment); currentSegment = []; } result.push(modifier); } else { currentSegment.push(modifier); } } if (currentSegment.length > 0) { currentSegment.sort(); result.push(...currentSegment); } return result; }; }; createConfigUtils = (config) => ({ cache: createLruCache(config.cacheSize), parseClassName: createParseClassName(config), sortModifiers: createSortModifiers(config), ...createClassGroupUtils(config) }); SPLIT_CLASSES_REGEX = /\s+/; mergeClassList = (classList, configUtils) => { const { parseClassName, getClassGroupId, getConflictingClassGroupIds, sortModifiers } = configUtils; /** * Set of classGroupIds in following format: * `{importantModifier}{variantModifiers}{classGroupId}` * @example 'float' * @example 'hover:focus:bg-color' * @example 'md:!pr' */ const classGroupsInConflict = []; const classNames = classList.trim().split(SPLIT_CLASSES_REGEX); let result = ""; for (let index = classNames.length - 1; index >= 0; index -= 1) { const originalClassName = classNames[index]; const { isExternal, modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition } = parseClassName(originalClassName); if (isExternal) { result = originalClassName + (result.length > 0 ? " " + result : result); continue; } let hasPostfixModifier = !!maybePostfixModifierPosition; let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName); if (!classGroupId) { if (!hasPostfixModifier) { result = originalClassName + (result.length > 0 ? " " + result : result); continue; } classGroupId = getClassGroupId(baseClassName); if (!classGroupId) { result = originalClassName + (result.length > 0 ? " " + result : result); continue; } hasPostfixModifier = false; } const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":"); const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier; const classId = modifierId + classGroupId; if (classGroupsInConflict.indexOf(classId) > -1) { continue; } classGroupsInConflict.push(classId); const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier); for (let i$7 = 0; i$7 < conflictGroups.length; ++i$7) { const group = conflictGroups[i$7]; classGroupsInConflict.push(modifierId + group); } result = originalClassName + (result.length > 0 ? " " + result : result); } return result; }; twJoin = (...classLists) => { let index = 0; let argument; let resolvedValue; let string = ""; while (index < classLists.length) { if (argument = classLists[index++]) { if (resolvedValue = toValue(argument)) { string && (string += " "); string += resolvedValue; } } } return string; }; toValue = (mix) => { if (typeof mix === "string") { return mix; } let resolvedValue; let string = ""; for (let k$2 = 0; k$2 < mix.length; k$2++) { if (mix[k$2]) { if (resolvedValue = toValue(mix[k$2])) { string && (string += " "); string += resolvedValue; } } } return string; }; createTailwindMerge = (createConfigFirst, ...createConfigRest) => { let configUtils; let cacheGet; let cacheSet; let functionToCall; const initTailwindMerge = (classList) => { const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst()); configUtils = createConfigUtils(config); cacheGet = configUtils.cache.get; cacheSet = configUtils.cache.set; functionToCall = tailwindMerge; return tailwindMerge(classList); }; const tailwindMerge = (classList) => { const cachedResult = cacheGet(classList); if (cachedResult) { return cachedResult; } const result = mergeClassList(classList, configUtils); cacheSet(classList, result); return result; }; functionToCall = initTailwindMerge; return (...args) => functionToCall(twJoin(...args)); }; fallbackThemeArr = []; fromTheme = (key) => { const themeGetter = (theme) => theme[key] || fallbackThemeArr; themeGetter.isThemeGetter = true; return themeGetter; }; arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i; arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i; fractionRegex = /^\d+\/\d+$/; tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/; lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/; colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/; shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/; imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/; isFraction = (value) => fractionRegex.test(value); isNumber = (value) => !!value && !Number.isNaN(Number(value)); isInteger = (value) => !!value && Number.isInteger(Number(value)); isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1)); isTshirtSize = (value) => tshirtUnitRegex.test(value); isAny = () => true; isLengthOnly = (value) => lengthUnitRegex.test(value) && !colorFunctionRegex.test(value); isNever = () => false; isShadow = (value) => shadowRegex.test(value); isImage = (value) => imageRegex.test(value); isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value); isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever); isArbitraryValue = (value) => arbitraryValueRegex.test(value); isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly); isArbitraryNumber = (value) => getIsArbitraryValue(value, isLabelNumber, isNumber); isArbitraryPosition = (value) => getIsArbitraryValue(value, isLabelPosition, isNever); isArbitraryImage = (value) => getIsArbitraryValue(value, isLabelImage, isImage); isArbitraryShadow = (value) => getIsArbitraryValue(value, isLabelShadow, isShadow); isArbitraryVariable = (value) => arbitraryVariableRegex.test(value); isArbitraryVariableLength = (value) => getIsArbitraryVariable(value, isLabelLength); isArbitraryVariableFamilyName = (value) => getIsArbitraryVariable(value, isLabelFamilyName); isArbitraryVariablePosition = (value) => getIsArbitraryVariable(value, isLabelPosition); isArbitraryVariableSize = (value) => getIsArbitraryVariable(value, isLabelSize); isArbitraryVariableImage = (value) => getIsArbitraryVariable(value, isLabelImage); isArbitraryVariableShadow = (value) => getIsArbitraryVariable(value, isLabelShadow, true); getIsArbitraryValue = (value, testLabel, testValue) => { const result = arbitraryValueRegex.exec(value); if (result) { if (result[1]) { return testLabel(result[1]); } return testValue(result[2]); } return false; }; getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => { const result = arbitraryVariableRegex.exec(value); if (result) { if (result[1]) { return testLabel(result[1]); } return shouldMatchNoLabel; } return false; }; isLabelPosition = (label) => label === "position" || label === "percentage"; isLabelImage = (label) => label === "image" || label === "url"; isLabelSize = (label) => label === "length" || label === "size" || label === "bg-size"; isLabelLength = (label) => label === "length"; isLabelNumber = (label) => label === "number"; isLabelFamilyName = (label) => label === "family-name"; isLabelShadow = (label) => label === "shadow"; validators = /* @__PURE__ */ Object.defineProperty({ __proto__: null, isAny, isAnyNonArbitrary, isArbitraryImage, isArbitraryLength, isArbitraryNumber, isArbitraryPosition, isArbitraryShadow, isArbitrarySize, isArbitraryValue, isArbitraryVariable, isArbitraryVariableFamilyName, isArbitraryVariableImage, isArbitraryVariableLength, isArbitraryVariablePosition, isArbitraryVariableShadow, isArbitraryVariableSize, isFraction, isInteger, isNumber, isPercent, isTshirtSize }, Symbol.toStringTag, { value: "Module" }); getDefaultConfig = () => { /** * Theme getters for theme variable namespaces * @see https://tailwindcss.com/docs/theme#theme-variable-namespaces */ const themeColor = fromTheme("color"); const themeFont = fromTheme("font"); const themeText = fromTheme("text"); const themeFontWeight = fromTheme("font-weight"); const themeTracking = fromTheme("tracking"); const themeLeading = fromTheme("leading"); const themeBreakpoint = fromTheme("breakpoint"); const themeContainer = fromTheme("container"); const themeSpacing = fromTheme("spacing"); const themeRadius = fromTheme("radius"); const themeShadow = fromTheme("shadow"); const themeInsetShadow = fromTheme("inset-shadow"); const themeTextShadow = fromTheme("text-shadow"); const themeDropShadow = fromTheme("drop-shadow"); const themeBlur = fromTheme("blur"); const themePerspective = fromTheme("perspective"); const themeAspect = fromTheme("aspect"); const themeEase = fromTheme("ease"); const themeAnimate = fromTheme("animate"); /** * Helpers to avoid repeating the same scales * * We use functions that create a new array every time they're called instead of static arrays. * This ensures that users who modify any scale by mutating the array (e.g. with `array.push(element)`) don't accidentally mutate arrays in other parts of the config. */ const scaleBreak = () => [ "auto", "avoid", "all", "avoid-page", "page", "left", "right", "column" ]; const scalePosition = () => [ "center", "top", "bottom", "left", "right", "top-left", "left-top", "top-right", "right-top", "bottom-right", "right-bottom", "bottom-left", "left-bottom" ]; const scalePositionWithArbitrary = () => [ ...scalePosition(), isArbitraryVariable, isArbitraryValue ]; const scaleOverflow = () => [ "auto", "hidden", "clip", "visible", "scroll" ]; const scaleOverscroll = () => [ "auto", "contain", "none" ]; const scaleUnambiguousSpacing = () => [ isArbitraryVariable, isArbitraryValue, themeSpacing ]; const scaleInset = () => [ isFraction, "full", "auto", ...scaleUnambiguousSpacing() ]; const scaleGridTemplateColsRows = () => [ isInteger, "none", "subgrid", isArbitraryVariable, isArbitraryValue ]; const scaleGridColRowStartAndEnd = () => [ "auto", { span: [ "full", isInteger, isArbitraryVariable, isArbitraryValue ] }, isInteger, isArbitraryVariable, isArbitraryValue ]; const scaleGridColRowStartOrEnd = () => [ isInteger, "auto", isArbitraryVariable, isArbitraryValue ]; const scaleGridAutoColsRows = () => [ "auto", "min", "max", "fr", isArbitraryVariable, isArbitraryValue ]; const scaleAlignPrimaryAxis = () => [ "start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe" ]; const scaleAlignSecondaryAxis = () => [ "start", "end", "center", "stretch", "center-safe", "end-safe" ]; const scaleMargin = () => ["auto", ...scaleUnambiguousSpacing()]; const scaleSizing = () => [ isFraction, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...scaleUnambiguousSpacing() ]; const scaleColor = () => [ themeColor, isArbitraryVariable, isArbitraryValue ]; const scaleBgPosition = () => [ ...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, { position: [isArbitraryVariable, isArbitraryValue] } ]; const scaleBgRepeat = () => ["no-repeat", { repeat: [ "", "x", "y", "space", "round" ] }]; const scaleBgSize = () => [ "auto", "cover", "contain", isArbitraryVariableSize, isArbitrarySize, { size: [isArbitraryVariable, isArbitraryValue] } ]; const scaleGradientStopPosition = () => [ isPercent, isArbitraryVariableLength, isArbitraryLength ]; const scaleRadius = () => [ "", "none", "full", themeRadius, isArbitraryVariable, isArbitraryValue ]; const scaleBorderWidth = () => [ "", isNumber, isArbitraryVariableLength, isArbitraryLength ]; const scaleLineStyle = () => [ "solid", "dashed", "dotted", "double" ]; const scaleBlendMode = () => [ "normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity" ]; const scaleMaskImagePosition = () => [ isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition ]; const scaleBlur = () => [ "", "none", themeBlur, isArbitraryVariable, isArbitraryValue ]; const scaleRotate = () => [ "none", isNumber, isArbitraryVariable, isArbitraryValue ]; const scaleScale = () => [ "none", isNumber, isArbitraryVariable, isArbitraryValue ]; const scaleSkew = () => [ isNumber, isArbitraryVariable, isArbitraryValue ]; const scaleTranslate = () => [ isFraction, "full", ...scaleUnambiguousSpacing() ]; return { cacheSize: 500, theme: { animate: [ "spin", "ping", "pulse", "bounce" ], aspect: ["video"], blur: [isTshirtSize], breakpoint: [isTshirtSize], color: [isAny], container: [isTshirtSize], "drop-shadow": [isTshirtSize], ease: [ "in", "out", "in-out" ], font: [isAnyNonArbitrary], "font-weight": [ "thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black" ], "inset-shadow": [isTshirtSize], leading: [ "none", "tight", "snug", "normal", "relaxed", "loose" ], perspective: [ "dramatic", "near", "normal", "midrange", "distant", "none" ], radius: [isTshirtSize], shadow: [isTshirtSize], spacing: ["px", isNumber], text: [isTshirtSize], "text-shadow": [isTshirtSize], tracking: [ "tighter", "tight", "normal", "wide", "wider", "widest" ] }, classGroups: { aspect: [{ aspect: [ "auto", "square", isFraction, isArbitraryValue, isArbitraryVariable, themeAspect ] }], container: ["container"], columns: [{ columns: [ isNumber, isArbitraryValue, isArbitraryVariable, themeContainer ] }], "break-after": [{ "break-after": scaleBreak() }], "break-before": [{ "break-before": scaleBreak() }], "break-inside": [{ "break-inside": [ "auto", "avoid", "avoid-page", "avoid-column" ] }], "box-decoration": [{ "box-decoration": ["slice", "clone"] }], box: [{ box: ["border", "content"] }], display: [ "block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden" ], sr: ["sr-only", "not-sr-only"], float: [{ float: [ "right", "left", "none", "start", "end" ] }], clear: [{ clear: [ "left", "right", "both", "none", "start", "end" ] }], isolation: ["isolate", "isolation-auto"], "object-fit": [{ object: [ "contain", "cover", "fill", "none", "scale-down" ] }], "object-position": [{ object: scalePositionWithArbitrary() }], overflow: [{ overflow: scaleOverflow() }], "overflow-x": [{ "overflow-x": scaleOverflow() }], "overflow-y": [{ "overflow-y": scaleOverflow() }], overscroll: [{ overscroll: scaleOverscroll() }], "overscroll-x": [{ "overscroll-x": scaleOverscroll() }], "overscroll-y": [{ "overscroll-y": scaleOverscroll() }], position: [ "static", "fixed", "absolute", "relative", "sticky" ], inset: [{ inset: scaleInset() }], "inset-x": [{ "inset-x": scaleInset() }], "inset-y": [{ "inset-y": scaleInset() }], start: [{ start: scaleInset() }], end: [{ end: scaleInset() }], top: [{ top: scaleInset() }], right: [{ right: scaleInset() }], bottom: [{ bottom: scaleInset() }], left: [{ left: scaleInset() }], visibility: [ "visible", "invisible", "collapse" ], z: [{ z: [ isInteger, "auto", isArbitraryVariable, isArbitraryValue ] }], basis: [{ basis: [ isFraction, "full", "auto", themeContainer, ...scaleUnambiguousSpacing() ] }], "flex-direction": [{ flex: [ "row", "row-reverse", "col", "col-reverse" ] }], "flex-wrap": [{ flex: [ "nowrap", "wrap", "wrap-reverse" ] }], flex: [{ flex: [ isNumber, isFraction, "auto", "initial", "none", isArbitraryValue ] }], grow: [{ grow: [ "", isNumber, isArbitraryVariable, isArbitraryValue ] }], shrink: [{ shrink: [ "", isNumber, isArbitraryVariable, isArbitraryValue ] }], order: [{ order: [ isInteger, "first", "last", "none", isArbitraryVariable, isArbitraryValue ] }], "grid-cols": [{ "grid-cols": scaleGridTemplateColsRows() }], "col-start-end": [{ col: scaleGridColRowStartAndEnd() }], "col-start": [{ "col-start": scaleGridColRowStartOrEnd() }], "col-end": [{ "col-end": scaleGridColRowStartOrEnd() }], "grid-rows": [{ "grid-rows": scaleGridTemplateColsRows() }], "row-start-end": [{ row: scaleGridColRowStartAndEnd() }], "row-start": [{ "row-start": scaleGridColRowStartOrEnd() }], "row-end": [{ "row-end": scaleGridColRowStartOrEnd() }], "grid-flow": [{ "grid-flow": [ "row", "col", "dense", "row-dense", "col-dense" ] }], "auto-cols": [{ "auto-cols": scaleGridAutoColsRows() }], "auto-rows": [{ "auto-rows": scaleGridAutoColsRows() }], gap: [{ gap: scaleUnambiguousSpacing() }], "gap-x": [{ "gap-x": scaleUnambiguousSpacing() }], "gap-y": [{ "gap-y": scaleUnambiguousSpacing() }], "justify-content": [{ justify: [...scaleAlignPrimaryAxis(), "normal"] }], "justify-items": [{ "justify-items": [...scaleAlignSecondaryAxis(), "normal"] }], "justify-self": [{ "justify-self": ["auto", ...scaleAlignSecondaryAxis()] }], "align-content": [{ content: ["normal", ...scaleAlignPrimaryAxis()] }], "align-items": [{ items: [...scaleAlignSecondaryAxis(), { baseline: ["", "last"] }] }], "align-self": [{ self: [ "auto", ...scaleAlignSecondaryAxis(), { baseline: ["", "last"] } ] }], "place-content": [{ "place-content": scaleAlignPrimaryAxis() }], "place-items": [{ "place-items": [...scaleAlignSecondaryAxis(), "baseline"] }], "place-self": [{ "place-self": ["auto", ...scaleAlignSecondaryAxis()] }], p: [{ p: scaleUnambiguousSpacing() }], px: [{ px: scaleUnambiguousSpacing() }], py: [{ py: scaleUnambiguousSpacing() }], ps: [{ ps: scaleUnambiguousSpacing() }], pe: [{ pe: scaleUnambiguousSpacing() }], pt: [{ pt: scaleUnambiguousSpacing() }], pr: [{ pr: scaleUnambiguousSpacing() }], pb: [{ pb: scaleUnambiguousSpacing() }], pl: [{ pl: scaleUnambiguousSpacing() }], m: [{ m: scaleMargin() }], mx: [{ mx: scaleMargin() }], my: [{ my: scaleMargin() }], ms: [{ ms: scaleMargin() }], me: [{ me: scaleMargin() }], mt: [{ mt: scaleMargin() }], mr: [{ mr: scaleMargin() }], mb: [{ mb: scaleMargin() }], ml: [{ ml: scaleMargin() }], "space-x": [{ "space-x": scaleUnambiguousSpacing() }], "space-x-reverse": ["space-x-reverse"], "space-y": [{ "space-y": scaleUnambiguousSpacing() }], "space-y-reverse": ["space-y-reverse"], size: [{ size: scaleSizing() }], w: [{ w: [ themeContainer, "screen", ...scaleSizing() ] }], "min-w": [{ "min-w": [ themeContainer, "screen", "none", ...scaleSizing() ] }], "max-w": [{ "max-w": [ themeContainer, "screen", "none", "prose", { screen: [themeBreakpoint] }, ...scaleSizing() ] }], h: [{ h: [ "screen", "lh", ...scaleSizing() ] }], "min-h": [{ "min-h": [ "screen", "lh", "none", ...scaleSizing() ] }], "max-h": [{ "max-h": [ "screen", "lh", ...scaleSizing() ] }], "font-size": [{ text: [ "base", themeText, isArbitraryVariableLength, isArbitraryLength ] }], "font-smoothing": ["antialiased", "subpixel-antialiased"], "font-style": ["italic", "not-italic"], "font-weight": [{ font: [ themeFontWeight, isArbitraryVariable, isArbitraryNumber ] }], "font-stretch": [{ "font-stretch": [ "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", isPercent, isArbitraryValue ] }], "font-family": [{ font: [ isArbitraryVariableFamilyName, isArbitraryValue, themeFont ] }], "fvn-normal": ["normal-nums"], "fvn-ordinal": ["ordinal"], "fvn-slashed-zero": ["slashed-zero"], "fvn-figure": ["lining-nums", "oldstyle-nums"], "fvn-spacing": ["proportional-nums", "tabular-nums"], "fvn-fraction": ["diagonal-fractions", "stacked-fractions"], tracking: [{ tracking: [ themeTracking, isArbitraryVariable, isArbitraryValue ] }], "line-clamp": [{ "line-clamp": [ isNumber, "none", isArbitraryVariable, isArbitraryNumber ] }], leading: [{ leading: [themeLeading, ...scaleUnambiguousSpacing()] }], "list-image": [{ "list-image": [ "none", isArbitraryVariable, isArbitraryValue ] }], "list-style-position": [{ list: ["inside", "outside"] }], "list-style-type": [{ list: [ "disc", "decimal", "none", isArbitraryVariable, isArbitraryValue ] }], "text-alignment": [{ text: [ "left", "center", "right", "justify", "start", "end" ] }], "placeholder-color": [{ placeholder: scaleColor() }], "text-color": [{ text: scaleColor() }], "text-decoration": [ "underline", "overline", "line-through", "no-underline" ], "text-decoration-style": [{ decoration: [...scaleLineStyle(), "wavy"] }], "text-decoration-thickness": [{ decoration: [ isNumber, "from-font", "auto", isArbitraryVariable, isArbitraryLength ] }], "text-decoration-color": [{ decoration: scaleColor() }], "underline-offset": [{ "underline-offset": [ isNumber, "auto", isArbitraryVariable, isArbitraryValue ] }], "text-transform": [ "uppercase", "lowercase", "capitalize", "normal-case" ], "text-overflow": [ "truncate", "text-ellipsis", "text-clip" ], "text-wrap": [{ text: [ "wrap", "nowrap", "balance", "pretty" ] }], indent: [{ indent: scaleUnambiguousSpacing() }], "vertical-align": [{ align: [ "baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryVariable, isArbitraryValue ] }], whitespace: [{ whitespace: [ "normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces" ] }], break: [{ break: [ "normal", "words", "all", "keep" ] }], wrap: [{ wrap: [ "break-word", "anywhere", "normal" ] }], hyphens: [{ hyphens: [ "none", "manual", "auto" ] }], content: [{ content: [ "none", isArbitraryVariable, isArbitraryValue ] }], "bg-attachment": [{ bg: [ "fixed", "local", "scroll" ] }], "bg-clip": [{ "bg-clip": [ "border", "padding", "content", "text" ] }], "bg-origin": [{ "bg-origin": [ "border", "padding", "content" ] }], "bg-position": [{ bg: scaleBgPosition() }], "bg-repeat": [{ bg: scaleBgRepeat() }], "bg-size": [{ bg: scaleBgSize() }], "bg-image": [{ bg: [ "none", { linear: [ { to: [ "t", "tr", "r", "br", "b", "bl", "l", "tl" ] }, isInteger, isArbitraryVariable, isArbitraryValue ], radial: [ "", isArbitraryVariable, isArbitraryValue ], conic: [ isInteger, isArbitraryVariable, isArbitraryValue ] }, isArbitraryVariableImage, isArbitraryImage ] }], "bg-color": [{ bg: scaleColor() }], "gradient-from-pos": [{ from: scaleGradientStopPosition() }], "gradient-via-pos": [{ via: scaleGradientStopPosition() }], "gradient-to-pos": [{ to: scaleGradientStopPosition() }], "gradient-from": [{ from: scaleColor() }], "gradient-via": [{ via: scaleColor() }], "gradient-to": [{ to: scaleColor() }], rounded: [{ rounded: scaleRadius() }], "rounded-s": [{ "rounded-s": scaleRadius() }], "rounded-e": [{ "rounded-e": scaleRadius() }], "rounded-t": [{ "rounded-t": scaleRadius() }], "rounded-r": [{ "rounded-r": scaleRadius() }], "rounded-b": [{ "rounded-b": scaleRadius() }], "rounded-l": [{ "rounded-l": scaleRadius() }], "rounded-ss": [{ "rounded-ss": scaleRadius() }], "rounded-se": [{ "rounded-se": scaleRadius() }], "rounded-ee": [{ "rounded-ee": scaleRadius() }], "rounded-es": [{ "rounded-es": scaleRadius() }], "rounded-tl": [{ "rounded-tl": scaleRadius() }], "rounded-tr": [{ "rounded-tr": scaleRadius() }], "rounded-br": [{ "rounded-br": scaleRadius() }], "rounded-bl": [{ "rounded-bl": scaleRadius() }], "border-w": [{ border: scaleBorderWidth() }], "border-w-x": [{ "border-x": scaleBorderWidth() }], "border-w-y": [{ "border-y": scaleBorderWidth() }], "border-w-s": [{ "border-s": scaleBorderWidth() }], "border-w-e": [{ "border-e": scaleBorderWidth() }], "border-w-t": [{ "border-t": scaleBorderWidth() }], "border-w-r": [{ "border-r": scaleBorderWidth() }], "border-w-b": [{ "border-b": scaleBorderWidth() }], "border-w-l": [{ "border-l": scaleBorderWidth() }], "divide-x": [{ "divide-x": scaleBorderWidth() }], "divide-x-reverse": ["divide-x-reverse"], "divide-y": [{ "divide-y": scaleBorderWidth() }], "divide-y-reverse": ["divide-y-reverse"], "border-style": [{ border: [ ...scaleLineStyle(), "hidden", "none" ] }], "divide-style": [{ divide: [ ...scaleLineStyle(), "hidden", "none" ] }], "border-color": [{ border: scaleColor() }], "border-color-x": [{ "border-x": scaleColor() }], "border-color-y": [{ "border-y": scaleColor() }], "border-color-s": [{ "border-s": scaleColor() }], "border-color-e": [{ "border-e": scaleColor() }], "border-color-t": [{ "border-t": scaleColor() }], "border-color-r": [{ "border-r": scaleColor() }], "border-color-b": [{ "border-b": scaleColor() }], "border-color-l": [{ "border-l": scaleColor() }], "divide-color": [{ divide: scaleColor() }], "outline-style": [{ outline: [ ...scaleLineStyle(), "none", "hidden" ] }], "outline-offset": [{ "outline-offset": [ isNumber, isArbitraryVariable, isArbitraryValue ] }], "outline-w": [{ outline: [ "", isNumber, isArbitraryVariableLength, isArbitraryLength ] }], "outline-color": [{ outline: scaleColor() }], shadow: [{ shadow: [ "", "none", themeShadow, isArbitraryVariableShadow, isArbitraryShadow ] }], "shadow-color": [{ shadow: scaleColor() }], "inset-shadow": [{ "inset-shadow": [ "none", themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow ] }], "inset-shadow-color": [{ "inset-shadow": scaleColor() }], "ring-w": [{ ring: scaleBorderWidth() }], "ring-w-inset": ["ring-inset"], "ring-color": [{ ring: scaleColor() }], "ring-offset-w": [{ "ring-offset": [isNumber, isArbitraryLength] }], "ring-offset-color": [{ "ring-offset": scaleColor() }], "inset-ring-w": [{ "inset-ring": scaleBorderWidth() }], "inset-ring-color": [{ "inset-ring": scaleColor() }], "text-shadow": [{ "text-shadow": [ "none", themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow ] }], "text-shadow-color": [{ "text-shadow": scaleColor() }], opacity: [{ opacity: [ isNumber, isArbitraryVariable, isArbitraryValue ] }], "mix-blend": [{ "mix-blend": [ ...scaleBlendMode(), "plus-darker", "plus-lighter" ] }], "bg-blend": [{ "bg-blend": scaleBlendMode() }], "mask-clip": [{ "mask-clip": [ "border", "padding", "content", "fill", "stroke", "view" ] }, "mask-no-clip"], "mask-composite": [{ mask: [ "add", "subtract", "intersect", "exclude" ] }], "mask-image-linear-pos": [{ "mask-linear": [isNumber] }], "mask-image-linear-from-pos": [{ "mask-linear-from": scaleMaskImagePosition() }], "mask-image-linear-to-pos": [{ "mask-linear-to": scaleMaskImagePosition() }], "mask-image-linear-from-color": [{ "mask-linear-from": scaleColor() }], "mask-image-linear-to-color": [{ "mask-linear-to": scaleColor() }], "mask-image-t-from-pos": [{ "mask-t-from": scaleMaskImagePosition() }], "mask-image-t-to-pos": [{ "mask-t-to": scaleMaskImagePosition() }], "mask-image-t-from-color": [{ "mask-t-from": scaleColor() }], "mask-image-t-to-color": [{ "mask-t-to": scaleColor() }], "mask-image-r-from-pos": [{ "mask-r-from": scaleMaskImagePosition() }], "mask-image-r-to-pos": [{ "mask-r-to": scaleMaskImagePosition() }], "mask-image-r-from-color": [{ "mask-r-from": scaleColor() }], "mask-image-r-to-color": [{ "mask-r-to": scaleColor() }], "mask-image-b-from-pos": [{ "mask-b-from": scaleMaskImagePosition() }], "mask-image-b-to-pos": [{ "mask-b-to": scaleMaskImagePosition() }], "mask-image-b-from-color": [{ "mask-b-from": scaleColor() }], "mask-image-b-to-color": [{ "mask-b-to": scaleColor() }], "mask-image-l-from-pos": [{ "mask-l-from": scaleMaskImagePosition() }], "mask-image-l-to-pos": [{ "mask-l-to": scaleMaskImagePosition() }], "mask-image-l-from-color": [{ "mask-l-from": scaleColor() }], "mask-image-l-to-color": [{ "mask-l-to": scaleColor() }], "mask-image-x-from-pos": [{ "mask-x-from": scaleMaskImagePosition() }], "mask-image-x-to-pos": [{ "mask-x-to": scaleMaskImagePosition() }], "mask-image-x-from-color": [{ "mask-x-from": scaleColor() }], "mask-image-x-to-color": [{ "mask-x-to": scaleColor() }], "mask-image-y-from-pos": [{ "mask-y-from": scaleMaskImagePosition() }], "mask-image-y-to-pos": [{ "mask-y-to": scaleMaskImagePosition() }], "mask-image-y-from-color": [{ "mask-y-from": scaleColor() }], "mask-image-y-to-color": [{ "mask-y-to": scaleColor() }], "mask-image-radial": [{ "mask-radial": [isArbitraryVariable, isArbitraryValue] }], "mask-image-radial-from-pos": [{ "mask-radial-from": scaleMaskImagePosition() }], "mask-image-radial-to-pos": [{ "mask-radial-to": scaleMaskImagePosition() }], "mask-image-radial-from-color": [{ "mask-radial-from": scaleColor() }], "mask-image-radial-to-color": [{ "mask-radial-to": scaleColor() }], "mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }], "mask-image-radial-size": [{ "mask-radial": [{ closest: ["side", "corner"], farthest: ["side", "corner"] }] }], "mask-image-radial-pos": [{ "mask-radial-at": scalePosition() }], "mask-image-conic-pos": [{ "mask-conic": [isNumber] }], "mask-image-conic-from-pos": [{ "mask-conic-from": scaleMaskImagePosition() }], "mask-image-conic-to-pos": [{ "mask-conic-to": scaleMaskImagePosition() }], "mask-image-conic-from-color": [{ "mask-conic-from": scaleColor() }], "mask-image-conic-to-color": [{ "mask-conic-to": scaleColor() }], "mask-mode": [{ mask: [ "alpha", "luminance", "match" ] }], "mask-origin": [{ "mask-origin": [ "border", "padding", "content", "fill", "stroke", "view" ] }], "mask-position": [{ mask: scaleBgPosition() }], "mask-repeat": [{ mask: scaleBgRepeat() }], "mask-size": [{ mask: scaleBgSize() }], "mask-type": [{ "mask-type": ["alpha", "luminance"] }], "mask-image": [{ mask: [ "none", isArbitraryVariable, isArbitraryValue ] }], filter: [{ filter: [ "", "none", isArbitraryVariable, isArbitraryValue ] }], blur: [{ blur: scaleBlur() }], brightness: [{ brightness: [ isNumber, isArbitraryVariable, isArbitraryValue ] }], contrast: [{ contrast: [ isNumber, isArbitraryVariable, isArbitraryValue ] }], "drop-shadow": [{ "drop-shadow": [ "", "none", themeDropShadow, isArbitraryVariableShadow, isArbitraryShadow ] }], "drop-shadow-color": [{ "drop-shadow": scaleColor() }], grayscale: [{ grayscale: [ "", isNumber, isArbitraryVariable, isArbitraryValue ] }], "hue-rotate": [{ "hue-rotate": [ isNumber, isArbitraryVariable, isArbitraryValue ] }], invert: [{ invert: [ "", isNumber, isArbitraryVariable, isArbitraryValue ] }], saturate: [{ saturate: [ isNumber, isArbitraryVariable, isArbitraryValue ] }], sepia: [{ sepia: [ "", isNumber, isArbitraryVariable, isArbitraryValue ] }], "backdrop-filter": [{ "backdrop-filter": [ "", "none", isArbitraryVariable, isArbitraryValue ] }], "backdrop-blur": [{ "backdrop-blur": scaleBlur() }], "backdrop-brightness": [{ "backdrop-brightness": [ isNumber, isArbitraryVariable, isArbitraryValue ] }], "backdrop-contrast": [{ "backdrop-contrast": [ isNumber, isArbitraryVariable, isArbitraryValue ] }], "backdrop-grayscale": [{ "backdrop-grayscale": [ "", isNumber, isArbitraryVariable, isArbitraryValue ] }], "backdrop-hue-rotate": [{ "backdrop-hue-rotate": [ isNumber, isArbitraryVariable, isArbitraryValue ] }], "backdrop-invert": [{ "backdrop-invert": [ "", isNumber, isArbitraryVariable, isArbitraryValue ] }], "backdrop-opacity": [{ "backdrop-opacity": [ isNumber, isArbitraryVariable, isArbitraryValue ] }], "backdrop-saturate": [{ "backdrop-saturate": [ isNumber, isArbitraryVariable, isArbitraryValue ] }], "backdrop-sepia": [{ "backdrop-sepia": [ "", isNumber, isArbitraryVariable, isArbitraryValue ] }], "border-collapse": [{ border: ["collapse", "separate"] }], "border-spacing": [{ "border-spacing": scaleUnambiguousSpacing() }], "border-spacing-x": [{ "border-spacing-x": scaleUnambiguousSpacing() }], "border-spacing-y": [{ "border-spacing-y": scaleUnambiguousSpacing() }], "table-layout": [{ table: ["auto", "fixed"] }], caption: [{ caption: ["top", "bottom"] }], transition: [{ transition: [ "", "all", "colors", "opacity", "shadow", "transform", "none", isArbitraryVariable, isArbitraryValue ] }], "transition-behavior": [{ transition: ["normal", "discrete"] }], duration: [{ duration: [ isNumber, "initial", isArbitraryVariable, isArbitraryValue ] }], ease: [{ ease: [ "linear", "initial", themeEase, isArbitraryVariable, isArbitraryValue ] }], delay: [{ delay: [ isNumber, isArbitraryVariable, isArbitraryValue ] }], animate: [{ animate: [ "none", themeAnimate, isArbitraryVariable, isArbitraryValue ] }], backface: [{ backface: ["hidden", "visible"] }], perspective: [{ perspective: [ themePerspective, isArbitraryVariable, isArbitraryValue ] }], "perspective-origin": [{ "perspective-origin": scalePositionWithArbitrary() }], rotate: [{ rotate: scaleRotate() }], "rotate-x": [{ "rotate-x": scaleRotate() }], "rotate-y": [{ "rotate-y": scaleRotate() }], "rotate-z": [{ "rotate-z": scaleRotate() }], scale: [{ scale: scaleScale() }], "scale-x": [{ "scale-x": scaleScale() }], "scale-y": [{ "scale-y": scaleScale() }], "scale-z": [{ "scale-z": scaleScale() }], "scale-3d": ["scale-3d"], skew: [{ skew: scaleSkew() }], "skew-x": [{ "skew-x": scaleSkew() }], "skew-y": [{ "skew-y": scaleSkew() }], transform: [{ transform: [ isArbitraryVariable, isArbitraryValue, "", "none", "gpu", "cpu" ] }], "transform-origin": [{ origin: scalePositionWithArbitrary() }], "transform-style": [{ transform: ["3d", "flat"] }], translate: [{ translate: scaleTranslate() }], "translate-x": [{ "translate-x": scaleTranslate() }], "translate-y": [{ "translate-y": scaleTranslate() }], "translate-z": [{ "translate-z": scaleTranslate() }], "translate-none": ["translate-none"], accent: [{ accent: scaleColor() }], appearance: [{ appearance: ["none", "auto"] }], "caret-color": [{ caret: scaleColor() }], "color-scheme": [{ scheme: [ "normal", "dark", "light", "light-dark", "only-dark", "only-light" ] }], cursor: [{ cursor: [ "auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", isArbitraryVariable, isArbitraryValue ] }], "field-sizing": [{ "field-sizing": ["fixed", "content"] }], "pointer-events": [{ "pointer-events": ["auto", "none"] }], resize: [{ resize: [ "none", "", "y", "x" ] }], "scroll-behavior": [{ scroll: ["auto", "smooth"] }], "scroll-m": [{ "scroll-m": scaleUnambiguousSpacing() }], "scroll-mx": [{ "scroll-mx": scaleUnambiguousSpacing() }], "scroll-my": [{ "scroll-my": scaleUnambiguousSpacing() }], "scroll-ms": [{ "scroll-ms": scaleUnambiguousSpacing() }], "scroll-me": [{ "scroll-me": scaleUnambiguousSpacing() }], "scroll-mt": [{ "scroll-mt": scaleUnambiguousSpacing() }], "scroll-mr": [{ "scroll-mr": scaleUnambiguousSpacing() }], "scroll-mb": [{ "scroll-mb": scaleUnambiguousSpacing() }], "scroll-ml": [{ "scroll-ml": scaleUnambiguousSpacing() }], "scroll-p": [{ "scroll-p": scaleUnambiguousSpacing() }], "scroll-px": [{ "scroll-px": scaleUnambiguousSpacing() }], "scroll-py": [{ "scroll-py": scaleUnambiguousSpacing() }], "scroll-ps": [{ "scroll-ps": scaleUnambiguousSpacing() }], "scroll-pe": [{ "scroll-pe": scaleUnambiguousSpacing() }], "scroll-pt": [{ "scroll-pt": scaleUnambiguousSpacing() }], "scroll-pr": [{ "scroll-pr": scaleUnambiguousSpacing() }], "scroll-pb": [{ "scroll-pb": scaleUnambiguousSpacing() }], "scroll-pl": [{ "scroll-pl": scaleUnambiguousSpacing() }], "snap-align": [{ snap: [ "start", "end", "center", "align-none" ] }], "snap-stop": [{ snap: ["normal", "always"] }], "snap-type": [{ snap: [ "none", "x", "y", "both" ] }], "snap-strictness": [{ snap: ["mandatory", "proximity"] }], touch: [{ touch: [ "auto", "none", "manipulation" ] }], "touch-x": [{ "touch-pan": [ "x", "left", "right" ] }], "touch-y": [{ "touch-pan": [ "y", "up", "down" ] }], "touch-pz": ["touch-pinch-zoom"], select: [{ select: [ "none", "text", "all", "auto" ] }], "will-change": [{ "will-change": [ "auto", "scroll", "contents", "transform", isArbitraryVariable, isArbitraryValue ] }], fill: [{ fill: ["none", ...scaleColor()] }], "stroke-w": [{ stroke: [ isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber ] }], stroke: [{ stroke: ["none", ...scaleColor()] }], "forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }] }, conflictingClassGroups: { overflow: ["overflow-x", "overflow-y"], overscroll: ["overscroll-x", "overscroll-y"], inset: [ "inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left" ], "inset-x": ["right", "left"], "inset-y": ["top", "bottom"], flex: [ "basis", "grow", "shrink" ], gap: ["gap-x", "gap-y"], p: [ "px", "py", "ps", "pe", "pt", "pr", "pb", "pl" ], px: ["pr", "pl"], py: ["pt", "pb"], m: [ "mx", "my", "ms", "me", "mt", "mr", "mb", "ml" ], mx: ["mr", "ml"], my: ["mt", "mb"], size: ["w", "h"], "font-size": ["leading"], "fvn-normal": [ "fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction" ], "fvn-ordinal": ["fvn-normal"], "fvn-slashed-zero": ["fvn-normal"], "fvn-figure": ["fvn-normal"], "fvn-spacing": ["fvn-normal"], "fvn-fraction": ["fvn-normal"], "line-clamp": ["display", "overflow"], rounded: [ "rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl" ], "rounded-s": ["rounded-ss", "rounded-es"], "rounded-e": ["rounded-se", "rounded-ee"], "rounded-t": ["rounded-tl", "rounded-tr"], "rounded-r": ["rounded-tr", "rounded-br"], "rounded-b": ["rounded-br", "rounded-bl"], "rounded-l": ["rounded-tl", "rounded-bl"], "border-spacing": ["border-spacing-x", "border-spacing-y"], "border-w": [ "border-w-x", "border-w-y", "border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l" ], "border-w-x": ["border-w-r", "border-w-l"], "border-w-y": ["border-w-t", "border-w-b"], "border-color": [ "border-color-x", "border-color-y", "border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l" ], "border-color-x": ["border-color-r", "border-color-l"], "border-color-y": ["border-color-t", "border-color-b"], translate: [ "translate-x", "translate-y", "translate-none" ], "translate-none": [ "translate", "translate-x", "translate-y", "translate-z" ], "scroll-m": [ "scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml" ], "scroll-mx": ["scroll-mr", "scroll-ml"], "scroll-my": ["scroll-mt", "scroll-mb"], "scroll-p": [ "scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl" ], "scroll-px": ["scroll-pr", "scroll-pl"], "scroll-py": ["scroll-pt", "scroll-pb"], touch: [ "touch-x", "touch-y", "touch-pz" ], "touch-x": ["touch"], "touch-y": ["touch"], "touch-pz": ["touch"] }, conflictingClassGroupModifiers: { "font-size": ["leading"] }, orderSensitiveModifiers: [ "*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection" ] }; }; mergeConfigs = (baseConfig, { cacheSize, prefix, experimentalParseClassName, extend = {}, override = {} }) => { overrideProperty(baseConfig, "cacheSize", cacheSize); overrideProperty(baseConfig, "prefix", prefix); overrideProperty(baseConfig, "experimentalParseClassName", experimentalParseClassName); overrideConfigProperties(baseConfig.theme, override.theme); overrideConfigProperties(baseConfig.classGroups, override.classGroups); overrideConfigProperties(baseConfig.conflictingClassGroups, override.conflictingClassGroups); overrideConfigProperties(baseConfig.conflictingClassGroupModifiers, override.conflictingClassGroupModifiers); overrideProperty(baseConfig, "orderSensitiveModifiers", override.orderSensitiveModifiers); mergeConfigProperties(baseConfig.theme, extend.theme); mergeConfigProperties(baseConfig.classGroups, extend.classGroups); mergeConfigProperties(baseConfig.conflictingClassGroups, extend.conflictingClassGroups); mergeConfigProperties(baseConfig.conflictingClassGroupModifiers, extend.conflictingClassGroupModifiers); mergeArrayProperties(baseConfig, extend, "orderSensitiveModifiers"); return baseConfig; }; overrideProperty = (baseObject, overrideKey, overrideValue) => { if (overrideValue !== undefined) { baseObject[overrideKey] = overrideValue; } }; overrideConfigProperties = (baseObject, overrideObject) => { if (overrideObject) { for (const key in overrideObject) { overrideProperty(baseObject, key, overrideObject[key]); } } }; mergeConfigProperties = (baseObject, mergeObject) => { if (mergeObject) { for (const key in mergeObject) { mergeArrayProperties(baseObject, mergeObject, key); } } }; mergeArrayProperties = (baseObject, mergeObject, key) => { const mergeValue = mergeObject[key]; if (mergeValue !== undefined) { baseObject[key] = baseObject[key] ? baseObject[key].concat(mergeValue) : mergeValue; } }; extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === "function" ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig); twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig); })); //#endregion //#region node_modules/tailwind-variants/dist/index.js var createTwMerge, executeMerge, cn, cnMerge, createTV, tv; var init_dist$1 = __esmMin((() => { init_chunk_RZF76H2U(); init_chunk_LQJYWU4O(); init_bundle_mjs(); createTwMerge = (cachedTwMergeConfig) => { return isEmptyObject(cachedTwMergeConfig) ? twMerge : extendTailwindMerge({ ...cachedTwMergeConfig, extend: { theme: cachedTwMergeConfig.theme, classGroups: cachedTwMergeConfig.classGroups, conflictingClassGroupModifiers: cachedTwMergeConfig.conflictingClassGroupModifiers, conflictingClassGroups: cachedTwMergeConfig.conflictingClassGroups, ...cachedTwMergeConfig.extend } }); }; executeMerge = (classnames, config) => { const base = cx(classnames); if (!base || !(config?.twMerge ?? true)) return base; if (!state.cachedTwMerge || state.didTwMergeConfigChange) { state.didTwMergeConfigChange = false; state.cachedTwMerge = createTwMerge(state.cachedTwMergeConfig); } return state.cachedTwMerge(base) || void 0; }; cn = (...classnames) => { return executeMerge(classnames, {}); }; cnMerge = (...classnames) => { return (config) => executeMerge(classnames, config); }; ({createTV, tv} = getTailwindVariants(cnMerge)); })); //#endregion //#region node_modules/@mariozechner/mini-lit/dist/component.js function mergeBaseProps(props) { const userProps = props ?? {}; const className = userProps.className && userProps.className.type === "classname" ? userProps.className : basePropDefinitions.className; const children = userProps.children && userProps.children.type === "children" ? userProps.children : basePropDefinitions.children; return { ...userProps, className, children }; } function getDefaultVariants(def) { const defaults = {}; if (def.variants) { for (const [key, value] of Object.entries(def.variants)) { defaults[key] = value.default; } } return defaults; } function getDefaultProps(def) { const defaults = {}; if (def.variants) { for (const [key, value] of Object.entries(def.variants)) { defaults[key] = value.default; } } const propDefinitions = mergeBaseProps(def.props); for (const [key, value] of Object.entries(propDefinitions)) { defaults[key] = value.default; } return defaults; } function defineComponent(definition) { const props = { ...definition.props || {} }; if (definition.slots) { for (const slotName of definition.slots) { if (slotName !== "base") { const propName = `${slotName}ClassName`; if (!props[propName]) { props[propName] = { type: "classname", default: undefined, description: `Additional CSS classes for the ${slotName} element` }; } } } } const propsWithBase = mergeBaseProps(props); return { ...definition, props: propsWithBase }; } function styleComponent(_definition, styles$1) { return styles$1; } function renderComponent(_definition, _styles, render$1) { return render$1; } function extractVariantProps(props, definition) { const variantProps = {}; if (definition.variants) { for (const key of Object.keys(definition.variants)) { if (key in props) { variantProps[key] = props[key]; } } } return variantProps; } function hasSlots(styles$1) { return "slots" in styles$1; } function createComponent(definition, styles$1, render$1) { const tvConfig = { ...styles$1, defaultVariants: styles$1.defaultVariants || getDefaultVariants(definition) }; const tvInstance = tv(tvConfig); const component = fc((props) => { const propsWithDefaults = { ...getDefaultProps(definition), ...props }; if (hasSlots(styles$1)) { const variantProps = extractVariantProps(propsWithDefaults, definition); const slots = tvInstance({ ...variantProps }); const slotFunctions = {}; for (const [slotName, slotFn] of Object.entries(slots)) { slotFunctions[slotName] = (overrides) => { const slotClassNameProp = slotName === "base" ? propsWithDefaults.className : propsWithDefaults[`${slotName}ClassName`]; const classOverride = overrides?.class || overrides?.className || slotClassNameProp; return slotFn({ class: classOverride }); }; } const typedRender = render$1; return typedRender(propsWithDefaults, slotFunctions); } else { const className = (overrides) => { const variantProps = extractVariantProps(propsWithDefaults, definition); const userClassName = overrides || propsWithDefaults.className; return String(tvInstance({ ...variantProps, class: userClassName })); }; const typedRender = render$1; return typedRender(propsWithDefaults, className); } }); component.__def = definition; return component; } var basePropDefinitions, ComponentLitBase; var init_component$1 = __esmMin((() => { init_lit(); init_dist$1(); init_mini(); basePropDefinitions = { children: { type: "children", default: undefined, description: "Component content" }, className: { type: "classname", default: undefined, description: "Additional CSS classes to apply" } }; ComponentLitBase = class extends i { createRenderRoot() { return this; } get tvInstance() { if (!this._tvInstance) { const tvConfig = { ...this.styles, defaultVariants: this.styles.defaultVariants || getDefaultVariants(this.definition) }; this._tvInstance = tv(tvConfig); } return this._tvInstance; } connectedCallback() { super.connectedCallback(); const defaults = getDefaultProps(this.definition); Object.entries(defaults).forEach(([key, value]) => { if (this[key] === undefined) { this[key] = value; } }); } render() { if (!this._children && this.childNodes.length > 0) { this._children = Array.from(this.childNodes); } const props = {}; if (this.definition?.variants) { for (const key of Object.keys(this.definition.variants)) { props[key] = this[key]; } } if (this.definition?.props) { for (const key of Object.keys(this.definition.props)) { if (key === "children") { props[key] = this._children || Array.from(this.childNodes); } else { props[key] = this[key]; } } } props.className = this.className; if (hasSlots(this.styles)) { const variantProps = extractVariantProps(props, this.definition); const slotsResult = this.tvInstance({ ...variantProps }); const slots = typeof slotsResult === "function" ? {} : slotsResult; const slotFunctions = {}; for (const [slotName, slotFn] of Object.entries(slots)) { slotFunctions[slotName] = (overrides) => { const slotClassNameProp = slotName === "base" ? props.className : props[`${slotName}ClassName`]; const classOverride = overrides?.class || overrides?.className || slotClassNameProp; return slotFn({ class: classOverride }); }; } const typedRender = this.renderFn; return typedRender(props, slotFunctions); } else { const className = (overrides) => { const variantProps = extractVariantProps(props, this.definition); const userClassName = overrides || props.className; return String(this.tvInstance({ ...variantProps, class: userClassName })); }; const typedRender = this.renderFn; return typedRender(props, className); } } }; })); //#endregion //#region node_modules/@mariozechner/mini-lit/dist/i18n.js /** * Set custom translations for your app * * @example * import { setTranslations } from '@mariozechner/mini-lit'; * * // Your messages must include all MiniLitRequiredMessages * const myTranslations = { * en: { * // Required mini-lit messages * "Copy": "Copy", * "Copied!": "Copied!", * // ... all other required messages * * // Your app messages * "Welcome": "Welcome", * "Settings": "Settings", * }, * de: { * // Required mini-lit messages * "Copy": "Kopieren", * "Copied!": "Kopiert!", * // ... all other required messages * * // Your app messages * "Welcome": "Willkommen", * "Settings": "Einstellungen", * } * }; * * setTranslations(myTranslations); */ function setTranslations(customTranslations) { userTranslations = customTranslations; translations$1 = customTranslations; } /** * Get current translations */ function getTranslations() { return translations$1; } function getCurrentLanguage() { const stored = localStorage.getItem("language"); if (stored && translations$1[stored]) { return stored; } const userLocale = navigator.language || navigator.userLanguage; const languageCode = userLocale ? userLocale.split("-")[0] : "en"; return translations$1[languageCode] ? languageCode : "en"; } function setLanguage(code) { localStorage.setItem("language", code); window.location.reload(); } function i18n(categoryOrKey, key) { const languageCode = getCurrentLanguage(); const implementation = translations$1[languageCode] || translations$1.en; if (key === undefined) { const value = implementation[categoryOrKey]; if (!value) { if (typeof value === "function") { return value; } console.error(`Unknown i18n key: ${categoryOrKey}`); return categoryOrKey; } return value; } else { const category = implementation[categoryOrKey]; if (!category || typeof category !== "object") { console.error(`Unknown i18n category: ${categoryOrKey}`); return key; } const value = category[key]; if (!value) { console.error(`Unknown i18n key: ${categoryOrKey}.${key}`); return key; } return value; } } var defaultEnglish, defaultGerman, userTranslations, translations$1, i18n_default; var init_i18n$1 = __esmMin((() => { defaultEnglish = { "*": "*", Copy: "Copy", "Copy code": "Copy code", "Copied!": "Copied!", Download: "Download", Close: "Close", Preview: "Preview", Code: "Code", "Loading...": "Loading...", "Select an option": "Select an option", "Mode 1": "Mode 1", "Mode 2": "Mode 2", Required: "Required", Optional: "Optional", "Input Required": "Input Required", Cancel: "Cancel", Confirm: "Confirm" }; defaultGerman = { "*": "*", Copy: "Kopieren", "Copy code": "Code kopieren", "Copied!": "Kopiert!", Download: "Herunterladen", Close: "Schließen", Preview: "Vorschau", Code: "Code", "Loading...": "Laden...", "Select an option": "Option auswählen", "Mode 1": "Modus 1", "Mode 2": "Modus 2", Required: "Erforderlich", Optional: "Optional", "Input Required": "Eingabe erforderlich", Cancel: "Abbrechen", Confirm: "Bestätigen" }; userTranslations = null; translations$1 = { en: defaultEnglish, de: defaultGerman }; i18n_default = i18n; })); //#endregion //#region node_modules/lit-html/directives/unsafe-html.js var e$3, o; var init_unsafe_html$1 = __esmMin((() => { init_lit_html(); init_directive(); e$3 = class extends i$2 { constructor(i$7) { if (super(i$7), this.it = E$1, i$7.type !== t$1.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings"); } render(r$10) { if (r$10 === E$1 || null == r$10) return this._t = void 0, this.it = r$10; if (r$10 === T$2) return r$10; if ("string" != typeof r$10) throw Error(this.constructor.directiveName + "() called with a non-string value"); if (r$10 === this.it) return this._t; this.it = r$10; const s$5 = [r$10]; return s$5.raw = s$5, this._t = { _$litType$: this.constructor.resultType, strings: s$5, values: [] }; } }; e$3.directiveName = "unsafeHTML", e$3.resultType = 1; o = e$2(e$3); })); //#endregion //#region node_modules/lit/directives/unsafe-html.js var init_unsafe_html = __esmMin((() => { init_unsafe_html$1(); })); //#endregion //#region node_modules/lucide/dist/esm/defaultAttributes.js var defaultAttributes; var init_defaultAttributes = __esmMin((() => { defaultAttributes = { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": 2, "stroke-linecap": "round", "stroke-linejoin": "round" }; })); //#endregion //#region node_modules/lucide/dist/esm/createElement.js var createSVGElement, createElement; var init_createElement = __esmMin((() => { init_defaultAttributes(); createSVGElement = ([tag, attrs, children]) => { const element = document.createElementNS("http://www.w3.org/2000/svg", tag); Object.keys(attrs).forEach((name) => { element.setAttribute(name, String(attrs[name])); }); if (children?.length) { children.forEach((child) => { const childElement = createSVGElement(child); element.appendChild(childElement); }); } return element; }; createElement = (iconNode, customAttrs = {}) => { const tag = "svg"; const attrs = { ...defaultAttributes, ...customAttrs }; return createSVGElement([ tag, attrs, iconNode ]); }; })); //#endregion //#region node_modules/lucide/dist/esm/replaceElement.js var getAttrs, getClassNames, combineClassNames, toPascalCase, replaceElement; var init_replaceElement = __esmMin((() => { init_createElement(); init_defaultAttributes(); getAttrs = (element) => Array.from(element.attributes).reduce((attrs, attr) => { attrs[attr.name] = attr.value; return attrs; }, {}); getClassNames = (attrs) => { if (typeof attrs === "string") return attrs; if (!attrs || !attrs.class) return ""; if (attrs.class && typeof attrs.class === "string") { return attrs.class.split(" "); } if (attrs.class && Array.isArray(attrs.class)) { return attrs.class; } return ""; }; combineClassNames = (arrayOfClassnames) => { const classNameArray = arrayOfClassnames.flatMap(getClassNames); return classNameArray.map((classItem) => classItem.trim()).filter(Boolean).filter((value, index, self$1) => self$1.indexOf(value) === index).join(" "); }; toPascalCase = (string) => string.replace(/(\w)(\w*)(_|-|\s*)/g, (g0, g1, g2) => g1.toUpperCase() + g2.toLowerCase()); replaceElement = (element, { nameAttr, icons, attrs }) => { const iconName = element.getAttribute(nameAttr); if (iconName == null) return; const ComponentName = toPascalCase(iconName); const iconNode = icons[ComponentName]; if (!iconNode) { return console.warn(`${element.outerHTML} icon name was not found in the provided icons object.`); } const elementAttrs = getAttrs(element); const iconAttrs = { ...defaultAttributes, "data-lucide": iconName, ...attrs, ...elementAttrs }; const classNames = combineClassNames([ "lucide", `lucide-${iconName}`, elementAttrs, attrs ]); if (classNames) { Object.assign(iconAttrs, { class: classNames }); } const svgElement = createElement(iconNode, iconAttrs); return element.parentNode?.replaceChild(svgElement, element); }; })); //#endregion //#region node_modules/lucide/dist/esm/icons/a-arrow-down.js var AArrowDown; var init_a_arrow_down = __esmMin((() => { AArrowDown = [ ["path", { d: "m14 12 4 4 4-4" }], ["path", { d: "M18 16V7" }], ["path", { d: "m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16" }], ["path", { d: "M3.304 13h6.392" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/a-arrow-up.js var AArrowUp; var init_a_arrow_up = __esmMin((() => { AArrowUp = [ ["path", { d: "m14 11 4-4 4 4" }], ["path", { d: "M18 16V7" }], ["path", { d: "m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16" }], ["path", { d: "M3.304 13h6.392" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/a-large-small.js var ALargeSmall; var init_a_large_small = __esmMin((() => { ALargeSmall = [ ["path", { d: "m15 16 2.536-7.328a1.02 1.02 1 0 1 1.928 0L22 16" }], ["path", { d: "M15.697 14h5.606" }], ["path", { d: "m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16" }], ["path", { d: "M3.304 13h6.392" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/accessibility.js var Accessibility; var init_accessibility = __esmMin((() => { Accessibility = [ ["circle", { cx: "16", cy: "4", r: "1" }], ["path", { d: "m18 19 1-7-6 1" }], ["path", { d: "m5 8 3-3 5.5 3-2.36 3.5" }], ["path", { d: "M4.24 14.5a5 5 0 0 0 6.88 6" }], ["path", { d: "M13.76 17.5a5 5 0 0 0-6.88-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/activity.js var Activity; var init_activity = __esmMin((() => { Activity = [["path", { d: "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/air-vent.js var AirVent; var init_air_vent = __esmMin((() => { AirVent = [ ["path", { d: "M18 17.5a2.5 2.5 0 1 1-4 2.03V12" }], ["path", { d: "M6 12H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2" }], ["path", { d: "M6 8h12" }], ["path", { d: "M6.6 15.572A2 2 0 1 0 10 17v-5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/airplay.js var Airplay; var init_airplay = __esmMin((() => { Airplay = [["path", { d: "M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1" }], ["path", { d: "m12 15 5 6H7Z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/alarm-clock-check.js var AlarmClockCheck; var init_alarm_clock_check = __esmMin((() => { AlarmClockCheck = [ ["circle", { cx: "12", cy: "13", r: "8" }], ["path", { d: "M5 3 2 6" }], ["path", { d: "m22 6-3-3" }], ["path", { d: "M6.38 18.7 4 21" }], ["path", { d: "M17.64 18.67 20 21" }], ["path", { d: "m9 13 2 2 4-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/alarm-clock-minus.js var AlarmClockMinus; var init_alarm_clock_minus = __esmMin((() => { AlarmClockMinus = [ ["circle", { cx: "12", cy: "13", r: "8" }], ["path", { d: "M5 3 2 6" }], ["path", { d: "m22 6-3-3" }], ["path", { d: "M6.38 18.7 4 21" }], ["path", { d: "M17.64 18.67 20 21" }], ["path", { d: "M9 13h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/alarm-clock-off.js var AlarmClockOff; var init_alarm_clock_off = __esmMin((() => { AlarmClockOff = [ ["path", { d: "M6.87 6.87a8 8 0 1 0 11.26 11.26" }], ["path", { d: "M19.9 14.25a8 8 0 0 0-9.15-9.15" }], ["path", { d: "m22 6-3-3" }], ["path", { d: "M6.26 18.67 4 21" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M4 4 2 6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/alarm-clock-plus.js var AlarmClockPlus; var init_alarm_clock_plus = __esmMin((() => { AlarmClockPlus = [ ["circle", { cx: "12", cy: "13", r: "8" }], ["path", { d: "M5 3 2 6" }], ["path", { d: "m22 6-3-3" }], ["path", { d: "M6.38 18.7 4 21" }], ["path", { d: "M17.64 18.67 20 21" }], ["path", { d: "M12 10v6" }], ["path", { d: "M9 13h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/alarm-clock.js var AlarmClock; var init_alarm_clock = __esmMin((() => { AlarmClock = [ ["circle", { cx: "12", cy: "13", r: "8" }], ["path", { d: "M12 9v4l2 2" }], ["path", { d: "M5 3 2 6" }], ["path", { d: "m22 6-3-3" }], ["path", { d: "M6.38 18.7 4 21" }], ["path", { d: "M17.64 18.67 20 21" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/alarm-smoke.js var AlarmSmoke; var init_alarm_smoke = __esmMin((() => { AlarmSmoke = [ ["path", { d: "M11 21c0-2.5 2-2.5 2-5" }], ["path", { d: "M16 21c0-2.5 2-2.5 2-5" }], ["path", { d: "m19 8-.8 3a1.25 1.25 0 0 1-1.2 1H7a1.25 1.25 0 0 1-1.2-1L5 8" }], ["path", { d: "M21 3a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a1 1 0 0 1 1-1z" }], ["path", { d: "M6 21c0-2.5 2-2.5 2-5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/album.js var Album; var init_album = __esmMin((() => { Album = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }], ["polyline", { points: "11 3 11 11 14 8 17 11 17 3" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-center-horizontal.js var AlignCenterHorizontal; var init_align_center_horizontal = __esmMin((() => { AlignCenterHorizontal = [ ["path", { d: "M2 12h20" }], ["path", { d: "M10 16v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4" }], ["path", { d: "M10 8V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v4" }], ["path", { d: "M20 16v1a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-1" }], ["path", { d: "M14 8V7c0-1.1.9-2 2-2h2a2 2 0 0 1 2 2v1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-center-vertical.js var AlignCenterVertical; var init_align_center_vertical = __esmMin((() => { AlignCenterVertical = [ ["path", { d: "M12 2v20" }], ["path", { d: "M8 10H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h4" }], ["path", { d: "M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4" }], ["path", { d: "M8 20H7a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2h1" }], ["path", { d: "M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-end-horizontal.js var AlignEndHorizontal; var init_align_end_horizontal = __esmMin((() => { AlignEndHorizontal = [ ["rect", { width: "6", height: "16", x: "4", y: "2", rx: "2" }], ["rect", { width: "6", height: "9", x: "14", y: "9", rx: "2" }], ["path", { d: "M22 22H2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-end-vertical.js var AlignEndVertical; var init_align_end_vertical = __esmMin((() => { AlignEndVertical = [ ["rect", { width: "16", height: "6", x: "2", y: "4", rx: "2" }], ["rect", { width: "9", height: "6", x: "9", y: "14", rx: "2" }], ["path", { d: "M22 22V2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-horizontal-distribute-center.js var AlignHorizontalDistributeCenter; var init_align_horizontal_distribute_center = __esmMin((() => { AlignHorizontalDistributeCenter = [ ["rect", { width: "6", height: "14", x: "4", y: "5", rx: "2" }], ["rect", { width: "6", height: "10", x: "14", y: "7", rx: "2" }], ["path", { d: "M17 22v-5" }], ["path", { d: "M17 7V2" }], ["path", { d: "M7 22v-3" }], ["path", { d: "M7 5V2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-horizontal-distribute-end.js var AlignHorizontalDistributeEnd; var init_align_horizontal_distribute_end = __esmMin((() => { AlignHorizontalDistributeEnd = [ ["rect", { width: "6", height: "14", x: "4", y: "5", rx: "2" }], ["rect", { width: "6", height: "10", x: "14", y: "7", rx: "2" }], ["path", { d: "M10 2v20" }], ["path", { d: "M20 2v20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-horizontal-justify-center.js var AlignHorizontalJustifyCenter; var init_align_horizontal_justify_center = __esmMin((() => { AlignHorizontalJustifyCenter = [ ["rect", { width: "6", height: "14", x: "2", y: "5", rx: "2" }], ["rect", { width: "6", height: "10", x: "16", y: "7", rx: "2" }], ["path", { d: "M12 2v20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-horizontal-distribute-start.js var AlignHorizontalDistributeStart; var init_align_horizontal_distribute_start = __esmMin((() => { AlignHorizontalDistributeStart = [ ["rect", { width: "6", height: "14", x: "4", y: "5", rx: "2" }], ["rect", { width: "6", height: "10", x: "14", y: "7", rx: "2" }], ["path", { d: "M4 2v20" }], ["path", { d: "M14 2v20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-horizontal-justify-end.js var AlignHorizontalJustifyEnd; var init_align_horizontal_justify_end = __esmMin((() => { AlignHorizontalJustifyEnd = [ ["rect", { width: "6", height: "14", x: "2", y: "5", rx: "2" }], ["rect", { width: "6", height: "10", x: "12", y: "7", rx: "2" }], ["path", { d: "M22 2v20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-horizontal-space-around.js var AlignHorizontalSpaceAround; var init_align_horizontal_space_around = __esmMin((() => { AlignHorizontalSpaceAround = [ ["rect", { width: "6", height: "10", x: "9", y: "7", rx: "2" }], ["path", { d: "M4 22V2" }], ["path", { d: "M20 22V2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-horizontal-justify-start.js var AlignHorizontalJustifyStart; var init_align_horizontal_justify_start = __esmMin((() => { AlignHorizontalJustifyStart = [ ["rect", { width: "6", height: "14", x: "6", y: "5", rx: "2" }], ["rect", { width: "6", height: "10", x: "16", y: "7", rx: "2" }], ["path", { d: "M2 2v20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-horizontal-space-between.js var AlignHorizontalSpaceBetween; var init_align_horizontal_space_between = __esmMin((() => { AlignHorizontalSpaceBetween = [ ["rect", { width: "6", height: "14", x: "3", y: "5", rx: "2" }], ["rect", { width: "6", height: "10", x: "15", y: "7", rx: "2" }], ["path", { d: "M3 2v20" }], ["path", { d: "M21 2v20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-start-horizontal.js var AlignStartHorizontal; var init_align_start_horizontal = __esmMin((() => { AlignStartHorizontal = [ ["rect", { width: "6", height: "16", x: "4", y: "6", rx: "2" }], ["rect", { width: "6", height: "9", x: "14", y: "6", rx: "2" }], ["path", { d: "M22 2H2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-start-vertical.js var AlignStartVertical; var init_align_start_vertical = __esmMin((() => { AlignStartVertical = [ ["rect", { width: "9", height: "6", x: "6", y: "14", rx: "2" }], ["rect", { width: "16", height: "6", x: "6", y: "4", rx: "2" }], ["path", { d: "M2 2v20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-vertical-distribute-center.js var AlignVerticalDistributeCenter; var init_align_vertical_distribute_center = __esmMin((() => { AlignVerticalDistributeCenter = [ ["path", { d: "M22 17h-3" }], ["path", { d: "M22 7h-5" }], ["path", { d: "M5 17H2" }], ["path", { d: "M7 7H2" }], ["rect", { x: "5", y: "14", width: "14", height: "6", rx: "2" }], ["rect", { x: "7", y: "4", width: "10", height: "6", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-vertical-distribute-end.js var AlignVerticalDistributeEnd; var init_align_vertical_distribute_end = __esmMin((() => { AlignVerticalDistributeEnd = [ ["rect", { width: "14", height: "6", x: "5", y: "14", rx: "2" }], ["rect", { width: "10", height: "6", x: "7", y: "4", rx: "2" }], ["path", { d: "M2 20h20" }], ["path", { d: "M2 10h20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-vertical-distribute-start.js var AlignVerticalDistributeStart; var init_align_vertical_distribute_start = __esmMin((() => { AlignVerticalDistributeStart = [ ["rect", { width: "14", height: "6", x: "5", y: "14", rx: "2" }], ["rect", { width: "10", height: "6", x: "7", y: "4", rx: "2" }], ["path", { d: "M2 14h20" }], ["path", { d: "M2 4h20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-vertical-justify-center.js var AlignVerticalJustifyCenter; var init_align_vertical_justify_center = __esmMin((() => { AlignVerticalJustifyCenter = [ ["rect", { width: "14", height: "6", x: "5", y: "16", rx: "2" }], ["rect", { width: "10", height: "6", x: "7", y: "2", rx: "2" }], ["path", { d: "M2 12h20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-vertical-justify-end.js var AlignVerticalJustifyEnd; var init_align_vertical_justify_end = __esmMin((() => { AlignVerticalJustifyEnd = [ ["rect", { width: "14", height: "6", x: "5", y: "12", rx: "2" }], ["rect", { width: "10", height: "6", x: "7", y: "2", rx: "2" }], ["path", { d: "M2 22h20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-vertical-justify-start.js var AlignVerticalJustifyStart; var init_align_vertical_justify_start = __esmMin((() => { AlignVerticalJustifyStart = [ ["rect", { width: "14", height: "6", x: "5", y: "16", rx: "2" }], ["rect", { width: "10", height: "6", x: "7", y: "6", rx: "2" }], ["path", { d: "M2 2h20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-vertical-space-around.js var AlignVerticalSpaceAround; var init_align_vertical_space_around = __esmMin((() => { AlignVerticalSpaceAround = [ ["rect", { width: "10", height: "6", x: "7", y: "9", rx: "2" }], ["path", { d: "M22 20H2" }], ["path", { d: "M22 4H2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/align-vertical-space-between.js var AlignVerticalSpaceBetween; var init_align_vertical_space_between = __esmMin((() => { AlignVerticalSpaceBetween = [ ["rect", { width: "14", height: "6", x: "5", y: "15", rx: "2" }], ["rect", { width: "10", height: "6", x: "7", y: "3", rx: "2" }], ["path", { d: "M2 21h20" }], ["path", { d: "M2 3h20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ambulance.js var Ambulance; var init_ambulance = __esmMin((() => { Ambulance = [ ["path", { d: "M10 10H6" }], ["path", { d: "M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2" }], ["path", { d: "M19 18h2a1 1 0 0 0 1-1v-3.28a1 1 0 0 0-.684-.948l-1.923-.641a1 1 0 0 1-.578-.502l-1.539-3.076A1 1 0 0 0 16.382 8H14" }], ["path", { d: "M8 8v4" }], ["path", { d: "M9 18h6" }], ["circle", { cx: "17", cy: "18", r: "2" }], ["circle", { cx: "7", cy: "18", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ampersand.js var Ampersand; var init_ampersand = __esmMin((() => { Ampersand = [["path", { d: "M16 12h3" }], ["path", { d: "M17.5 12a8 8 0 0 1-8 8A4.5 4.5 0 0 1 5 15.5c0-6 8-4 8-8.5a3 3 0 1 0-6 0c0 3 2.5 8.5 12 13" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ampersands.js var Ampersands; var init_ampersands = __esmMin((() => { Ampersands = [["path", { d: "M10 17c-5-3-7-7-7-9a2 2 0 0 1 4 0c0 2.5-5 2.5-5 6 0 1.7 1.3 3 3 3 2.8 0 5-2.2 5-5" }], ["path", { d: "M22 17c-5-3-7-7-7-9a2 2 0 0 1 4 0c0 2.5-5 2.5-5 6 0 1.7 1.3 3 3 3 2.8 0 5-2.2 5-5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/amphora.js var Amphora; var init_amphora = __esmMin((() => { Amphora = [ ["path", { d: "M10 2v5.632c0 .424-.272.795-.653.982A6 6 0 0 0 6 14c.006 4 3 7 5 8" }], ["path", { d: "M10 5H8a2 2 0 0 0 0 4h.68" }], ["path", { d: "M14 2v5.632c0 .424.272.795.652.982A6 6 0 0 1 18 14c0 4-3 7-5 8" }], ["path", { d: "M14 5h2a2 2 0 0 1 0 4h-.68" }], ["path", { d: "M18 22H6" }], ["path", { d: "M9 2h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/anchor.js var Anchor$1; var init_anchor = __esmMin((() => { Anchor$1 = [ ["path", { d: "M12 6v16" }], ["path", { d: "m19 13 2-1a9 9 0 0 1-18 0l2 1" }], ["path", { d: "M9 11h6" }], ["circle", { cx: "12", cy: "4", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/angry.js var Angry; var init_angry = __esmMin((() => { Angry = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M16 16s-1.5-2-4-2-4 2-4 2" }], ["path", { d: "M7.5 8 10 9" }], ["path", { d: "m14 9 2.5-1" }], ["path", { d: "M9 10h.01" }], ["path", { d: "M15 10h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/annoyed.js var Annoyed; var init_annoyed = __esmMin((() => { Annoyed = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M8 15h8" }], ["path", { d: "M8 9h2" }], ["path", { d: "M14 9h2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/antenna.js var Antenna; var init_antenna = __esmMin((() => { Antenna = [ ["path", { d: "M2 12 7 2" }], ["path", { d: "m7 12 5-10" }], ["path", { d: "m12 12 5-10" }], ["path", { d: "m17 12 5-10" }], ["path", { d: "M4.5 7h15" }], ["path", { d: "M12 16v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/anvil.js var Anvil; var init_anvil = __esmMin((() => { Anvil = [ ["path", { d: "M7 10H6a4 4 0 0 1-4-4 1 1 0 0 1 1-1h4" }], ["path", { d: "M7 5a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1 7 7 0 0 1-7 7H8a1 1 0 0 1-1-1z" }], ["path", { d: "M9 12v5" }], ["path", { d: "M15 12v5" }], ["path", { d: "M5 20a3 3 0 0 1 3-3h8a3 3 0 0 1 3 3 1 1 0 0 1-1 1H6a1 1 0 0 1-1-1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/aperture.js var Aperture; var init_aperture = __esmMin((() => { Aperture = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "m14.31 8 5.74 9.94" }], ["path", { d: "M9.69 8h11.48" }], ["path", { d: "m7.38 12 5.74-9.94" }], ["path", { d: "M9.69 16 3.95 6.06" }], ["path", { d: "M14.31 16H2.83" }], ["path", { d: "m16.62 12-5.74 9.94" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/app-window-mac.js var AppWindowMac; var init_app_window_mac = __esmMin((() => { AppWindowMac = [ ["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2" }], ["path", { d: "M6 8h.01" }], ["path", { d: "M10 8h.01" }], ["path", { d: "M14 8h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/app-window.js var AppWindow; var init_app_window = __esmMin((() => { AppWindow = [ ["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }], ["path", { d: "M10 4v4" }], ["path", { d: "M2 8h20" }], ["path", { d: "M6 4v4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/apple.js var Apple; var init_apple = __esmMin((() => { Apple = [["path", { d: "M12 6.528V3a1 1 0 0 1 1-1h0" }], ["path", { d: "M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/archive-restore.js var ArchiveRestore; var init_archive_restore = __esmMin((() => { ArchiveRestore = [ ["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1" }], ["path", { d: "M4 8v11a2 2 0 0 0 2 2h2" }], ["path", { d: "M20 8v11a2 2 0 0 1-2 2h-2" }], ["path", { d: "m9 15 3-3 3 3" }], ["path", { d: "M12 12v9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/archive-x.js var ArchiveX; var init_archive_x = __esmMin((() => { ArchiveX = [ ["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1" }], ["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8" }], ["path", { d: "m9.5 17 5-5" }], ["path", { d: "m9.5 12 5 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/archive.js var Archive; var init_archive = __esmMin((() => { Archive = [ ["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1" }], ["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8" }], ["path", { d: "M10 12h4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-big-down-dash.js var ArrowBigDownDash; var init_arrow_big_down_dash = __esmMin((() => { ArrowBigDownDash = [["path", { d: "M15 11a1 1 0 0 0 1 1h2.939a1 1 0 0 1 .75 1.811l-6.835 6.836a1.207 1.207 0 0 1-1.707 0L4.31 13.81a1 1 0 0 1 .75-1.811H8a1 1 0 0 0 1-1V9a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1z" }], ["path", { d: "M9 4h6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/armchair.js var Armchair; var init_armchair = __esmMin((() => { Armchair = [ ["path", { d: "M19 9V6a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v3" }], ["path", { d: "M3 16a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5a2 2 0 0 0-4 0v1.5a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5V11a2 2 0 0 0-4 0z" }], ["path", { d: "M5 18v2" }], ["path", { d: "M19 18v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-big-down.js var ArrowBigDown; var init_arrow_big_down = __esmMin((() => { ArrowBigDown = [["path", { d: "M15 11a1 1 0 0 0 1 1h2.939a1 1 0 0 1 .75 1.811l-6.835 6.836a1.207 1.207 0 0 1-1.707 0L4.31 13.81a1 1 0 0 1 .75-1.811H8a1 1 0 0 0 1-1V5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-big-left-dash.js var ArrowBigLeftDash; var init_arrow_big_left_dash = __esmMin((() => { ArrowBigLeftDash = [["path", { d: "M13 9a1 1 0 0 1-1-1V5.061a1 1 0 0 0-1.811-.75l-6.835 6.836a1.207 1.207 0 0 0 0 1.707l6.835 6.835a1 1 0 0 0 1.811-.75V16a1 1 0 0 1 1-1h2a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1z" }], ["path", { d: "M20 9v6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-big-left.js var ArrowBigLeft; var init_arrow_big_left = __esmMin((() => { ArrowBigLeft = [["path", { d: "M13 9a1 1 0 0 1-1-1V5.061a1 1 0 0 0-1.811-.75l-6.835 6.836a1.207 1.207 0 0 0 0 1.707l6.835 6.835a1 1 0 0 0 1.811-.75V16a1 1 0 0 1 1-1h6a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-big-right-dash.js var ArrowBigRightDash; var init_arrow_big_right_dash = __esmMin((() => { ArrowBigRightDash = [["path", { d: "M11 9a1 1 0 0 0 1-1V5.061a1 1 0 0 1 1.811-.75l6.836 6.836a1.207 1.207 0 0 1 0 1.707l-6.836 6.835a1 1 0 0 1-1.811-.75V16a1 1 0 0 0-1-1H9a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1z" }], ["path", { d: "M4 9v6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-big-right.js var ArrowBigRight; var init_arrow_big_right = __esmMin((() => { ArrowBigRight = [["path", { d: "M11 9a1 1 0 0 0 1-1V5.061a1 1 0 0 1 1.811-.75l6.836 6.836a1.207 1.207 0 0 1 0 1.707l-6.836 6.835a1 1 0 0 1-1.811-.75V16a1 1 0 0 0-1-1H5a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-big-up-dash.js var ArrowBigUpDash; var init_arrow_big_up_dash = __esmMin((() => { ArrowBigUpDash = [["path", { d: "M9 13a1 1 0 0 0-1-1H5.061a1 1 0 0 1-.75-1.811l6.836-6.835a1.207 1.207 0 0 1 1.707 0l6.835 6.835a1 1 0 0 1-.75 1.811H16a1 1 0 0 0-1 1v2a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1z" }], ["path", { d: "M9 20h6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-big-up.js var ArrowBigUp; var init_arrow_big_up = __esmMin((() => { ArrowBigUp = [["path", { d: "M9 13a1 1 0 0 0-1-1H5.061a1 1 0 0 1-.75-1.811l6.836-6.835a1.207 1.207 0 0 1 1.707 0l6.835 6.835a1 1 0 0 1-.75 1.811H16a1 1 0 0 0-1 1v6a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-down-0-1.js var ArrowDown01; var init_arrow_down_0_1 = __esmMin((() => { ArrowDown01 = [ ["path", { d: "m3 16 4 4 4-4" }], ["path", { d: "M7 20V4" }], ["rect", { x: "15", y: "4", width: "4", height: "6", ry: "2" }], ["path", { d: "M17 20v-6h-2" }], ["path", { d: "M15 20h4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-down-1-0.js var ArrowDown10; var init_arrow_down_1_0 = __esmMin((() => { ArrowDown10 = [ ["path", { d: "m3 16 4 4 4-4" }], ["path", { d: "M7 20V4" }], ["path", { d: "M17 10V4h-2" }], ["path", { d: "M15 10h4" }], ["rect", { x: "15", y: "14", width: "4", height: "6", ry: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-down-a-z.js var ArrowDownAZ; var init_arrow_down_a_z = __esmMin((() => { ArrowDownAZ = [ ["path", { d: "m3 16 4 4 4-4" }], ["path", { d: "M7 20V4" }], ["path", { d: "M20 8h-5" }], ["path", { d: "M15 10V6.5a2.5 2.5 0 0 1 5 0V10" }], ["path", { d: "M15 14h5l-5 6h5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-down-from-line.js var ArrowDownFromLine; var init_arrow_down_from_line = __esmMin((() => { ArrowDownFromLine = [ ["path", { d: "M19 3H5" }], ["path", { d: "M12 21V7" }], ["path", { d: "m6 15 6 6 6-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-down-left.js var ArrowDownLeft; var init_arrow_down_left = __esmMin((() => { ArrowDownLeft = [["path", { d: "M17 7 7 17" }], ["path", { d: "M17 17H7V7" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-down-narrow-wide.js var ArrowDownNarrowWide; var init_arrow_down_narrow_wide = __esmMin((() => { ArrowDownNarrowWide = [ ["path", { d: "m3 16 4 4 4-4" }], ["path", { d: "M7 20V4" }], ["path", { d: "M11 4h4" }], ["path", { d: "M11 8h7" }], ["path", { d: "M11 12h10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-down-right.js var ArrowDownRight; var init_arrow_down_right = __esmMin((() => { ArrowDownRight = [["path", { d: "m7 7 10 10" }], ["path", { d: "M17 7v10H7" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-down-to-dot.js var ArrowDownToDot; var init_arrow_down_to_dot = __esmMin((() => { ArrowDownToDot = [ ["path", { d: "M12 2v14" }], ["path", { d: "m19 9-7 7-7-7" }], ["circle", { cx: "12", cy: "21", r: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-down-to-line.js var ArrowDownToLine; var init_arrow_down_to_line = __esmMin((() => { ArrowDownToLine = [ ["path", { d: "M12 17V3" }], ["path", { d: "m6 11 6 6 6-6" }], ["path", { d: "M19 21H5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-down-up.js var ArrowDownUp; var init_arrow_down_up = __esmMin((() => { ArrowDownUp = [ ["path", { d: "m3 16 4 4 4-4" }], ["path", { d: "M7 20V4" }], ["path", { d: "m21 8-4-4-4 4" }], ["path", { d: "M17 4v16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-down-z-a.js var ArrowDownZA; var init_arrow_down_z_a = __esmMin((() => { ArrowDownZA = [ ["path", { d: "m3 16 4 4 4-4" }], ["path", { d: "M7 4v16" }], ["path", { d: "M15 4h5l-5 6h5" }], ["path", { d: "M15 20v-3.5a2.5 2.5 0 0 1 5 0V20" }], ["path", { d: "M20 18h-5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-down-wide-narrow.js var ArrowDownWideNarrow; var init_arrow_down_wide_narrow = __esmMin((() => { ArrowDownWideNarrow = [ ["path", { d: "m3 16 4 4 4-4" }], ["path", { d: "M7 20V4" }], ["path", { d: "M11 4h10" }], ["path", { d: "M11 8h7" }], ["path", { d: "M11 12h4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-down.js var ArrowDown; var init_arrow_down = __esmMin((() => { ArrowDown = [["path", { d: "M12 5v14" }], ["path", { d: "m19 12-7 7-7-7" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-left-from-line.js var ArrowLeftFromLine; var init_arrow_left_from_line = __esmMin((() => { ArrowLeftFromLine = [ ["path", { d: "m9 6-6 6 6 6" }], ["path", { d: "M3 12h14" }], ["path", { d: "M21 19V5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-left-right.js var ArrowLeftRight; var init_arrow_left_right = __esmMin((() => { ArrowLeftRight = [ ["path", { d: "M8 3 4 7l4 4" }], ["path", { d: "M4 7h16" }], ["path", { d: "m16 21 4-4-4-4" }], ["path", { d: "M20 17H4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-left-to-line.js var ArrowLeftToLine; var init_arrow_left_to_line = __esmMin((() => { ArrowLeftToLine = [ ["path", { d: "M3 19V5" }], ["path", { d: "m13 6-6 6 6 6" }], ["path", { d: "M7 12h14" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-left.js var ArrowLeft; var init_arrow_left = __esmMin((() => { ArrowLeft = [["path", { d: "m12 19-7-7 7-7" }], ["path", { d: "M19 12H5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-right-from-line.js var ArrowRightFromLine; var init_arrow_right_from_line = __esmMin((() => { ArrowRightFromLine = [ ["path", { d: "M3 5v14" }], ["path", { d: "M21 12H7" }], ["path", { d: "m15 18 6-6-6-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-right-left.js var ArrowRightLeft; var init_arrow_right_left = __esmMin((() => { ArrowRightLeft = [ ["path", { d: "m16 3 4 4-4 4" }], ["path", { d: "M20 7H4" }], ["path", { d: "m8 21-4-4 4-4" }], ["path", { d: "M4 17h16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-right-to-line.js var ArrowRightToLine; var init_arrow_right_to_line = __esmMin((() => { ArrowRightToLine = [ ["path", { d: "M17 12H3" }], ["path", { d: "m11 18 6-6-6-6" }], ["path", { d: "M21 5v14" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-right.js var ArrowRight; var init_arrow_right = __esmMin((() => { ArrowRight = [["path", { d: "M5 12h14" }], ["path", { d: "m12 5 7 7-7 7" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-up-0-1.js var ArrowUp01; var init_arrow_up_0_1 = __esmMin((() => { ArrowUp01 = [ ["path", { d: "m3 8 4-4 4 4" }], ["path", { d: "M7 4v16" }], ["rect", { x: "15", y: "4", width: "4", height: "6", ry: "2" }], ["path", { d: "M17 20v-6h-2" }], ["path", { d: "M15 20h4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-up-1-0.js var ArrowUp10; var init_arrow_up_1_0 = __esmMin((() => { ArrowUp10 = [ ["path", { d: "m3 8 4-4 4 4" }], ["path", { d: "M7 4v16" }], ["path", { d: "M17 10V4h-2" }], ["path", { d: "M15 10h4" }], ["rect", { x: "15", y: "14", width: "4", height: "6", ry: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-up-a-z.js var ArrowUpAZ; var init_arrow_up_a_z = __esmMin((() => { ArrowUpAZ = [ ["path", { d: "m3 8 4-4 4 4" }], ["path", { d: "M7 4v16" }], ["path", { d: "M20 8h-5" }], ["path", { d: "M15 10V6.5a2.5 2.5 0 0 1 5 0V10" }], ["path", { d: "M15 14h5l-5 6h5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-up-down.js var ArrowUpDown; var init_arrow_up_down = __esmMin((() => { ArrowUpDown = [ ["path", { d: "m21 16-4 4-4-4" }], ["path", { d: "M17 20V4" }], ["path", { d: "m3 8 4-4 4 4" }], ["path", { d: "M7 4v16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-up-from-dot.js var ArrowUpFromDot; var init_arrow_up_from_dot = __esmMin((() => { ArrowUpFromDot = [ ["path", { d: "m5 9 7-7 7 7" }], ["path", { d: "M12 16V2" }], ["circle", { cx: "12", cy: "21", r: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-up-from-line.js var ArrowUpFromLine; var init_arrow_up_from_line = __esmMin((() => { ArrowUpFromLine = [ ["path", { d: "m18 9-6-6-6 6" }], ["path", { d: "M12 3v14" }], ["path", { d: "M5 21h14" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-up-left.js var ArrowUpLeft; var init_arrow_up_left = __esmMin((() => { ArrowUpLeft = [["path", { d: "M7 17V7h10" }], ["path", { d: "M17 17 7 7" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-up-narrow-wide.js var ArrowUpNarrowWide; var init_arrow_up_narrow_wide = __esmMin((() => { ArrowUpNarrowWide = [ ["path", { d: "m3 8 4-4 4 4" }], ["path", { d: "M7 4v16" }], ["path", { d: "M11 12h4" }], ["path", { d: "M11 16h7" }], ["path", { d: "M11 20h10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-up-right.js var ArrowUpRight; var init_arrow_up_right = __esmMin((() => { ArrowUpRight = [["path", { d: "M7 7h10v10" }], ["path", { d: "M7 17 17 7" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-up-to-line.js var ArrowUpToLine; var init_arrow_up_to_line = __esmMin((() => { ArrowUpToLine = [ ["path", { d: "M5 3h14" }], ["path", { d: "m18 13-6-6-6 6" }], ["path", { d: "M12 7v14" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-up-wide-narrow.js var ArrowUpWideNarrow; var init_arrow_up_wide_narrow = __esmMin((() => { ArrowUpWideNarrow = [ ["path", { d: "m3 8 4-4 4 4" }], ["path", { d: "M7 4v16" }], ["path", { d: "M11 12h10" }], ["path", { d: "M11 16h7" }], ["path", { d: "M11 20h4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-up-z-a.js var ArrowUpZA; var init_arrow_up_z_a = __esmMin((() => { ArrowUpZA = [ ["path", { d: "m3 8 4-4 4 4" }], ["path", { d: "M7 4v16" }], ["path", { d: "M15 4h5l-5 6h5" }], ["path", { d: "M15 20v-3.5a2.5 2.5 0 0 1 5 0V20" }], ["path", { d: "M20 18h-5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrow-up.js var ArrowUp; var init_arrow_up = __esmMin((() => { ArrowUp = [["path", { d: "m5 12 7-7 7 7" }], ["path", { d: "M12 19V5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/arrows-up-from-line.js var ArrowsUpFromLine; var init_arrows_up_from_line = __esmMin((() => { ArrowsUpFromLine = [ ["path", { d: "m4 6 3-3 3 3" }], ["path", { d: "M7 17V3" }], ["path", { d: "m14 6 3-3 3 3" }], ["path", { d: "M17 17V3" }], ["path", { d: "M4 21h16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/asterisk.js var Asterisk; var init_asterisk = __esmMin((() => { Asterisk = [ ["path", { d: "M12 6v12" }], ["path", { d: "M17.196 9 6.804 15" }], ["path", { d: "m6.804 9 10.392 6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/at-sign.js var AtSign; var init_at_sign = __esmMin((() => { AtSign = [["circle", { cx: "12", cy: "12", r: "4" }], ["path", { d: "M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/atom.js var Atom; var init_atom = __esmMin((() => { Atom = [ ["circle", { cx: "12", cy: "12", r: "1" }], ["path", { d: "M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z" }], ["path", { d: "M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/audio-lines.js var AudioLines; var init_audio_lines = __esmMin((() => { AudioLines = [ ["path", { d: "M2 10v3" }], ["path", { d: "M6 6v11" }], ["path", { d: "M10 3v18" }], ["path", { d: "M14 8v7" }], ["path", { d: "M18 5v13" }], ["path", { d: "M22 10v3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/audio-waveform.js var AudioWaveform; var init_audio_waveform = __esmMin((() => { AudioWaveform = [["path", { d: "M2 13a2 2 0 0 0 2-2V7a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0V4a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0v-4a2 2 0 0 1 2-2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/award.js var Award; var init_award = __esmMin((() => { Award = [["path", { d: "m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526" }], ["circle", { cx: "12", cy: "8", r: "6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/axe.js var Axe; var init_axe = __esmMin((() => { Axe = [["path", { d: "m14 12-8.381 8.38a1 1 0 0 1-3.001-3L11 9" }], ["path", { d: "M15 15.5a.5.5 0 0 0 .5.5A6.5 6.5 0 0 0 22 9.5a.5.5 0 0 0-.5-.5h-1.672a2 2 0 0 1-1.414-.586l-5.062-5.062a1.205 1.205 0 0 0-1.704 0L9.352 5.648a1.205 1.205 0 0 0 0 1.704l5.062 5.062A2 2 0 0 1 15 13.828z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/axis-3d.js var Axis3d; var init_axis_3d = __esmMin((() => { Axis3d = [ ["path", { d: "M13.5 10.5 15 9" }], ["path", { d: "M4 4v15a1 1 0 0 0 1 1h15" }], ["path", { d: "M4.293 19.707 6 18" }], ["path", { d: "m9 15 1.5-1.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/baby.js var Baby; var init_baby = __esmMin((() => { Baby = [ ["path", { d: "M10 16c.5.3 1.2.5 2 .5s1.5-.2 2-.5" }], ["path", { d: "M15 12h.01" }], ["path", { d: "M19.38 6.813A9 9 0 0 1 20.8 10.2a2 2 0 0 1 0 3.6 9 9 0 0 1-17.6 0 2 2 0 0 1 0-3.6A9 9 0 0 1 12 3c2 0 3.5 1.1 3.5 2.5s-.9 2.5-2 2.5c-.8 0-1.5-.4-1.5-1" }], ["path", { d: "M9 12h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/backpack.js var Backpack; var init_backpack = __esmMin((() => { Backpack = [ ["path", { d: "M4 10a4 4 0 0 1 4-4h8a4 4 0 0 1 4 4v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z" }], ["path", { d: "M8 10h8" }], ["path", { d: "M8 18h8" }], ["path", { d: "M8 22v-6a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v6" }], ["path", { d: "M9 6V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/badge-cent.js var BadgeCent; var init_badge_cent = __esmMin((() => { BadgeCent = [ ["path", { d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }], ["path", { d: "M12 7v10" }], ["path", { d: "M15.4 10a4 4 0 1 0 0 4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/badge-alert.js var BadgeAlert; var init_badge_alert = __esmMin((() => { BadgeAlert = [ ["path", { d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }], ["line", { x1: "12", x2: "12", y1: "8", y2: "12" }], ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/badge-check.js var BadgeCheck; var init_badge_check = __esmMin((() => { BadgeCheck = [["path", { d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }], ["path", { d: "m9 12 2 2 4-4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/badge-dollar-sign.js var BadgeDollarSign; var init_badge_dollar_sign = __esmMin((() => { BadgeDollarSign = [ ["path", { d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }], ["path", { d: "M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8" }], ["path", { d: "M12 18V6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/badge-euro.js var BadgeEuro; var init_badge_euro = __esmMin((() => { BadgeEuro = [ ["path", { d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }], ["path", { d: "M7 12h5" }], ["path", { d: "M15 9.4a4 4 0 1 0 0 5.2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/badge-info.js var BadgeInfo; var init_badge_info = __esmMin((() => { BadgeInfo = [ ["path", { d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }], ["line", { x1: "12", x2: "12", y1: "16", y2: "12" }], ["line", { x1: "12", x2: "12.01", y1: "8", y2: "8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/badge-indian-rupee.js var BadgeIndianRupee; var init_badge_indian_rupee = __esmMin((() => { BadgeIndianRupee = [ ["path", { d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }], ["path", { d: "M8 8h8" }], ["path", { d: "M8 12h8" }], ["path", { d: "m13 17-5-1h1a4 4 0 0 0 0-8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/badge-japanese-yen.js var BadgeJapaneseYen; var init_badge_japanese_yen = __esmMin((() => { BadgeJapaneseYen = [ ["path", { d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }], ["path", { d: "m9 8 3 3v7" }], ["path", { d: "m12 11 3-3" }], ["path", { d: "M9 12h6" }], ["path", { d: "M9 16h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/badge-minus.js var BadgeMinus; var init_badge_minus = __esmMin((() => { BadgeMinus = [["path", { d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }], ["line", { x1: "8", x2: "16", y1: "12", y2: "12" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/badge-percent.js var BadgePercent; var init_badge_percent = __esmMin((() => { BadgePercent = [ ["path", { d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }], ["path", { d: "m15 9-6 6" }], ["path", { d: "M9 9h.01" }], ["path", { d: "M15 15h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/badge-plus.js var BadgePlus; var init_badge_plus = __esmMin((() => { BadgePlus = [ ["path", { d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }], ["line", { x1: "12", x2: "12", y1: "8", y2: "16" }], ["line", { x1: "8", x2: "16", y1: "12", y2: "12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/badge-pound-sterling.js var BadgePoundSterling; var init_badge_pound_sterling = __esmMin((() => { BadgePoundSterling = [ ["path", { d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }], ["path", { d: "M8 12h4" }], ["path", { d: "M10 16V9.5a2.5 2.5 0 0 1 5 0" }], ["path", { d: "M8 16h7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/badge-question-mark.js var BadgeQuestionMark; var init_badge_question_mark = __esmMin((() => { BadgeQuestionMark = [ ["path", { d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }], ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }], ["line", { x1: "12", x2: "12.01", y1: "17", y2: "17" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/badge-russian-ruble.js var BadgeRussianRuble; var init_badge_russian_ruble = __esmMin((() => { BadgeRussianRuble = [ ["path", { d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }], ["path", { d: "M9 16h5" }], ["path", { d: "M9 12h5a2 2 0 1 0 0-4h-3v9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/badge-swiss-franc.js var BadgeSwissFranc; var init_badge_swiss_franc = __esmMin((() => { BadgeSwissFranc = [ ["path", { d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }], ["path", { d: "M11 17V8h4" }], ["path", { d: "M11 12h3" }], ["path", { d: "M9 16h4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/badge-turkish-lira.js var BadgeTurkishLira; var init_badge_turkish_lira = __esmMin((() => { BadgeTurkishLira = [ ["path", { d: "M11 7v10a5 5 0 0 0 5-5" }], ["path", { d: "m15 8-6 3" }], ["path", { d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/badge-x.js var BadgeX; var init_badge_x = __esmMin((() => { BadgeX = [ ["path", { d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }], ["line", { x1: "15", x2: "9", y1: "9", y2: "15" }], ["line", { x1: "9", x2: "15", y1: "9", y2: "15" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/badge.js var Badge$1; var init_badge = __esmMin((() => { Badge$1 = [["path", { d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/baggage-claim.js var BaggageClaim; var init_baggage_claim = __esmMin((() => { BaggageClaim = [ ["path", { d: "M22 18H6a2 2 0 0 1-2-2V7a2 2 0 0 0-2-2" }], ["path", { d: "M17 14V4a2 2 0 0 0-2-2h-1a2 2 0 0 0-2 2v10" }], ["rect", { width: "13", height: "8", x: "8", y: "6", rx: "1" }], ["circle", { cx: "18", cy: "20", r: "2" }], ["circle", { cx: "9", cy: "20", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ban.js var Ban; var init_ban = __esmMin((() => { Ban = [["path", { d: "M4.929 4.929 19.07 19.071" }], ["circle", { cx: "12", cy: "12", r: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/banana.js var Banana; var init_banana = __esmMin((() => { Banana = [["path", { d: "M4 13c3.5-2 8-2 10 2a5.5 5.5 0 0 1 8 5" }], ["path", { d: "M5.15 17.89c5.52-1.52 8.65-6.89 7-12C11.55 4 11.5 2 13 2c3.22 0 5 5.5 5 8 0 6.5-4.2 12-10.49 12C5.11 22 2 22 2 20c0-1.5 1.14-1.55 3.15-2.11Z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bandage.js var Bandage; var init_bandage = __esmMin((() => { Bandage = [ ["path", { d: "M10 10.01h.01" }], ["path", { d: "M10 14.01h.01" }], ["path", { d: "M14 10.01h.01" }], ["path", { d: "M14 14.01h.01" }], ["path", { d: "M18 6v11.5" }], ["path", { d: "M6 6v12" }], ["rect", { x: "2", y: "6", width: "20", height: "12", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/banknote-arrow-down.js var BanknoteArrowDown; var init_banknote_arrow_down = __esmMin((() => { BanknoteArrowDown = [ ["path", { d: "M12 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5" }], ["path", { d: "m16 19 3 3 3-3" }], ["path", { d: "M18 12h.01" }], ["path", { d: "M19 16v6" }], ["path", { d: "M6 12h.01" }], ["circle", { cx: "12", cy: "12", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/banknote-arrow-up.js var BanknoteArrowUp; var init_banknote_arrow_up = __esmMin((() => { BanknoteArrowUp = [ ["path", { d: "M12 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5" }], ["path", { d: "M18 12h.01" }], ["path", { d: "M19 22v-6" }], ["path", { d: "m22 19-3-3-3 3" }], ["path", { d: "M6 12h.01" }], ["circle", { cx: "12", cy: "12", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/banknote-x.js var BanknoteX; var init_banknote_x = __esmMin((() => { BanknoteX = [ ["path", { d: "M13 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5" }], ["path", { d: "m17 17 5 5" }], ["path", { d: "M18 12h.01" }], ["path", { d: "m22 17-5 5" }], ["path", { d: "M6 12h.01" }], ["circle", { cx: "12", cy: "12", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/banknote.js var Banknote; var init_banknote = __esmMin((() => { Banknote = [ ["rect", { width: "20", height: "12", x: "2", y: "6", rx: "2" }], ["circle", { cx: "12", cy: "12", r: "2" }], ["path", { d: "M6 12h.01M18 12h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/barcode.js var Barcode; var init_barcode = __esmMin((() => { Barcode = [ ["path", { d: "M3 5v14" }], ["path", { d: "M8 5v14" }], ["path", { d: "M12 5v14" }], ["path", { d: "M17 5v14" }], ["path", { d: "M21 5v14" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/barrel.js var Barrel; var init_barrel = __esmMin((() => { Barrel = [ ["path", { d: "M10 3a41 41 0 0 0 0 18" }], ["path", { d: "M14 3a41 41 0 0 1 0 18" }], ["path", { d: "M17 3a2 2 0 0 1 1.68.92 15.25 15.25 0 0 1 0 16.16A2 2 0 0 1 17 21H7a2 2 0 0 1-1.68-.92 15.25 15.25 0 0 1 0-16.16A2 2 0 0 1 7 3z" }], ["path", { d: "M3.84 17h16.32" }], ["path", { d: "M3.84 7h16.32" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/baseline.js var Baseline; var init_baseline = __esmMin((() => { Baseline = [ ["path", { d: "M4 20h16" }], ["path", { d: "m6 16 6-12 6 12" }], ["path", { d: "M8 12h8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bath.js var Bath; var init_bath = __esmMin((() => { Bath = [ ["path", { d: "M10 4 8 6" }], ["path", { d: "M17 19v2" }], ["path", { d: "M2 12h20" }], ["path", { d: "M7 19v2" }], ["path", { d: "M9 5 7.621 3.621A2.121 2.121 0 0 0 4 5v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/battery-charging.js var BatteryCharging; var init_battery_charging = __esmMin((() => { BatteryCharging = [ ["path", { d: "m11 7-3 5h4l-3 5" }], ["path", { d: "M14.856 6H16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.935" }], ["path", { d: "M22 14v-4" }], ["path", { d: "M5.14 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2.936" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/battery-full.js var BatteryFull; var init_battery_full = __esmMin((() => { BatteryFull = [ ["path", { d: "M10 10v4" }], ["path", { d: "M14 10v4" }], ["path", { d: "M22 14v-4" }], ["path", { d: "M6 10v4" }], ["rect", { x: "2", y: "6", width: "16", height: "12", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/battery-low.js var BatteryLow; var init_battery_low = __esmMin((() => { BatteryLow = [ ["path", { d: "M22 14v-4" }], ["path", { d: "M6 14v-4" }], ["rect", { x: "2", y: "6", width: "16", height: "12", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/battery-medium.js var BatteryMedium; var init_battery_medium = __esmMin((() => { BatteryMedium = [ ["path", { d: "M10 14v-4" }], ["path", { d: "M22 14v-4" }], ["path", { d: "M6 14v-4" }], ["rect", { x: "2", y: "6", width: "16", height: "12", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/battery-plus.js var BatteryPlus; var init_battery_plus = __esmMin((() => { BatteryPlus = [ ["path", { d: "M10 9v6" }], ["path", { d: "M12.543 6H16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-3.605" }], ["path", { d: "M22 14v-4" }], ["path", { d: "M7 12h6" }], ["path", { d: "M7.606 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3.606" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/battery-warning.js var BatteryWarning; var init_battery_warning = __esmMin((() => { BatteryWarning = [ ["path", { d: "M10 17h.01" }], ["path", { d: "M10 7v6" }], ["path", { d: "M14 6h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2" }], ["path", { d: "M22 14v-4" }], ["path", { d: "M6 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/battery.js var Battery; var init_battery = __esmMin((() => { Battery = [["path", { d: "M 22 14 L 22 10" }], ["rect", { x: "2", y: "6", width: "16", height: "12", rx: "2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/beaker.js var Beaker; var init_beaker = __esmMin((() => { Beaker = [ ["path", { d: "M4.5 3h15" }], ["path", { d: "M6 3v16a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V3" }], ["path", { d: "M6 14h12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bean-off.js var BeanOff; var init_bean_off = __esmMin((() => { BeanOff = [ ["path", { d: "M9 9c-.64.64-1.521.954-2.402 1.165A6 6 0 0 0 8 22a13.96 13.96 0 0 0 9.9-4.1" }], ["path", { d: "M10.75 5.093A6 6 0 0 1 22 8c0 2.411-.61 4.68-1.683 6.66" }], ["path", { d: "M5.341 10.62a4 4 0 0 0 6.487 1.208M10.62 5.341a4.015 4.015 0 0 1 2.039 2.04" }], ["line", { x1: "2", x2: "22", y1: "2", y2: "22" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bean.js var Bean; var init_bean = __esmMin((() => { Bean = [["path", { d: "M10.165 6.598C9.954 7.478 9.64 8.36 9 9c-.64.64-1.521.954-2.402 1.165A6 6 0 0 0 8 22c7.732 0 14-6.268 14-14a6 6 0 0 0-11.835-1.402Z" }], ["path", { d: "M5.341 10.62a4 4 0 1 0 5.279-5.28" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bed-double.js var BedDouble; var init_bed_double = __esmMin((() => { BedDouble = [ ["path", { d: "M2 20v-8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v8" }], ["path", { d: "M4 10V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4" }], ["path", { d: "M12 4v6" }], ["path", { d: "M2 18h20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bed-single.js var BedSingle; var init_bed_single = __esmMin((() => { BedSingle = [ ["path", { d: "M3 20v-8a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v8" }], ["path", { d: "M5 10V6a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v4" }], ["path", { d: "M3 18h18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bed.js var Bed; var init_bed = __esmMin((() => { Bed = [ ["path", { d: "M2 4v16" }], ["path", { d: "M2 8h18a2 2 0 0 1 2 2v10" }], ["path", { d: "M2 17h20" }], ["path", { d: "M6 8v9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/beef.js var Beef; var init_beef = __esmMin((() => { Beef = [ ["path", { d: "M16.4 13.7A6.5 6.5 0 1 0 6.28 6.6c-1.1 3.13-.78 3.9-3.18 6.08A3 3 0 0 0 5 18c4 0 8.4-1.8 11.4-4.3" }], ["path", { d: "m18.5 6 2.19 4.5a6.48 6.48 0 0 1-2.29 7.2C15.4 20.2 11 22 7 22a3 3 0 0 1-2.68-1.66L2.4 16.5" }], ["circle", { cx: "12.5", cy: "8.5", r: "2.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/beer-off.js var BeerOff; var init_beer_off = __esmMin((() => { BeerOff = [ ["path", { d: "M13 13v5" }], ["path", { d: "M17 11.47V8" }], ["path", { d: "M17 11h1a3 3 0 0 1 2.745 4.211" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M5 8v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-3" }], ["path", { d: "M7.536 7.535C6.766 7.649 6.154 8 5.5 8a2.5 2.5 0 0 1-1.768-4.268" }], ["path", { d: "M8.727 3.204C9.306 2.767 9.885 2 11 2c1.56 0 2 1.5 3 1.5s1.72-.5 2.5-.5a1 1 0 1 1 0 5c-.78 0-1.5-.5-2.5-.5a3.149 3.149 0 0 0-.842.12" }], ["path", { d: "M9 14.6V18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/beer.js var Beer; var init_beer = __esmMin((() => { Beer = [ ["path", { d: "M17 11h1a3 3 0 0 1 0 6h-1" }], ["path", { d: "M9 12v6" }], ["path", { d: "M13 12v6" }], ["path", { d: "M14 7.5c-1 0-1.44.5-3 .5s-2-.5-3-.5-1.72.5-2.5.5a2.5 2.5 0 0 1 0-5c.78 0 1.57.5 2.5.5S9.44 2 11 2s2 1.5 3 1.5 1.72-.5 2.5-.5a2.5 2.5 0 0 1 0 5c-.78 0-1.5-.5-2.5-.5Z" }], ["path", { d: "M5 8v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bell-dot.js var BellDot; var init_bell_dot = __esmMin((() => { BellDot = [ ["path", { d: "M10.268 21a2 2 0 0 0 3.464 0" }], ["path", { d: "M13.916 2.314A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.74 7.327A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673 9 9 0 0 1-.585-.665" }], ["circle", { cx: "18", cy: "8", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bell-electric.js var BellElectric; var init_bell_electric = __esmMin((() => { BellElectric = [ ["path", { d: "M18.518 17.347A7 7 0 0 1 14 19" }], ["path", { d: "M18.8 4A11 11 0 0 1 20 9" }], ["path", { d: "M9 9h.01" }], ["circle", { cx: "20", cy: "16", r: "2" }], ["circle", { cx: "9", cy: "9", r: "7" }], ["rect", { x: "4", y: "16", width: "10", height: "6", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bell-minus.js var BellMinus; var init_bell_minus = __esmMin((() => { BellMinus = [ ["path", { d: "M10.268 21a2 2 0 0 0 3.464 0" }], ["path", { d: "M15 8h6" }], ["path", { d: "M16.243 3.757A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673A9.4 9.4 0 0 1 18.667 12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bell-off.js var BellOff; var init_bell_off = __esmMin((() => { BellOff = [ ["path", { d: "M10.268 21a2 2 0 0 0 3.464 0" }], ["path", { d: "M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bell-plus.js var BellPlus; var init_bell_plus = __esmMin((() => { BellPlus = [ ["path", { d: "M10.268 21a2 2 0 0 0 3.464 0" }], ["path", { d: "M15 8h6" }], ["path", { d: "M18 5v6" }], ["path", { d: "M20.002 14.464a9 9 0 0 0 .738.863A1 1 0 0 1 20 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 8.75-5.332" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bell-ring.js var BellRing; var init_bell_ring = __esmMin((() => { BellRing = [ ["path", { d: "M10.268 21a2 2 0 0 0 3.464 0" }], ["path", { d: "M22 8c0-2.3-.8-4.3-2-6" }], ["path", { d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" }], ["path", { d: "M4 2C2.8 3.7 2 5.7 2 8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bell.js var Bell; var init_bell = __esmMin((() => { Bell = [["path", { d: "M10.268 21a2 2 0 0 0 3.464 0" }], ["path", { d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/between-horizontal-end.js var BetweenHorizontalEnd; var init_between_horizontal_end = __esmMin((() => { BetweenHorizontalEnd = [ ["rect", { width: "13", height: "7", x: "3", y: "3", rx: "1" }], ["path", { d: "m22 15-3-3 3-3" }], ["rect", { width: "13", height: "7", x: "3", y: "14", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/between-horizontal-start.js var BetweenHorizontalStart; var init_between_horizontal_start = __esmMin((() => { BetweenHorizontalStart = [ ["rect", { width: "13", height: "7", x: "8", y: "3", rx: "1" }], ["path", { d: "m2 9 3 3-3 3" }], ["rect", { width: "13", height: "7", x: "8", y: "14", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/between-vertical-end.js var BetweenVerticalEnd; var init_between_vertical_end = __esmMin((() => { BetweenVerticalEnd = [ ["rect", { width: "7", height: "13", x: "3", y: "3", rx: "1" }], ["path", { d: "m9 22 3-3 3 3" }], ["rect", { width: "7", height: "13", x: "14", y: "3", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/between-vertical-start.js var BetweenVerticalStart; var init_between_vertical_start = __esmMin((() => { BetweenVerticalStart = [ ["rect", { width: "7", height: "13", x: "3", y: "8", rx: "1" }], ["path", { d: "m15 2-3 3-3-3" }], ["rect", { width: "7", height: "13", x: "14", y: "8", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/biceps-flexed.js var BicepsFlexed; var init_biceps_flexed = __esmMin((() => { BicepsFlexed = [ ["path", { d: "M12.409 13.017A5 5 0 0 1 22 15c0 3.866-4 7-9 7-4.077 0-8.153-.82-10.371-2.462-.426-.316-.631-.832-.62-1.362C2.118 12.723 2.627 2 10 2a3 3 0 0 1 3 3 2 2 0 0 1-2 2c-1.105 0-1.64-.444-2-1" }], ["path", { d: "M15 14a5 5 0 0 0-7.584 2" }], ["path", { d: "M9.964 6.825C8.019 7.977 9.5 13 8 15" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bike.js var Bike; var init_bike = __esmMin((() => { Bike = [ ["circle", { cx: "18.5", cy: "17.5", r: "3.5" }], ["circle", { cx: "5.5", cy: "17.5", r: "3.5" }], ["circle", { cx: "15", cy: "5", r: "1" }], ["path", { d: "M12 17.5V14l-3-3 4-3 2 3h2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/binoculars.js var Binoculars; var init_binoculars = __esmMin((() => { Binoculars = [ ["path", { d: "M10 10h4" }], ["path", { d: "M19 7V4a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v3" }], ["path", { d: "M20 21a2 2 0 0 0 2-2v-3.851c0-1.39-2-2.962-2-4.829V8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v11a2 2 0 0 0 2 2z" }], ["path", { d: "M 22 16 L 2 16" }], ["path", { d: "M4 21a2 2 0 0 1-2-2v-3.851c0-1.39 2-2.962 2-4.829V8a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v11a2 2 0 0 1-2 2z" }], ["path", { d: "M9 7V4a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/binary.js var Binary; var init_binary = __esmMin((() => { Binary = [ ["rect", { x: "14", y: "14", width: "4", height: "6", rx: "2" }], ["rect", { x: "6", y: "4", width: "4", height: "6", rx: "2" }], ["path", { d: "M6 20h4" }], ["path", { d: "M14 10h4" }], ["path", { d: "M6 14h2v6" }], ["path", { d: "M14 4h2v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/biohazard.js var Biohazard; var init_biohazard = __esmMin((() => { Biohazard = [ ["circle", { cx: "12", cy: "11.9", r: "2" }], ["path", { d: "M6.7 3.4c-.9 2.5 0 5.2 2.2 6.7C6.5 9 3.7 9.6 2 11.6" }], ["path", { d: "m8.9 10.1 1.4.8" }], ["path", { d: "M17.3 3.4c.9 2.5 0 5.2-2.2 6.7 2.4-1.2 5.2-.6 6.9 1.5" }], ["path", { d: "m15.1 10.1-1.4.8" }], ["path", { d: "M16.7 20.8c-2.6-.4-4.6-2.6-4.7-5.3-.2 2.6-2.1 4.8-4.7 5.2" }], ["path", { d: "M12 13.9v1.6" }], ["path", { d: "M13.5 5.4c-1-.2-2-.2-3 0" }], ["path", { d: "M17 16.4c.7-.7 1.2-1.6 1.5-2.5" }], ["path", { d: "M5.5 13.9c.3.9.8 1.8 1.5 2.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bird.js var Bird; var init_bird = __esmMin((() => { Bird = [ ["path", { d: "M16 7h.01" }], ["path", { d: "M3.4 18H12a8 8 0 0 0 8-8V7a4 4 0 0 0-7.28-2.3L2 20" }], ["path", { d: "m20 7 2 .5-2 .5" }], ["path", { d: "M10 18v3" }], ["path", { d: "M14 17.75V21" }], ["path", { d: "M7 18a6 6 0 0 0 3.84-10.61" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bitcoin.js var Bitcoin; var init_bitcoin = __esmMin((() => { Bitcoin = [["path", { d: "M11.767 19.089c4.924.868 6.14-6.025 1.216-6.894m-1.216 6.894L5.86 18.047m5.908 1.042-.347 1.97m1.563-8.864c4.924.869 6.14-6.025 1.215-6.893m-1.215 6.893-3.94-.694m5.155-6.2L8.29 4.26m5.908 1.042.348-1.97M7.48 20.364l3.126-17.727" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/blend.js var Blend; var init_blend = __esmMin((() => { Blend = [["circle", { cx: "9", cy: "9", r: "7" }], ["circle", { cx: "15", cy: "15", r: "7" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/birdhouse.js var Birdhouse; var init_birdhouse = __esmMin((() => { Birdhouse = [ ["path", { d: "M12 18v4" }], ["path", { d: "m17 18 1.956-11.468" }], ["path", { d: "m3 8 7.82-5.615a2 2 0 0 1 2.36 0L21 8" }], ["path", { d: "M4 18h16" }], ["path", { d: "M7 18 5.044 6.532" }], ["circle", { cx: "12", cy: "10", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/blinds.js var Blinds; var init_blinds = __esmMin((() => { Blinds = [ ["path", { d: "M3 3h18" }], ["path", { d: "M20 7H8" }], ["path", { d: "M20 11H8" }], ["path", { d: "M10 19h10" }], ["path", { d: "M8 15h12" }], ["path", { d: "M4 3v14" }], ["circle", { cx: "4", cy: "19", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/blocks.js var Blocks; var init_blocks = __esmMin((() => { Blocks = [["path", { d: "M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2" }], ["rect", { x: "14", y: "2", width: "8", height: "8", rx: "1" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bluetooth-connected.js var BluetoothConnected; var init_bluetooth_connected = __esmMin((() => { BluetoothConnected = [ ["path", { d: "m7 7 10 10-5 5V2l5 5L7 17" }], ["line", { x1: "18", x2: "21", y1: "12", y2: "12" }], ["line", { x1: "3", x2: "6", y1: "12", y2: "12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bluetooth-off.js var BluetoothOff; var init_bluetooth_off = __esmMin((() => { BluetoothOff = [ ["path", { d: "m17 17-5 5V12l-5 5" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M14.5 9.5 17 7l-5-5v4.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bluetooth-searching.js var BluetoothSearching; var init_bluetooth_searching = __esmMin((() => { BluetoothSearching = [ ["path", { d: "m7 7 10 10-5 5V2l5 5L7 17" }], ["path", { d: "M20.83 14.83a4 4 0 0 0 0-5.66" }], ["path", { d: "M18 12h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bluetooth.js var Bluetooth; var init_bluetooth = __esmMin((() => { Bluetooth = [["path", { d: "m7 7 10 10-5 5V2l5 5L7 17" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bold.js var Bold; var init_bold = __esmMin((() => { Bold = [["path", { d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bolt.js var Bolt; var init_bolt = __esmMin((() => { Bolt = [["path", { d: "M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" }], ["circle", { cx: "12", cy: "12", r: "4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bomb.js var Bomb; var init_bomb = __esmMin((() => { Bomb = [ ["circle", { cx: "11", cy: "13", r: "9" }], ["path", { d: "M14.35 4.65 16.3 2.7a2.41 2.41 0 0 1 3.4 0l1.6 1.6a2.4 2.4 0 0 1 0 3.4l-1.95 1.95" }], ["path", { d: "m22 2-1.5 1.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bone.js var Bone; var init_bone = __esmMin((() => { Bone = [["path", { d: "M17 10c.7-.7 1.69 0 2.5 0a2.5 2.5 0 1 0 0-5 .5.5 0 0 1-.5-.5 2.5 2.5 0 1 0-5 0c0 .81.7 1.8 0 2.5l-7 7c-.7.7-1.69 0-2.5 0a2.5 2.5 0 0 0 0 5c.28 0 .5.22.5.5a2.5 2.5 0 1 0 5 0c0-.81-.7-1.8 0-2.5Z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-a.js var BookA; var init_book_a = __esmMin((() => { BookA = [ ["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }], ["path", { d: "m8 13 4-7 4 7" }], ["path", { d: "M9.1 11h5.7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-alert.js var BookAlert; var init_book_alert = __esmMin((() => { BookAlert = [ ["path", { d: "M12 13h.01" }], ["path", { d: "M12 6v3" }], ["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-audio.js var BookAudio; var init_book_audio = __esmMin((() => { BookAudio = [ ["path", { d: "M12 6v7" }], ["path", { d: "M16 8v3" }], ["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }], ["path", { d: "M8 8v3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-check.js var BookCheck; var init_book_check = __esmMin((() => { BookCheck = [["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }], ["path", { d: "m9 9.5 2 2 4-4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-copy.js var BookCopy; var init_book_copy = __esmMin((() => { BookCopy = [ ["path", { d: "M5 7a2 2 0 0 0-2 2v11" }], ["path", { d: "M5.803 18H5a2 2 0 0 0 0 4h9.5a.5.5 0 0 0 .5-.5V21" }], ["path", { d: "M9 15V4a2 2 0 0 1 2-2h9.5a.5.5 0 0 1 .5.5v14a.5.5 0 0 1-.5.5H11a2 2 0 0 1 0-4h10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-dashed.js var BookDashed; var init_book_dashed = __esmMin((() => { BookDashed = [ ["path", { d: "M12 17h1.5" }], ["path", { d: "M12 22h1.5" }], ["path", { d: "M12 2h1.5" }], ["path", { d: "M17.5 22H19a1 1 0 0 0 1-1" }], ["path", { d: "M17.5 2H19a1 1 0 0 1 1 1v1.5" }], ["path", { d: "M20 14v3h-2.5" }], ["path", { d: "M20 8.5V10" }], ["path", { d: "M4 10V8.5" }], ["path", { d: "M4 19.5V14" }], ["path", { d: "M4 4.5A2.5 2.5 0 0 1 6.5 2H8" }], ["path", { d: "M8 22H6.5a1 1 0 0 1 0-5H8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-down.js var BookDown; var init_book_down = __esmMin((() => { BookDown = [ ["path", { d: "M12 13V7" }], ["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }], ["path", { d: "m9 10 3 3 3-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-headphones.js var BookHeadphones; var init_book_headphones = __esmMin((() => { BookHeadphones = [ ["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }], ["path", { d: "M8 12v-2a4 4 0 0 1 8 0v2" }], ["circle", { cx: "15", cy: "12", r: "1" }], ["circle", { cx: "9", cy: "12", r: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-heart.js var BookHeart; var init_book_heart = __esmMin((() => { BookHeart = [["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }], ["path", { d: "M8.62 9.8A2.25 2.25 0 1 1 12 6.836a2.25 2.25 0 1 1 3.38 2.966l-2.626 2.856a.998.998 0 0 1-1.507 0z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-image.js var BookImage; var init_book_image = __esmMin((() => { BookImage = [ ["path", { d: "m20 13.7-2.1-2.1a2 2 0 0 0-2.8 0L9.7 17" }], ["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }], ["circle", { cx: "10", cy: "8", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-key.js var BookKey; var init_book_key = __esmMin((() => { BookKey = [ ["path", { d: "m19 3 1 1" }], ["path", { d: "m20 2-4.5 4.5" }], ["path", { d: "M20 7.898V21a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }], ["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2h7.844" }], ["circle", { cx: "14", cy: "8", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-lock.js var BookLock; var init_book_lock = __esmMin((() => { BookLock = [ ["path", { d: "M18 6V4a2 2 0 1 0-4 0v2" }], ["path", { d: "M20 15v6a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }], ["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H10" }], ["rect", { x: "12", y: "6", width: "8", height: "5", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-marked.js var BookMarked; var init_book_marked = __esmMin((() => { BookMarked = [["path", { d: "M10 2v8l3-3 3 3V2" }], ["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-minus.js var BookMinus; var init_book_minus = __esmMin((() => { BookMinus = [["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }], ["path", { d: "M9 10h6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-open-check.js var BookOpenCheck; var init_book_open_check = __esmMin((() => { BookOpenCheck = [ ["path", { d: "M12 21V7" }], ["path", { d: "m16 12 2 2 4-4" }], ["path", { d: "M22 6V4a1 1 0 0 0-1-1h-5a4 4 0 0 0-4 4 4 4 0 0 0-4-4H3a1 1 0 0 0-1 1v13a1 1 0 0 0 1 1h6a3 3 0 0 1 3 3 3 3 0 0 1 3-3h6a1 1 0 0 0 1-1v-1.3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-open-text.js var BookOpenText; var init_book_open_text = __esmMin((() => { BookOpenText = [ ["path", { d: "M12 7v14" }], ["path", { d: "M16 12h2" }], ["path", { d: "M16 8h2" }], ["path", { d: "M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z" }], ["path", { d: "M6 12h2" }], ["path", { d: "M6 8h2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-open.js var BookOpen; var init_book_open = __esmMin((() => { BookOpen = [["path", { d: "M12 7v14" }], ["path", { d: "M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-plus.js var BookPlus; var init_book_plus = __esmMin((() => { BookPlus = [ ["path", { d: "M12 7v6" }], ["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }], ["path", { d: "M9 10h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-search.js var BookSearch; var init_book_search = __esmMin((() => { BookSearch = [ ["path", { d: "M11 22H5.5a1 1 0 0 1 0-5h4.501" }], ["path", { d: "m21 22-1.879-1.878" }], ["path", { d: "M3 19.5v-15A2.5 2.5 0 0 1 5.5 2H18a1 1 0 0 1 1 1v8" }], ["circle", { cx: "17", cy: "18", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-text.js var BookText; var init_book_text = __esmMin((() => { BookText = [ ["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }], ["path", { d: "M8 11h8" }], ["path", { d: "M8 7h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-type.js var BookType; var init_book_type = __esmMin((() => { BookType = [ ["path", { d: "M10 13h4" }], ["path", { d: "M12 6v7" }], ["path", { d: "M16 8V6H8v2" }], ["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-up-2.js var BookUp2; var init_book_up_2 = __esmMin((() => { BookUp2 = [ ["path", { d: "M12 13V7" }], ["path", { d: "M18 2h1a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }], ["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2" }], ["path", { d: "m9 10 3-3 3 3" }], ["path", { d: "m9 5 3-3 3 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-up.js var BookUp; var init_book_up = __esmMin((() => { BookUp = [ ["path", { d: "M12 13V7" }], ["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }], ["path", { d: "m9 10 3-3 3 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-user.js var BookUser; var init_book_user = __esmMin((() => { BookUser = [ ["path", { d: "M15 13a3 3 0 1 0-6 0" }], ["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }], ["circle", { cx: "12", cy: "8", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book-x.js var BookX; var init_book_x = __esmMin((() => { BookX = [ ["path", { d: "m14.5 7-5 5" }], ["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }], ["path", { d: "m9.5 7 5 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/book.js var Book; var init_book = __esmMin((() => { Book = [["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bookmark-check.js var BookmarkCheck; var init_bookmark_check = __esmMin((() => { BookmarkCheck = [["path", { d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2Z" }], ["path", { d: "m9 10 2 2 4-4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bookmark-minus.js var BookmarkMinus; var init_bookmark_minus = __esmMin((() => { BookmarkMinus = [["path", { d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z" }], ["line", { x1: "15", x2: "9", y1: "10", y2: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bookmark-plus.js var BookmarkPlus; var init_bookmark_plus = __esmMin((() => { BookmarkPlus = [ ["path", { d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z" }], ["line", { x1: "12", x2: "12", y1: "7", y2: "13" }], ["line", { x1: "15", x2: "9", y1: "10", y2: "10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bookmark-x.js var BookmarkX; var init_bookmark_x = __esmMin((() => { BookmarkX = [ ["path", { d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2Z" }], ["path", { d: "m14.5 7.5-5 5" }], ["path", { d: "m9.5 7.5 5 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bookmark.js var Bookmark; var init_bookmark = __esmMin((() => { Bookmark = [["path", { d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/boom-box.js var BoomBox; var init_boom_box = __esmMin((() => { BoomBox = [ ["path", { d: "M4 9V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4" }], ["path", { d: "M8 8v1" }], ["path", { d: "M12 8v1" }], ["path", { d: "M16 8v1" }], ["rect", { width: "20", height: "12", x: "2", y: "9", rx: "2" }], ["circle", { cx: "8", cy: "15", r: "2" }], ["circle", { cx: "16", cy: "15", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bot-message-square.js var BotMessageSquare; var init_bot_message_square = __esmMin((() => { BotMessageSquare = [ ["path", { d: "M12 6V2H8" }], ["path", { d: "M15 11v2" }], ["path", { d: "M2 12h2" }], ["path", { d: "M20 12h2" }], ["path", { d: "M20 16a2 2 0 0 1-2 2H8.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 4 20.286V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2z" }], ["path", { d: "M9 11v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bot-off.js var BotOff; var init_bot_off = __esmMin((() => { BotOff = [ ["path", { d: "M13.67 8H18a2 2 0 0 1 2 2v4.33" }], ["path", { d: "M2 14h2" }], ["path", { d: "M20 14h2" }], ["path", { d: "M22 22 2 2" }], ["path", { d: "M8 8H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 1.414-.586" }], ["path", { d: "M9 13v2" }], ["path", { d: "M9.67 4H12v2.33" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bot.js var Bot; var init_bot = __esmMin((() => { Bot = [ ["path", { d: "M12 8V4H8" }], ["rect", { width: "16", height: "12", x: "4", y: "8", rx: "2" }], ["path", { d: "M2 14h2" }], ["path", { d: "M20 14h2" }], ["path", { d: "M15 13v2" }], ["path", { d: "M9 13v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bottle-wine.js var BottleWine; var init_bottle_wine = __esmMin((() => { BottleWine = [["path", { d: "M10 3a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a6 6 0 0 0 1.2 3.6l.6.8A6 6 0 0 1 17 13v8a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1v-8a6 6 0 0 1 1.2-3.6l.6-.8A6 6 0 0 0 10 5z" }], ["path", { d: "M17 13h-4a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bow-arrow.js var BowArrow; var init_bow_arrow = __esmMin((() => { BowArrow = [ ["path", { d: "M17 3h4v4" }], ["path", { d: "M18.575 11.082a13 13 0 0 1 1.048 9.027 1.17 1.17 0 0 1-1.914.597L14 17" }], ["path", { d: "M7 10 3.29 6.29a1.17 1.17 0 0 1 .6-1.91 13 13 0 0 1 9.03 1.05" }], ["path", { d: "M7 14a1.7 1.7 0 0 0-1.207.5l-2.646 2.646A.5.5 0 0 0 3.5 18H5a1 1 0 0 1 1 1v1.5a.5.5 0 0 0 .854.354L9.5 18.207A1.7 1.7 0 0 0 10 17v-2a1 1 0 0 0-1-1z" }], ["path", { d: "M9.707 14.293 21 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/box.js var Box; var init_box = __esmMin((() => { Box = [ ["path", { d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" }], ["path", { d: "m3.3 7 8.7 5 8.7-5" }], ["path", { d: "M12 22V12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/boxes.js var Boxes; var init_boxes = __esmMin((() => { Boxes = [ ["path", { d: "M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z" }], ["path", { d: "m7 16.5-4.74-2.85" }], ["path", { d: "m7 16.5 5-3" }], ["path", { d: "M7 16.5v5.17" }], ["path", { d: "M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z" }], ["path", { d: "m17 16.5-5-3" }], ["path", { d: "m17 16.5 4.74-2.85" }], ["path", { d: "M17 16.5v5.17" }], ["path", { d: "M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z" }], ["path", { d: "M12 8 7.26 5.15" }], ["path", { d: "m12 8 4.74-2.85" }], ["path", { d: "M12 13.5V8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/braces.js var Braces; var init_braces = __esmMin((() => { Braces = [["path", { d: "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1" }], ["path", { d: "M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/brackets.js var Brackets; var init_brackets = __esmMin((() => { Brackets = [["path", { d: "M16 3h3a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-3" }], ["path", { d: "M8 21H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h3" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/brain-circuit.js var BrainCircuit; var init_brain_circuit = __esmMin((() => { BrainCircuit = [ ["path", { d: "M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z" }], ["path", { d: "M9 13a4.5 4.5 0 0 0 3-4" }], ["path", { d: "M6.003 5.125A3 3 0 0 0 6.401 6.5" }], ["path", { d: "M3.477 10.896a4 4 0 0 1 .585-.396" }], ["path", { d: "M6 18a4 4 0 0 1-1.967-.516" }], ["path", { d: "M12 13h4" }], ["path", { d: "M12 18h6a2 2 0 0 1 2 2v1" }], ["path", { d: "M12 8h8" }], ["path", { d: "M16 8V5a2 2 0 0 1 2-2" }], ["circle", { cx: "16", cy: "13", r: ".5" }], ["circle", { cx: "18", cy: "3", r: ".5" }], ["circle", { cx: "20", cy: "21", r: ".5" }], ["circle", { cx: "20", cy: "8", r: ".5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/brain-cog.js var BrainCog; var init_brain_cog = __esmMin((() => { BrainCog = [ ["path", { d: "m10.852 14.772-.383.923" }], ["path", { d: "m10.852 9.228-.383-.923" }], ["path", { d: "m13.148 14.772.382.924" }], ["path", { d: "m13.531 8.305-.383.923" }], ["path", { d: "m14.772 10.852.923-.383" }], ["path", { d: "m14.772 13.148.923.383" }], ["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 0 0-5.63-1.446 3 3 0 0 0-.368 1.571 4 4 0 0 0-2.525 5.771" }], ["path", { d: "M17.998 5.125a4 4 0 0 1 2.525 5.771" }], ["path", { d: "M19.505 10.294a4 4 0 0 1-1.5 7.706" }], ["path", { d: "M4.032 17.483A4 4 0 0 0 11.464 20c.18-.311.892-.311 1.072 0a4 4 0 0 0 7.432-2.516" }], ["path", { d: "M4.5 10.291A4 4 0 0 0 6 18" }], ["path", { d: "M6.002 5.125a3 3 0 0 0 .4 1.375" }], ["path", { d: "m9.228 10.852-.923-.383" }], ["path", { d: "m9.228 13.148-.923.383" }], ["circle", { cx: "12", cy: "12", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/brain.js var Brain; var init_brain = __esmMin((() => { Brain = [ ["path", { d: "M12 18V5" }], ["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4" }], ["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5" }], ["path", { d: "M17.997 5.125a4 4 0 0 1 2.526 5.77" }], ["path", { d: "M18 18a4 4 0 0 0 2-7.464" }], ["path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517" }], ["path", { d: "M6 18a4 4 0 0 1-2-7.464" }], ["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/brick-wall-fire.js var BrickWallFire; var init_brick_wall_fire = __esmMin((() => { BrickWallFire = [ ["path", { d: "M16 3v2.107" }], ["path", { d: "M17 9c1 3 2.5 3.5 3.5 4.5A5 5 0 0 1 22 17a5 5 0 0 1-10 0c0-.3 0-.6.1-.9a2 2 0 1 0 3.3-2C13 11.5 16 9 17 9" }], ["path", { d: "M21 8.274V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.938" }], ["path", { d: "M3 15h5.253" }], ["path", { d: "M3 9h8.228" }], ["path", { d: "M8 15v6" }], ["path", { d: "M8 3v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/brick-wall-shield.js var BrickWallShield; var init_brick_wall_shield = __esmMin((() => { BrickWallShield = [ ["path", { d: "M12 9v1.258" }], ["path", { d: "M16 3v5.46" }], ["path", { d: "M21 9.118V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h5.75" }], ["path", { d: "M22 17.5c0 2.499-1.75 3.749-3.83 4.474a.5.5 0 0 1-.335-.005c-2.085-.72-3.835-1.97-3.835-4.47V14a.5.5 0 0 1 .5-.499c1 0 2.25-.6 3.12-1.36a.6.6 0 0 1 .76-.001c.875.765 2.12 1.36 3.12 1.36a.5.5 0 0 1 .5.5z" }], ["path", { d: "M3 15h7" }], ["path", { d: "M3 9h12.142" }], ["path", { d: "M8 15v6" }], ["path", { d: "M8 3v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/brick-wall.js var BrickWall; var init_brick_wall = __esmMin((() => { BrickWall = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M12 9v6" }], ["path", { d: "M16 15v6" }], ["path", { d: "M16 3v6" }], ["path", { d: "M3 15h18" }], ["path", { d: "M3 9h18" }], ["path", { d: "M8 15v6" }], ["path", { d: "M8 3v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/briefcase-business.js var BriefcaseBusiness; var init_briefcase_business = __esmMin((() => { BriefcaseBusiness = [ ["path", { d: "M12 12h.01" }], ["path", { d: "M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2" }], ["path", { d: "M22 13a18.15 18.15 0 0 1-20 0" }], ["rect", { width: "20", height: "14", x: "2", y: "6", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/briefcase-conveyor-belt.js var BriefcaseConveyorBelt; var init_briefcase_conveyor_belt = __esmMin((() => { BriefcaseConveyorBelt = [ ["path", { d: "M10 20v2" }], ["path", { d: "M14 20v2" }], ["path", { d: "M18 20v2" }], ["path", { d: "M21 20H3" }], ["path", { d: "M6 20v2" }], ["path", { d: "M8 16V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v12" }], ["rect", { x: "4", y: "6", width: "16", height: "10", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/briefcase-medical.js var BriefcaseMedical; var init_briefcase_medical = __esmMin((() => { BriefcaseMedical = [ ["path", { d: "M12 11v4" }], ["path", { d: "M14 13h-4" }], ["path", { d: "M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2" }], ["path", { d: "M18 6v14" }], ["path", { d: "M6 6v14" }], ["rect", { width: "20", height: "14", x: "2", y: "6", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/briefcase.js var Briefcase; var init_briefcase = __esmMin((() => { Briefcase = [["path", { d: "M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16" }], ["rect", { width: "20", height: "14", x: "2", y: "6", rx: "2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bring-to-front.js var BringToFront; var init_bring_to_front = __esmMin((() => { BringToFront = [ ["rect", { x: "8", y: "8", width: "8", height: "8", rx: "2" }], ["path", { d: "M4 10a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2" }], ["path", { d: "M14 20a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/brush-cleaning.js var BrushCleaning; var init_brush_cleaning = __esmMin((() => { BrushCleaning = [ ["path", { d: "m16 22-1-4" }], ["path", { d: "M19 13.99a1 1 0 0 0 1-1V12a2 2 0 0 0-2-2h-3a1 1 0 0 1-1-1V4a2 2 0 0 0-4 0v5a1 1 0 0 1-1 1H6a2 2 0 0 0-2 2v.99a1 1 0 0 0 1 1" }], ["path", { d: "M5 14h14l1.973 6.767A1 1 0 0 1 20 22H4a1 1 0 0 1-.973-1.233z" }], ["path", { d: "m8 22 1-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/brush.js var Brush; var init_brush = __esmMin((() => { Brush = [ ["path", { d: "m11 10 3 3" }], ["path", { d: "M6.5 21A3.5 3.5 0 1 0 3 17.5a2.62 2.62 0 0 1-.708 1.792A1 1 0 0 0 3 21z" }], ["path", { d: "M9.969 17.031 21.378 5.624a1 1 0 0 0-3.002-3.002L6.967 14.031" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bubbles.js var Bubbles; var init_bubbles = __esmMin((() => { Bubbles = [ ["path", { d: "M7.001 15.085A1.5 1.5 0 0 1 9 16.5" }], ["circle", { cx: "18.5", cy: "8.5", r: "3.5" }], ["circle", { cx: "7.5", cy: "16.5", r: "5.5" }], ["circle", { cx: "7.5", cy: "4.5", r: "2.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bug-off.js var BugOff; var init_bug_off = __esmMin((() => { BugOff = [ ["path", { d: "M12 20v-8" }], ["path", { d: "M14.12 3.88 16 2" }], ["path", { d: "M15 7.13V6a3 3 0 0 0-5.14-2.1L8 2" }], ["path", { d: "M18 12.34V11a4 4 0 0 0-4-4h-1.3" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M21 5a4 4 0 0 1-3.55 3.97" }], ["path", { d: "M22 13h-3.34" }], ["path", { d: "M3 21a4 4 0 0 1 3.81-4" }], ["path", { d: "M6 13H2" }], ["path", { d: "M7.7 7.7A4 4 0 0 0 6 11v3a6 6 0 0 0 11.13 3.13" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bug-play.js var BugPlay; var init_bug_play = __esmMin((() => { BugPlay = [ ["path", { d: "M10 19.655A6 6 0 0 1 6 14v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 3.97" }], ["path", { d: "M14 15.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997a1 1 0 0 1-1.517-.86z" }], ["path", { d: "M14.12 3.88 16 2" }], ["path", { d: "M21 5a4 4 0 0 1-3.55 3.97" }], ["path", { d: "M3 21a4 4 0 0 1 3.81-4" }], ["path", { d: "M3 5a4 4 0 0 0 3.55 3.97" }], ["path", { d: "M6 13H2" }], ["path", { d: "m8 2 1.88 1.88" }], ["path", { d: "M9 7.13V6a3 3 0 1 1 6 0v1.13" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bug.js var Bug; var init_bug = __esmMin((() => { Bug = [ ["path", { d: "M12 20v-9" }], ["path", { d: "M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z" }], ["path", { d: "M14.12 3.88 16 2" }], ["path", { d: "M21 21a4 4 0 0 0-3.81-4" }], ["path", { d: "M21 5a4 4 0 0 1-3.55 3.97" }], ["path", { d: "M22 13h-4" }], ["path", { d: "M3 21a4 4 0 0 1 3.81-4" }], ["path", { d: "M3 5a4 4 0 0 0 3.55 3.97" }], ["path", { d: "M6 13H2" }], ["path", { d: "m8 2 1.88 1.88" }], ["path", { d: "M9 7.13V6a3 3 0 1 1 6 0v1.13" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/building-2.js var Building2; var init_building_2 = __esmMin((() => { Building2 = [ ["path", { d: "M10 12h4" }], ["path", { d: "M10 8h4" }], ["path", { d: "M14 21v-3a2 2 0 0 0-4 0v3" }], ["path", { d: "M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2" }], ["path", { d: "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/building.js var Building; var init_building = __esmMin((() => { Building = [ ["path", { d: "M12 10h.01" }], ["path", { d: "M12 14h.01" }], ["path", { d: "M12 6h.01" }], ["path", { d: "M16 10h.01" }], ["path", { d: "M16 14h.01" }], ["path", { d: "M16 6h.01" }], ["path", { d: "M8 10h.01" }], ["path", { d: "M8 14h.01" }], ["path", { d: "M8 6h.01" }], ["path", { d: "M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3" }], ["rect", { x: "4", y: "2", width: "16", height: "20", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bus-front.js var BusFront; var init_bus_front = __esmMin((() => { BusFront = [ ["path", { d: "M4 6 2 7" }], ["path", { d: "M10 6h4" }], ["path", { d: "m22 7-2-1" }], ["rect", { width: "16", height: "16", x: "4", y: "3", rx: "2" }], ["path", { d: "M4 11h16" }], ["path", { d: "M8 15h.01" }], ["path", { d: "M16 15h.01" }], ["path", { d: "M6 19v2" }], ["path", { d: "M18 21v-2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/bus.js var Bus; var init_bus = __esmMin((() => { Bus = [ ["path", { d: "M8 6v6" }], ["path", { d: "M15 6v6" }], ["path", { d: "M2 12h19.6" }], ["path", { d: "M18 18h3s.5-1.7.8-2.8c.1-.4.2-.8.2-1.2 0-.4-.1-.8-.2-1.2l-1.4-5C20.1 6.8 19.1 6 18 6H4a2 2 0 0 0-2 2v10h3" }], ["circle", { cx: "7", cy: "18", r: "2" }], ["path", { d: "M9 18h5" }], ["circle", { cx: "16", cy: "18", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cable-car.js var CableCar; var init_cable_car = __esmMin((() => { CableCar = [ ["path", { d: "M10 3h.01" }], ["path", { d: "M14 2h.01" }], ["path", { d: "m2 9 20-5" }], ["path", { d: "M12 12V6.5" }], ["rect", { width: "16", height: "10", x: "4", y: "12", rx: "3" }], ["path", { d: "M9 12v5" }], ["path", { d: "M15 12v5" }], ["path", { d: "M4 17h16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cable.js var Cable; var init_cable = __esmMin((() => { Cable = [ ["path", { d: "M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z" }], ["path", { d: "M17 21v-2" }], ["path", { d: "M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10" }], ["path", { d: "M21 21v-2" }], ["path", { d: "M3 5V3" }], ["path", { d: "M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z" }], ["path", { d: "M7 5V3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cake-slice.js var CakeSlice; var init_cake_slice = __esmMin((() => { CakeSlice = [ ["path", { d: "M16 13H3" }], ["path", { d: "M16 17H3" }], ["path", { d: "m7.2 7.9-3.388 2.5A2 2 0 0 0 3 12.01V20a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1v-8.654c0-2-2.44-6.026-6.44-8.026a1 1 0 0 0-1.082.057L10.4 5.6" }], ["circle", { cx: "9", cy: "7", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cake.js var Cake; var init_cake = __esmMin((() => { Cake = [ ["path", { d: "M20 21v-8a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8" }], ["path", { d: "M4 16s.5-1 2-1 2.5 2 4 2 2.5-2 4-2 2.5 2 4 2 2-1 2-1" }], ["path", { d: "M2 21h20" }], ["path", { d: "M7 8v3" }], ["path", { d: "M12 8v3" }], ["path", { d: "M17 8v3" }], ["path", { d: "M7 4h.01" }], ["path", { d: "M12 4h.01" }], ["path", { d: "M17 4h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calculator.js var Calculator; var init_calculator = __esmMin((() => { Calculator = [ ["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2" }], ["line", { x1: "8", x2: "16", y1: "6", y2: "6" }], ["line", { x1: "16", x2: "16", y1: "14", y2: "18" }], ["path", { d: "M16 10h.01" }], ["path", { d: "M12 10h.01" }], ["path", { d: "M8 10h.01" }], ["path", { d: "M12 14h.01" }], ["path", { d: "M8 14h.01" }], ["path", { d: "M12 18h.01" }], ["path", { d: "M8 18h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-1.js var Calendar1; var init_calendar_1 = __esmMin((() => { Calendar1 = [ ["path", { d: "M11 14h1v4" }], ["path", { d: "M16 2v4" }], ["path", { d: "M3 10h18" }], ["path", { d: "M8 2v4" }], ["rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-arrow-down.js var CalendarArrowDown; var init_calendar_arrow_down = __esmMin((() => { CalendarArrowDown = [ ["path", { d: "m14 18 4 4 4-4" }], ["path", { d: "M16 2v4" }], ["path", { d: "M18 14v8" }], ["path", { d: "M21 11.354V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7.343" }], ["path", { d: "M3 10h18" }], ["path", { d: "M8 2v4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-arrow-up.js var CalendarArrowUp; var init_calendar_arrow_up = __esmMin((() => { CalendarArrowUp = [ ["path", { d: "m14 18 4-4 4 4" }], ["path", { d: "M16 2v4" }], ["path", { d: "M18 22v-8" }], ["path", { d: "M21 11.343V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h9" }], ["path", { d: "M3 10h18" }], ["path", { d: "M8 2v4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-check-2.js var CalendarCheck2; var init_calendar_check_2 = __esmMin((() => { CalendarCheck2 = [ ["path", { d: "M8 2v4" }], ["path", { d: "M16 2v4" }], ["path", { d: "M21 14V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8" }], ["path", { d: "M3 10h18" }], ["path", { d: "m16 20 2 2 4-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-check.js var CalendarCheck; var init_calendar_check = __esmMin((() => { CalendarCheck = [ ["path", { d: "M8 2v4" }], ["path", { d: "M16 2v4" }], ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }], ["path", { d: "M3 10h18" }], ["path", { d: "m9 16 2 2 4-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-clock.js var CalendarClock; var init_calendar_clock = __esmMin((() => { CalendarClock = [ ["path", { d: "M16 14v2.2l1.6 1" }], ["path", { d: "M16 2v4" }], ["path", { d: "M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5" }], ["path", { d: "M3 10h5" }], ["path", { d: "M8 2v4" }], ["circle", { cx: "16", cy: "16", r: "6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-cog.js var CalendarCog; var init_calendar_cog = __esmMin((() => { CalendarCog = [ ["path", { d: "m15.228 16.852-.923-.383" }], ["path", { d: "m15.228 19.148-.923.383" }], ["path", { d: "M16 2v4" }], ["path", { d: "m16.47 14.305.382.923" }], ["path", { d: "m16.852 20.772-.383.924" }], ["path", { d: "m19.148 15.228.383-.923" }], ["path", { d: "m19.53 21.696-.382-.924" }], ["path", { d: "m20.772 16.852.924-.383" }], ["path", { d: "m20.772 19.148.924.383" }], ["path", { d: "M21 10.592V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6" }], ["path", { d: "M3 10h18" }], ["path", { d: "M8 2v4" }], ["circle", { cx: "18", cy: "18", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-days.js var CalendarDays; var init_calendar_days = __esmMin((() => { CalendarDays = [ ["path", { d: "M8 2v4" }], ["path", { d: "M16 2v4" }], ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }], ["path", { d: "M3 10h18" }], ["path", { d: "M8 14h.01" }], ["path", { d: "M12 14h.01" }], ["path", { d: "M16 14h.01" }], ["path", { d: "M8 18h.01" }], ["path", { d: "M12 18h.01" }], ["path", { d: "M16 18h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-fold.js var CalendarFold; var init_calendar_fold = __esmMin((() => { CalendarFold = [ ["path", { d: "M3 20a2 2 0 0 0 2 2h10a2.4 2.4 0 0 0 1.706-.706l3.588-3.588A2.4 2.4 0 0 0 21 16V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z" }], ["path", { d: "M15 22v-5a1 1 0 0 1 1-1h5" }], ["path", { d: "M8 2v4" }], ["path", { d: "M16 2v4" }], ["path", { d: "M3 10h18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-heart.js var CalendarHeart; var init_calendar_heart = __esmMin((() => { CalendarHeart = [ ["path", { d: "M12.127 22H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v5.125" }], ["path", { d: "M14.62 18.8A2.25 2.25 0 1 1 18 15.836a2.25 2.25 0 1 1 3.38 2.966l-2.626 2.856a.998.998 0 0 1-1.507 0z" }], ["path", { d: "M16 2v4" }], ["path", { d: "M3 10h18" }], ["path", { d: "M8 2v4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-minus.js var CalendarMinus; var init_calendar_minus = __esmMin((() => { CalendarMinus = [ ["path", { d: "M16 19h6" }], ["path", { d: "M16 2v4" }], ["path", { d: "M21 15V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8.5" }], ["path", { d: "M3 10h18" }], ["path", { d: "M8 2v4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-minus-2.js var CalendarMinus2; var init_calendar_minus_2 = __esmMin((() => { CalendarMinus2 = [ ["path", { d: "M8 2v4" }], ["path", { d: "M16 2v4" }], ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }], ["path", { d: "M3 10h18" }], ["path", { d: "M10 16h4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-off.js var CalendarOff; var init_calendar_off = __esmMin((() => { CalendarOff = [ ["path", { d: "M4.2 4.2A2 2 0 0 0 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 1.82-1.18" }], ["path", { d: "M21 15.5V6a2 2 0 0 0-2-2H9.5" }], ["path", { d: "M16 2v4" }], ["path", { d: "M3 10h7" }], ["path", { d: "M21 10h-5.5" }], ["path", { d: "m2 2 20 20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-plus-2.js var CalendarPlus2; var init_calendar_plus_2 = __esmMin((() => { CalendarPlus2 = [ ["path", { d: "M8 2v4" }], ["path", { d: "M16 2v4" }], ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }], ["path", { d: "M3 10h18" }], ["path", { d: "M10 16h4" }], ["path", { d: "M12 14v4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-plus.js var CalendarPlus; var init_calendar_plus = __esmMin((() => { CalendarPlus = [ ["path", { d: "M16 19h6" }], ["path", { d: "M16 2v4" }], ["path", { d: "M19 16v6" }], ["path", { d: "M21 12.598V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8.5" }], ["path", { d: "M3 10h18" }], ["path", { d: "M8 2v4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-range.js var CalendarRange; var init_calendar_range = __esmMin((() => { CalendarRange = [ ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }], ["path", { d: "M16 2v4" }], ["path", { d: "M3 10h18" }], ["path", { d: "M8 2v4" }], ["path", { d: "M17 14h-6" }], ["path", { d: "M13 18H7" }], ["path", { d: "M7 14h.01" }], ["path", { d: "M17 18h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-search.js var CalendarSearch; var init_calendar_search = __esmMin((() => { CalendarSearch = [ ["path", { d: "M16 2v4" }], ["path", { d: "M21 11.75V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7.25" }], ["path", { d: "m22 22-1.875-1.875" }], ["path", { d: "M3 10h18" }], ["path", { d: "M8 2v4" }], ["circle", { cx: "18", cy: "18", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-sync.js var CalendarSync; var init_calendar_sync = __esmMin((() => { CalendarSync = [ ["path", { d: "M11 10v4h4" }], ["path", { d: "m11 14 1.535-1.605a5 5 0 0 1 8 1.5" }], ["path", { d: "M16 2v4" }], ["path", { d: "m21 18-1.535 1.605a5 5 0 0 1-8-1.5" }], ["path", { d: "M21 22v-4h-4" }], ["path", { d: "M21 8.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h4.3" }], ["path", { d: "M3 10h4" }], ["path", { d: "M8 2v4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-x-2.js var CalendarX2; var init_calendar_x_2 = __esmMin((() => { CalendarX2 = [ ["path", { d: "M8 2v4" }], ["path", { d: "M16 2v4" }], ["path", { d: "M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8" }], ["path", { d: "M3 10h18" }], ["path", { d: "m17 22 5-5" }], ["path", { d: "m17 17 5 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar-x.js var CalendarX; var init_calendar_x = __esmMin((() => { CalendarX = [ ["path", { d: "M8 2v4" }], ["path", { d: "M16 2v4" }], ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }], ["path", { d: "M3 10h18" }], ["path", { d: "m14 14-4 4" }], ["path", { d: "m10 14 4 4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendar.js var Calendar; var init_calendar = __esmMin((() => { Calendar = [ ["path", { d: "M8 2v4" }], ["path", { d: "M16 2v4" }], ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }], ["path", { d: "M3 10h18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/calendars.js var Calendars; var init_calendars = __esmMin((() => { Calendars = [ ["path", { d: "M12 2v2" }], ["path", { d: "M15.726 21.01A2 2 0 0 1 14 22H4a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2" }], ["path", { d: "M18 2v2" }], ["path", { d: "M2 13h2" }], ["path", { d: "M8 8h14" }], ["rect", { x: "8", y: "3", width: "14", height: "14", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/camera-off.js var CameraOff; var init_camera_off = __esmMin((() => { CameraOff = [ ["path", { d: "M14.564 14.558a3 3 0 1 1-4.122-4.121" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M20 20H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 .819-.175" }], ["path", { d: "M9.695 4.024A2 2 0 0 1 10.004 4h3.993a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v7.344" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/camera.js var Camera; var init_camera = __esmMin((() => { Camera = [["path", { d: "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z" }], ["circle", { cx: "12", cy: "13", r: "3" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/candy-cane.js var CandyCane; var init_candy_cane = __esmMin((() => { CandyCane = [ ["path", { d: "M5.7 21a2 2 0 0 1-3.5-2l8.6-14a6 6 0 0 1 10.4 6 2 2 0 1 1-3.464-2 2 2 0 1 0-3.464-2Z" }], ["path", { d: "M17.75 7 15 2.1" }], ["path", { d: "M10.9 4.8 13 9" }], ["path", { d: "m7.9 9.7 2 4.4" }], ["path", { d: "M4.9 14.7 7 18.9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/candy-off.js var CandyOff; var init_candy_off = __esmMin((() => { CandyOff = [ ["path", { d: "M10 10v7.9" }], ["path", { d: "M11.802 6.145a5 5 0 0 1 6.053 6.053" }], ["path", { d: "M14 6.1v2.243" }], ["path", { d: "m15.5 15.571-.964.964a5 5 0 0 1-7.071 0 5 5 0 0 1 0-7.07l.964-.965" }], ["path", { d: "M16 7V3a1 1 0 0 1 1.707-.707 2.5 2.5 0 0 0 2.152.717 1 1 0 0 1 1.131 1.131 2.5 2.5 0 0 0 .717 2.152A1 1 0 0 1 21 8h-4" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M8 17v4a1 1 0 0 1-1.707.707 2.5 2.5 0 0 0-2.152-.717 1 1 0 0 1-1.131-1.131 2.5 2.5 0 0 0-.717-2.152A1 1 0 0 1 3 16h4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cannabis.js var Cannabis; var init_cannabis = __esmMin((() => { Cannabis = [["path", { d: "M12 22v-4" }], ["path", { d: "M7 12c-1.5 0-4.5 1.5-5 3 3.5 1.5 6 1 6 1-1.5 1.5-2 3.5-2 5 2.5 0 4.5-1.5 6-3 1.5 1.5 3.5 3 6 3 0-1.5-.5-3.5-2-5 0 0 2.5.5 6-1-.5-1.5-3.5-3-5-3 1.5-1 4-4 4-6-2.5 0-5.5 1.5-7 3 0-2.5-.5-5-2-7-1.5 2-2 4.5-2 7-1.5-1.5-4.5-3-7-3 0 2 2.5 5 4 6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/captions-off.js var CaptionsOff; var init_captions_off = __esmMin((() => { CaptionsOff = [ ["path", { d: "M10.5 5H19a2 2 0 0 1 2 2v8.5" }], ["path", { d: "M17 11h-.5" }], ["path", { d: "M19 19H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M7 11h4" }], ["path", { d: "M7 15h2.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/candy.js var Candy; var init_candy = __esmMin((() => { Candy = [ ["path", { d: "M10 7v10.9" }], ["path", { d: "M14 6.1V17" }], ["path", { d: "M16 7V3a1 1 0 0 1 1.707-.707 2.5 2.5 0 0 0 2.152.717 1 1 0 0 1 1.131 1.131 2.5 2.5 0 0 0 .717 2.152A1 1 0 0 1 21 8h-4" }], ["path", { d: "M16.536 7.465a5 5 0 0 0-7.072 0l-2 2a5 5 0 0 0 0 7.07 5 5 0 0 0 7.072 0l2-2a5 5 0 0 0 0-7.07" }], ["path", { d: "M8 17v4a1 1 0 0 1-1.707.707 2.5 2.5 0 0 0-2.152-.717 1 1 0 0 1-1.131-1.131 2.5 2.5 0 0 0-.717-2.152A1 1 0 0 1 3 16h4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/captions.js var Captions; var init_captions = __esmMin((() => { Captions = [["rect", { width: "18", height: "14", x: "3", y: "5", rx: "2", ry: "2" }], ["path", { d: "M7 15h4M15 15h2M7 11h2M13 11h4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/car-front.js var CarFront; var init_car_front = __esmMin((() => { CarFront = [ ["path", { d: "m21 8-2 2-1.5-3.7A2 2 0 0 0 15.646 5H8.4a2 2 0 0 0-1.903 1.257L5 10 3 8" }], ["path", { d: "M7 14h.01" }], ["path", { d: "M17 14h.01" }], ["rect", { width: "18", height: "8", x: "3", y: "10", rx: "2" }], ["path", { d: "M5 18v2" }], ["path", { d: "M19 18v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/car-taxi-front.js var CarTaxiFront; var init_car_taxi_front = __esmMin((() => { CarTaxiFront = [ ["path", { d: "M10 2h4" }], ["path", { d: "m21 8-2 2-1.5-3.7A2 2 0 0 0 15.646 5H8.4a2 2 0 0 0-1.903 1.257L5 10 3 8" }], ["path", { d: "M7 14h.01" }], ["path", { d: "M17 14h.01" }], ["rect", { width: "18", height: "8", x: "3", y: "10", rx: "2" }], ["path", { d: "M5 18v2" }], ["path", { d: "M19 18v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/car.js var Car; var init_car = __esmMin((() => { Car = [ ["path", { d: "M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2" }], ["circle", { cx: "7", cy: "17", r: "2" }], ["path", { d: "M9 17h6" }], ["circle", { cx: "17", cy: "17", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/caravan.js var Caravan; var init_caravan = __esmMin((() => { Caravan = [ ["path", { d: "M18 19V9a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v8a2 2 0 0 0 2 2h2" }], ["path", { d: "M2 9h3a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2" }], ["path", { d: "M22 17v1a1 1 0 0 1-1 1H10v-9a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v9" }], ["circle", { cx: "8", cy: "19", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/card-sim.js var CardSim; var init_card_sim = __esmMin((() => { CardSim = [ ["path", { d: "M12 14v4" }], ["path", { d: "M14.172 2a2 2 0 0 1 1.414.586l3.828 3.828A2 2 0 0 1 20 7.828V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z" }], ["path", { d: "M8 14h8" }], ["rect", { x: "8", y: "10", width: "8", height: "8", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/carrot.js var Carrot; var init_carrot = __esmMin((() => { Carrot = [ ["path", { d: "M2.27 21.7s9.87-3.5 12.73-6.36a4.5 4.5 0 0 0-6.36-6.37C5.77 11.84 2.27 21.7 2.27 21.7zM8.64 14l-2.05-2.04M15.34 15l-2.46-2.46" }], ["path", { d: "M22 9s-1.33-2-3.5-2C16.86 7 15 9 15 9s1.33 2 3.5 2S22 9 22 9z" }], ["path", { d: "M15 2s-2 1.33-2 3.5S15 9 15 9s2-1.84 2-3.5C17 3.33 15 2 15 2z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/case-lower.js var CaseLower; var init_case_lower = __esmMin((() => { CaseLower = [ ["path", { d: "M10 9v7" }], ["path", { d: "M14 6v10" }], ["circle", { cx: "17.5", cy: "12.5", r: "3.5" }], ["circle", { cx: "6.5", cy: "12.5", r: "3.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/case-sensitive.js var CaseSensitive; var init_case_sensitive = __esmMin((() => { CaseSensitive = [ ["path", { d: "m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16" }], ["path", { d: "M22 9v7" }], ["path", { d: "M3.304 13h6.392" }], ["circle", { cx: "18.5", cy: "12.5", r: "3.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/case-upper.js var CaseUpper; var init_case_upper = __esmMin((() => { CaseUpper = [ ["path", { d: "M15 11h4.5a1 1 0 0 1 0 5h-4a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h3a1 1 0 0 1 0 5" }], ["path", { d: "m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16" }], ["path", { d: "M3.304 13h6.392" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cassette-tape.js var CassetteTape; var init_cassette_tape = __esmMin((() => { CassetteTape = [ ["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2" }], ["circle", { cx: "8", cy: "10", r: "2" }], ["path", { d: "M8 12h8" }], ["circle", { cx: "16", cy: "10", r: "2" }], ["path", { d: "m6 20 .7-2.9A1.4 1.4 0 0 1 8.1 16h7.8a1.4 1.4 0 0 1 1.4 1l.7 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cast.js var Cast; var init_cast = __esmMin((() => { Cast = [ ["path", { d: "M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6" }], ["path", { d: "M2 12a9 9 0 0 1 8 8" }], ["path", { d: "M2 16a5 5 0 0 1 4 4" }], ["line", { x1: "2", x2: "2.01", y1: "20", y2: "20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/castle.js var Castle; var init_castle = __esmMin((() => { Castle = [ ["path", { d: "M10 5V3" }], ["path", { d: "M14 5V3" }], ["path", { d: "M15 21v-3a3 3 0 0 0-6 0v3" }], ["path", { d: "M18 3v8" }], ["path", { d: "M18 5H6" }], ["path", { d: "M22 11H2" }], ["path", { d: "M22 9v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9" }], ["path", { d: "M6 3v8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cat.js var Cat; var init_cat = __esmMin((() => { Cat = [ ["path", { d: "M12 5c.67 0 1.35.09 2 .26 1.78-2 5.03-2.84 6.42-2.26 1.4.58-.42 7-.42 7 .57 1.07 1 2.24 1 3.44C21 17.9 16.97 21 12 21s-9-3-9-7.56c0-1.25.5-2.4 1-3.44 0 0-1.89-6.42-.5-7 1.39-.58 4.72.23 6.5 2.23A9.04 9.04 0 0 1 12 5Z" }], ["path", { d: "M8 14v.5" }], ["path", { d: "M16 14v.5" }], ["path", { d: "M11.25 16.25h1.5L12 17l-.75-.75Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cctv.js var Cctv; var init_cctv = __esmMin((() => { Cctv = [ ["path", { d: "M16.75 12h3.632a1 1 0 0 1 .894 1.447l-2.034 4.069a1 1 0 0 1-1.708.134l-2.124-2.97" }], ["path", { d: "M17.106 9.053a1 1 0 0 1 .447 1.341l-3.106 6.211a1 1 0 0 1-1.342.447L3.61 12.3a2.92 2.92 0 0 1-1.3-3.91L3.69 5.6a2.92 2.92 0 0 1 3.92-1.3z" }], ["path", { d: "M2 19h3.76a2 2 0 0 0 1.8-1.1L9 15" }], ["path", { d: "M2 21v-4" }], ["path", { d: "M7 9h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-area.js var ChartArea; var init_chart_area = __esmMin((() => { ChartArea = [["path", { d: "M3 3v16a2 2 0 0 0 2 2h16" }], ["path", { d: "M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-bar-big.js var ChartBarBig; var init_chart_bar_big = __esmMin((() => { ChartBarBig = [ ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16" }], ["rect", { x: "7", y: "13", width: "9", height: "4", rx: "1" }], ["rect", { x: "7", y: "5", width: "12", height: "4", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-bar-decreasing.js var ChartBarDecreasing; var init_chart_bar_decreasing = __esmMin((() => { ChartBarDecreasing = [ ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16" }], ["path", { d: "M7 11h8" }], ["path", { d: "M7 16h3" }], ["path", { d: "M7 6h12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-bar-increasing.js var ChartBarIncreasing; var init_chart_bar_increasing = __esmMin((() => { ChartBarIncreasing = [ ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16" }], ["path", { d: "M7 11h8" }], ["path", { d: "M7 16h12" }], ["path", { d: "M7 6h3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-bar-stacked.js var ChartBarStacked; var init_chart_bar_stacked = __esmMin((() => { ChartBarStacked = [ ["path", { d: "M11 13v4" }], ["path", { d: "M15 5v4" }], ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16" }], ["rect", { x: "7", y: "13", width: "9", height: "4", rx: "1" }], ["rect", { x: "7", y: "5", width: "12", height: "4", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-bar.js var ChartBar; var init_chart_bar = __esmMin((() => { ChartBar = [ ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16" }], ["path", { d: "M7 16h8" }], ["path", { d: "M7 11h12" }], ["path", { d: "M7 6h3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-candlestick.js var ChartCandlestick; var init_chart_candlestick = __esmMin((() => { ChartCandlestick = [ ["path", { d: "M9 5v4" }], ["rect", { width: "4", height: "6", x: "7", y: "9", rx: "1" }], ["path", { d: "M9 15v2" }], ["path", { d: "M17 3v2" }], ["rect", { width: "4", height: "8", x: "15", y: "5", rx: "1" }], ["path", { d: "M17 13v3" }], ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-column-big.js var ChartColumnBig; var init_chart_column_big = __esmMin((() => { ChartColumnBig = [ ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16" }], ["rect", { x: "15", y: "5", width: "4", height: "12", rx: "1" }], ["rect", { x: "7", y: "8", width: "4", height: "9", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-column-increasing.js var ChartColumnIncreasing; var init_chart_column_increasing = __esmMin((() => { ChartColumnIncreasing = [ ["path", { d: "M13 17V9" }], ["path", { d: "M18 17V5" }], ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16" }], ["path", { d: "M8 17v-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-column-decreasing.js var ChartColumnDecreasing; var init_chart_column_decreasing = __esmMin((() => { ChartColumnDecreasing = [ ["path", { d: "M13 17V9" }], ["path", { d: "M18 17v-3" }], ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16" }], ["path", { d: "M8 17V5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-column-stacked.js var ChartColumnStacked; var init_chart_column_stacked = __esmMin((() => { ChartColumnStacked = [ ["path", { d: "M11 13H7" }], ["path", { d: "M19 9h-4" }], ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16" }], ["rect", { x: "15", y: "5", width: "4", height: "12", rx: "1" }], ["rect", { x: "7", y: "8", width: "4", height: "9", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-column.js var ChartColumn; var init_chart_column = __esmMin((() => { ChartColumn = [ ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16" }], ["path", { d: "M18 17V9" }], ["path", { d: "M13 17V5" }], ["path", { d: "M8 17v-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-gantt.js var ChartGantt; var init_chart_gantt = __esmMin((() => { ChartGantt = [ ["path", { d: "M10 6h8" }], ["path", { d: "M12 16h6" }], ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16" }], ["path", { d: "M8 11h7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-line.js var ChartLine; var init_chart_line = __esmMin((() => { ChartLine = [["path", { d: "M3 3v16a2 2 0 0 0 2 2h16" }], ["path", { d: "m19 9-5 5-4-4-3 3" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-network.js var ChartNetwork; var init_chart_network = __esmMin((() => { ChartNetwork = [ ["path", { d: "m13.11 7.664 1.78 2.672" }], ["path", { d: "m14.162 12.788-3.324 1.424" }], ["path", { d: "m20 4-6.06 1.515" }], ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16" }], ["circle", { cx: "12", cy: "6", r: "2" }], ["circle", { cx: "16", cy: "12", r: "2" }], ["circle", { cx: "9", cy: "15", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-no-axes-column-decreasing.js var ChartNoAxesColumnDecreasing; var init_chart_no_axes_column_decreasing = __esmMin((() => { ChartNoAxesColumnDecreasing = [ ["path", { d: "M5 21V3" }], ["path", { d: "M12 21V9" }], ["path", { d: "M19 21v-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-no-axes-column-increasing.js var ChartNoAxesColumnIncreasing; var init_chart_no_axes_column_increasing = __esmMin((() => { ChartNoAxesColumnIncreasing = [ ["path", { d: "M5 21v-6" }], ["path", { d: "M12 21V9" }], ["path", { d: "M19 21V3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-no-axes-column.js var ChartNoAxesColumn; var init_chart_no_axes_column = __esmMin((() => { ChartNoAxesColumn = [ ["path", { d: "M5 21v-6" }], ["path", { d: "M12 21V3" }], ["path", { d: "M19 21V9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-no-axes-combined.js var ChartNoAxesCombined; var init_chart_no_axes_combined = __esmMin((() => { ChartNoAxesCombined = [ ["path", { d: "M12 16v5" }], ["path", { d: "M16 14v7" }], ["path", { d: "M20 10v11" }], ["path", { d: "m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15" }], ["path", { d: "M4 18v3" }], ["path", { d: "M8 14v7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-no-axes-gantt.js var ChartNoAxesGantt; var init_chart_no_axes_gantt = __esmMin((() => { ChartNoAxesGantt = [ ["path", { d: "M6 5h12" }], ["path", { d: "M4 12h10" }], ["path", { d: "M12 19h8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-pie.js var ChartPie; var init_chart_pie = __esmMin((() => { ChartPie = [["path", { d: "M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z" }], ["path", { d: "M21.21 15.89A10 10 0 1 1 8 2.83" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-scatter.js var ChartScatter; var init_chart_scatter = __esmMin((() => { ChartScatter = [ ["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor" }], ["circle", { cx: "18.5", cy: "5.5", r: ".5", fill: "currentColor" }], ["circle", { cx: "11.5", cy: "11.5", r: ".5", fill: "currentColor" }], ["circle", { cx: "7.5", cy: "16.5", r: ".5", fill: "currentColor" }], ["circle", { cx: "17.5", cy: "14.5", r: ".5", fill: "currentColor" }], ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chart-spline.js var ChartSpline; var init_chart_spline = __esmMin((() => { ChartSpline = [["path", { d: "M3 3v16a2 2 0 0 0 2 2h16" }], ["path", { d: "M7 16c.5-2 1.5-7 4-7 2 0 2 3 4 3 2.5 0 4.5-5 5-7" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/check-check.js var CheckCheck; var init_check_check = __esmMin((() => { CheckCheck = [["path", { d: "M18 6 7 17l-5-5" }], ["path", { d: "m22 10-7.5 7.5L13 16" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/check-line.js var CheckLine; var init_check_line = __esmMin((() => { CheckLine = [ ["path", { d: "M20 4L9 15" }], ["path", { d: "M21 19L3 19" }], ["path", { d: "M9 15L4 10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/check.js var Check; var init_check = __esmMin((() => { Check = [["path", { d: "M20 6 9 17l-5-5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chef-hat.js var ChefHat; var init_chef_hat = __esmMin((() => { ChefHat = [["path", { d: "M17 21a1 1 0 0 0 1-1v-5.35c0-.457.316-.844.727-1.041a4 4 0 0 0-2.134-7.589 5 5 0 0 0-9.186 0 4 4 0 0 0-2.134 7.588c.411.198.727.585.727 1.041V20a1 1 0 0 0 1 1Z" }], ["path", { d: "M6 17h12" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cherry.js var Cherry; var init_cherry = __esmMin((() => { Cherry = [ ["path", { d: "M2 17a5 5 0 0 0 10 0c0-2.76-2.5-5-5-3-2.5-2-5 .24-5 3Z" }], ["path", { d: "M12 17a5 5 0 0 0 10 0c0-2.76-2.5-5-5-3-2.5-2-5 .24-5 3Z" }], ["path", { d: "M7 14c3.22-2.91 4.29-8.75 5-12 1.66 2.38 4.94 9 5 12" }], ["path", { d: "M22 9c-4.29 0-7.14-2.33-10-7 5.71 0 10 4.67 10 7Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chess-bishop.js var ChessBishop; var init_chess_bishop = __esmMin((() => { ChessBishop = [ ["path", { d: "M5 20a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1z" }], ["path", { d: "M15 18c1.5-.615 3-2.461 3-4.923C18 8.769 14.5 4.462 12 2 9.5 4.462 6 8.77 6 13.077 6 15.539 7.5 17.385 9 18" }], ["path", { d: "m16 7-2.5 2.5" }], ["path", { d: "M9 2h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chess-king.js var ChessKing; var init_chess_king = __esmMin((() => { ChessKing = [ ["path", { d: "M4 20a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1z" }], ["path", { d: "m6.7 18-1-1C4.35 15.682 3 14.09 3 12a5 5 0 0 1 4.95-5c1.584 0 2.7.455 4.05 1.818C13.35 7.455 14.466 7 16.05 7A5 5 0 0 1 21 12c0 2.082-1.359 3.673-2.7 5l-1 1" }], ["path", { d: "M10 4h4" }], ["path", { d: "M12 2v6.818" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chess-knight.js var ChessKnight; var init_chess_knight = __esmMin((() => { ChessKnight = [ ["path", { d: "M5 20a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1z" }], ["path", { d: "M16.5 18c1-2 2.5-5 2.5-9a7 7 0 0 0-7-7H6.635a1 1 0 0 0-.768 1.64L7 5l-2.32 5.802a2 2 0 0 0 .95 2.526l2.87 1.456" }], ["path", { d: "m15 5 1.425-1.425" }], ["path", { d: "m17 8 1.53-1.53" }], ["path", { d: "M9.713 12.185 7 18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chess-pawn.js var ChessPawn; var init_chess_pawn = __esmMin((() => { ChessPawn = [ ["path", { d: "M5 20a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1z" }], ["path", { d: "m14.5 10 1.5 8" }], ["path", { d: "M7 10h10" }], ["path", { d: "m8 18 1.5-8" }], ["circle", { cx: "12", cy: "6", r: "4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chess-queen.js var ChessQueen; var init_chess_queen = __esmMin((() => { ChessQueen = [ ["path", { d: "M4 20a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1z" }], ["path", { d: "m12.474 5.943 1.567 5.34a1 1 0 0 0 1.75.328l2.616-3.402" }], ["path", { d: "m20 9-3 9" }], ["path", { d: "m5.594 8.209 2.615 3.403a1 1 0 0 0 1.75-.329l1.567-5.34" }], ["path", { d: "M7 18 4 9" }], ["circle", { cx: "12", cy: "4", r: "2" }], ["circle", { cx: "20", cy: "7", r: "2" }], ["circle", { cx: "4", cy: "7", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chess-rook.js var ChessRook; var init_chess_rook = __esmMin((() => { ChessRook = [ ["path", { d: "M5 20a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1z" }], ["path", { d: "M10 2v2" }], ["path", { d: "M14 2v2" }], ["path", { d: "m17 18-1-9" }], ["path", { d: "M6 2v5a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V2" }], ["path", { d: "M6 4h12" }], ["path", { d: "m7 18 1-9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chevron-down.js var ChevronDown; var init_chevron_down = __esmMin((() => { ChevronDown = [["path", { d: "m6 9 6 6 6-6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chevron-first.js var ChevronFirst; var init_chevron_first = __esmMin((() => { ChevronFirst = [["path", { d: "m17 18-6-6 6-6" }], ["path", { d: "M7 6v12" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chevron-last.js var ChevronLast; var init_chevron_last = __esmMin((() => { ChevronLast = [["path", { d: "m7 18 6-6-6-6" }], ["path", { d: "M17 6v12" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chevron-left.js var ChevronLeft; var init_chevron_left = __esmMin((() => { ChevronLeft = [["path", { d: "m15 18-6-6 6-6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chevron-right.js var ChevronRight; var init_chevron_right = __esmMin((() => { ChevronRight = [["path", { d: "m9 18 6-6-6-6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chevron-up.js var ChevronUp; var init_chevron_up = __esmMin((() => { ChevronUp = [["path", { d: "m18 15-6-6-6 6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chevrons-down-up.js var ChevronsDownUp; var init_chevrons_down_up = __esmMin((() => { ChevronsDownUp = [["path", { d: "m7 20 5-5 5 5" }], ["path", { d: "m7 4 5 5 5-5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chevrons-down.js var ChevronsDown; var init_chevrons_down = __esmMin((() => { ChevronsDown = [["path", { d: "m7 6 5 5 5-5" }], ["path", { d: "m7 13 5 5 5-5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chevrons-left-right-ellipsis.js var ChevronsLeftRightEllipsis; var init_chevrons_left_right_ellipsis = __esmMin((() => { ChevronsLeftRightEllipsis = [ ["path", { d: "M12 12h.01" }], ["path", { d: "M16 12h.01" }], ["path", { d: "m17 7 5 5-5 5" }], ["path", { d: "m7 7-5 5 5 5" }], ["path", { d: "M8 12h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chevrons-left-right.js var ChevronsLeftRight; var init_chevrons_left_right = __esmMin((() => { ChevronsLeftRight = [["path", { d: "m9 7-5 5 5 5" }], ["path", { d: "m15 7 5 5-5 5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chevrons-left.js var ChevronsLeft; var init_chevrons_left = __esmMin((() => { ChevronsLeft = [["path", { d: "m11 17-5-5 5-5" }], ["path", { d: "m18 17-5-5 5-5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chevrons-right-left.js var ChevronsRightLeft; var init_chevrons_right_left = __esmMin((() => { ChevronsRightLeft = [["path", { d: "m20 17-5-5 5-5" }], ["path", { d: "m4 17 5-5-5-5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chevrons-right.js var ChevronsRight; var init_chevrons_right = __esmMin((() => { ChevronsRight = [["path", { d: "m6 17 5-5-5-5" }], ["path", { d: "m13 17 5-5-5-5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chevrons-up-down.js var ChevronsUpDown; var init_chevrons_up_down = __esmMin((() => { ChevronsUpDown = [["path", { d: "m7 15 5 5 5-5" }], ["path", { d: "m7 9 5-5 5 5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chevrons-up.js var ChevronsUp; var init_chevrons_up = __esmMin((() => { ChevronsUp = [["path", { d: "m17 11-5-5-5 5" }], ["path", { d: "m17 18-5-5-5 5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/chromium.js var Chromium; var init_chromium = __esmMin((() => { Chromium = [ ["path", { d: "M10.88 21.94 15.46 14" }], ["path", { d: "M21.17 8H12" }], ["path", { d: "M3.95 6.06 8.54 14" }], ["circle", { cx: "12", cy: "12", r: "10" }], ["circle", { cx: "12", cy: "12", r: "4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/church.js var Church; var init_church = __esmMin((() => { Church = [ ["path", { d: "M10 9h4" }], ["path", { d: "M12 7v5" }], ["path", { d: "M14 21v-3a2 2 0 0 0-4 0v3" }], ["path", { d: "m18 9 3.52 2.147a1 1 0 0 1 .48.854V19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-6.999a1 1 0 0 1 .48-.854L6 9" }], ["path", { d: "M6 21V7a1 1 0 0 1 .376-.782l5-3.999a1 1 0 0 1 1.249.001l5 4A1 1 0 0 1 18 7v14" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cigarette-off.js var CigaretteOff; var init_cigarette_off = __esmMin((() => { CigaretteOff = [ ["path", { d: "M12 12H3a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h13" }], ["path", { d: "M18 8c0-2.5-2-2.5-2-5" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M21 12a1 1 0 0 1 1 1v2a1 1 0 0 1-.5.866" }], ["path", { d: "M22 8c0-2.5-2-2.5-2-5" }], ["path", { d: "M7 12v4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cigarette.js var Cigarette; var init_cigarette = __esmMin((() => { Cigarette = [ ["path", { d: "M17 12H3a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h14" }], ["path", { d: "M18 8c0-2.5-2-2.5-2-5" }], ["path", { d: "M21 16a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1" }], ["path", { d: "M22 8c0-2.5-2-2.5-2-5" }], ["path", { d: "M7 12v4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-alert.js var CircleAlert; var init_circle_alert = __esmMin((() => { CircleAlert = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["line", { x1: "12", x2: "12", y1: "8", y2: "12" }], ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-arrow-down.js var CircleArrowDown; var init_circle_arrow_down = __esmMin((() => { CircleArrowDown = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M12 8v8" }], ["path", { d: "m8 12 4 4 4-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-arrow-left.js var CircleArrowLeft; var init_circle_arrow_left = __esmMin((() => { CircleArrowLeft = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "m12 8-4 4 4 4" }], ["path", { d: "M16 12H8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-arrow-out-down-left.js var CircleArrowOutDownLeft; var init_circle_arrow_out_down_left = __esmMin((() => { CircleArrowOutDownLeft = [ ["path", { d: "M2 12a10 10 0 1 1 10 10" }], ["path", { d: "m2 22 10-10" }], ["path", { d: "M8 22H2v-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-arrow-out-down-right.js var CircleArrowOutDownRight; var init_circle_arrow_out_down_right = __esmMin((() => { CircleArrowOutDownRight = [ ["path", { d: "M12 22a10 10 0 1 1 10-10" }], ["path", { d: "M22 22 12 12" }], ["path", { d: "M22 16v6h-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-arrow-out-up-left.js var CircleArrowOutUpLeft; var init_circle_arrow_out_up_left = __esmMin((() => { CircleArrowOutUpLeft = [ ["path", { d: "M2 8V2h6" }], ["path", { d: "m2 2 10 10" }], ["path", { d: "M12 2A10 10 0 1 1 2 12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-arrow-out-up-right.js var CircleArrowOutUpRight; var init_circle_arrow_out_up_right = __esmMin((() => { CircleArrowOutUpRight = [ ["path", { d: "M22 12A10 10 0 1 1 12 2" }], ["path", { d: "M22 2 12 12" }], ["path", { d: "M16 2h6v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-arrow-right.js var CircleArrowRight; var init_circle_arrow_right = __esmMin((() => { CircleArrowRight = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "m12 16 4-4-4-4" }], ["path", { d: "M8 12h8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-arrow-up.js var CircleArrowUp; var init_circle_arrow_up = __esmMin((() => { CircleArrowUp = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "m16 12-4-4-4 4" }], ["path", { d: "M12 16V8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-check-big.js var CircleCheckBig; var init_circle_check_big = __esmMin((() => { CircleCheckBig = [["path", { d: "M21.801 10A10 10 0 1 1 17 3.335" }], ["path", { d: "m9 11 3 3L22 4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-check.js var CircleCheck; var init_circle_check = __esmMin((() => { CircleCheck = [["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "m9 12 2 2 4-4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-chevron-down.js var CircleChevronDown; var init_circle_chevron_down = __esmMin((() => { CircleChevronDown = [["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "m16 10-4 4-4-4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-chevron-left.js var CircleChevronLeft; var init_circle_chevron_left = __esmMin((() => { CircleChevronLeft = [["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "m14 16-4-4 4-4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-chevron-right.js var CircleChevronRight; var init_circle_chevron_right = __esmMin((() => { CircleChevronRight = [["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "m10 8 4 4-4 4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-chevron-up.js var CircleChevronUp; var init_circle_chevron_up = __esmMin((() => { CircleChevronUp = [["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "m8 14 4-4 4 4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-dashed.js var CircleDashed; var init_circle_dashed = __esmMin((() => { CircleDashed = [ ["path", { d: "M10.1 2.182a10 10 0 0 1 3.8 0" }], ["path", { d: "M13.9 21.818a10 10 0 0 1-3.8 0" }], ["path", { d: "M17.609 3.721a10 10 0 0 1 2.69 2.7" }], ["path", { d: "M2.182 13.9a10 10 0 0 1 0-3.8" }], ["path", { d: "M20.279 17.609a10 10 0 0 1-2.7 2.69" }], ["path", { d: "M21.818 10.1a10 10 0 0 1 0 3.8" }], ["path", { d: "M3.721 6.391a10 10 0 0 1 2.7-2.69" }], ["path", { d: "M6.391 20.279a10 10 0 0 1-2.69-2.7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-divide.js var CircleDivide; var init_circle_divide = __esmMin((() => { CircleDivide = [ ["line", { x1: "8", x2: "16", y1: "12", y2: "12" }], ["line", { x1: "12", x2: "12", y1: "16", y2: "16" }], ["line", { x1: "12", x2: "12", y1: "8", y2: "8" }], ["circle", { cx: "12", cy: "12", r: "10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-dollar-sign.js var CircleDollarSign; var init_circle_dollar_sign = __esmMin((() => { CircleDollarSign = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8" }], ["path", { d: "M12 18V6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-dot-dashed.js var CircleDotDashed; var init_circle_dot_dashed = __esmMin((() => { CircleDotDashed = [ ["path", { d: "M10.1 2.18a9.93 9.93 0 0 1 3.8 0" }], ["path", { d: "M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7" }], ["path", { d: "M21.82 10.1a9.93 9.93 0 0 1 0 3.8" }], ["path", { d: "M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69" }], ["path", { d: "M13.9 21.82a9.94 9.94 0 0 1-3.8 0" }], ["path", { d: "M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7" }], ["path", { d: "M2.18 13.9a9.93 9.93 0 0 1 0-3.8" }], ["path", { d: "M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69" }], ["circle", { cx: "12", cy: "12", r: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-dot.js var CircleDot; var init_circle_dot = __esmMin((() => { CircleDot = [["circle", { cx: "12", cy: "12", r: "10" }], ["circle", { cx: "12", cy: "12", r: "1" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-ellipsis.js var CircleEllipsis; var init_circle_ellipsis = __esmMin((() => { CircleEllipsis = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M17 12h.01" }], ["path", { d: "M12 12h.01" }], ["path", { d: "M7 12h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-equal.js var CircleEqual; var init_circle_equal = __esmMin((() => { CircleEqual = [ ["path", { d: "M7 10h10" }], ["path", { d: "M7 14h10" }], ["circle", { cx: "12", cy: "12", r: "10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-fading-arrow-up.js var CircleFadingArrowUp; var init_circle_fading_arrow_up = __esmMin((() => { CircleFadingArrowUp = [ ["path", { d: "M12 2a10 10 0 0 1 7.38 16.75" }], ["path", { d: "m16 12-4-4-4 4" }], ["path", { d: "M12 16V8" }], ["path", { d: "M2.5 8.875a10 10 0 0 0-.5 3" }], ["path", { d: "M2.83 16a10 10 0 0 0 2.43 3.4" }], ["path", { d: "M4.636 5.235a10 10 0 0 1 .891-.857" }], ["path", { d: "M8.644 21.42a10 10 0 0 0 7.631-.38" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-fading-plus.js var CircleFadingPlus; var init_circle_fading_plus = __esmMin((() => { CircleFadingPlus = [ ["path", { d: "M12 2a10 10 0 0 1 7.38 16.75" }], ["path", { d: "M12 8v8" }], ["path", { d: "M16 12H8" }], ["path", { d: "M2.5 8.875a10 10 0 0 0-.5 3" }], ["path", { d: "M2.83 16a10 10 0 0 0 2.43 3.4" }], ["path", { d: "M4.636 5.235a10 10 0 0 1 .891-.857" }], ["path", { d: "M8.644 21.42a10 10 0 0 0 7.631-.38" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-gauge.js var CircleGauge; var init_circle_gauge = __esmMin((() => { CircleGauge = [ ["path", { d: "M15.6 2.7a10 10 0 1 0 5.7 5.7" }], ["circle", { cx: "12", cy: "12", r: "2" }], ["path", { d: "M13.4 10.6 19 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-minus.js var CircleMinus; var init_circle_minus = __esmMin((() => { CircleMinus = [["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M8 12h8" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-off.js var CircleOff; var init_circle_off = __esmMin((() => { CircleOff = [ ["path", { d: "m2 2 20 20" }], ["path", { d: "M8.35 2.69A10 10 0 0 1 21.3 15.65" }], ["path", { d: "M19.08 19.08A10 10 0 1 1 4.92 4.92" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-parking-off.js var CircleParkingOff; var init_circle_parking_off = __esmMin((() => { CircleParkingOff = [ ["path", { d: "M12.656 7H13a3 3 0 0 1 2.984 3.307" }], ["path", { d: "M13 13H9" }], ["path", { d: "M19.071 19.071A1 1 0 0 1 4.93 4.93" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M8.357 2.687a10 10 0 0 1 12.956 12.956" }], ["path", { d: "M9 17V9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-parking.js var CircleParking; var init_circle_parking = __esmMin((() => { CircleParking = [["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M9 17V7h4a3 3 0 0 1 0 6H9" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-pause.js var CirclePause; var init_circle_pause = __esmMin((() => { CirclePause = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["line", { x1: "10", x2: "10", y1: "15", y2: "9" }], ["line", { x1: "14", x2: "14", y1: "15", y2: "9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-percent.js var CirclePercent; var init_circle_percent = __esmMin((() => { CirclePercent = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "m15 9-6 6" }], ["path", { d: "M9 9h.01" }], ["path", { d: "M15 15h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-play.js var CirclePlay; var init_circle_play = __esmMin((() => { CirclePlay = [["path", { d: "M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z" }], ["circle", { cx: "12", cy: "12", r: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-plus.js var CirclePlus; var init_circle_plus = __esmMin((() => { CirclePlus = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M8 12h8" }], ["path", { d: "M12 8v8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-pound-sterling.js var CirclePoundSterling; var init_circle_pound_sterling = __esmMin((() => { CirclePoundSterling = [ ["path", { d: "M10 16V9.5a1 1 0 0 1 5 0" }], ["path", { d: "M8 12h4" }], ["path", { d: "M8 16h7" }], ["circle", { cx: "12", cy: "12", r: "10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-power.js var CirclePower; var init_circle_power = __esmMin((() => { CirclePower = [ ["path", { d: "M12 7v4" }], ["path", { d: "M7.998 9.003a5 5 0 1 0 8-.005" }], ["circle", { cx: "12", cy: "12", r: "10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-question-mark.js var CircleQuestionMark; var init_circle_question_mark = __esmMin((() => { CircleQuestionMark = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }], ["path", { d: "M12 17h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-slash-2.js var CircleSlash2; var init_circle_slash_2 = __esmMin((() => { CircleSlash2 = [["path", { d: "M22 2 2 22" }], ["circle", { cx: "12", cy: "12", r: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-slash.js var CircleSlash; var init_circle_slash = __esmMin((() => { CircleSlash = [["circle", { cx: "12", cy: "12", r: "10" }], ["line", { x1: "9", x2: "15", y1: "15", y2: "9" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-small.js var CircleSmall; var init_circle_small = __esmMin((() => { CircleSmall = [["circle", { cx: "12", cy: "12", r: "6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-star.js var CircleStar; var init_circle_star = __esmMin((() => { CircleStar = [["path", { d: "M11.051 7.616a1 1 0 0 1 1.909.024l.737 1.452a1 1 0 0 0 .737.535l1.634.256a1 1 0 0 1 .588 1.806l-1.172 1.168a1 1 0 0 0-.282.866l.259 1.613a1 1 0 0 1-1.541 1.134l-1.465-.75a1 1 0 0 0-.912 0l-1.465.75a1 1 0 0 1-1.539-1.133l.258-1.613a1 1 0 0 0-.282-.867l-1.156-1.152a1 1 0 0 1 .572-1.822l1.633-.256a1 1 0 0 0 .737-.535z" }], ["circle", { cx: "12", cy: "12", r: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-stop.js var CircleStop; var init_circle_stop = __esmMin((() => { CircleStop = [["circle", { cx: "12", cy: "12", r: "10" }], ["rect", { x: "9", y: "9", width: "6", height: "6", rx: "1" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-user-round.js var CircleUserRound; var init_circle_user_round = __esmMin((() => { CircleUserRound = [ ["path", { d: "M18 20a6 6 0 0 0-12 0" }], ["circle", { cx: "12", cy: "10", r: "4" }], ["circle", { cx: "12", cy: "12", r: "10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-user.js var CircleUser; var init_circle_user = __esmMin((() => { CircleUser = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["circle", { cx: "12", cy: "10", r: "3" }], ["path", { d: "M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle-x.js var CircleX; var init_circle_x = __esmMin((() => { CircleX = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "m15 9-6 6" }], ["path", { d: "m9 9 6 6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circle.js var Circle; var init_circle = __esmMin((() => { Circle = [["circle", { cx: "12", cy: "12", r: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/circuit-board.js var CircuitBoard; var init_circuit_board = __esmMin((() => { CircuitBoard = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M11 9h4a2 2 0 0 0 2-2V3" }], ["circle", { cx: "9", cy: "9", r: "2" }], ["path", { d: "M7 21v-4a2 2 0 0 1 2-2h4" }], ["circle", { cx: "15", cy: "15", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/citrus.js var Citrus; var init_citrus = __esmMin((() => { Citrus = [ ["path", { d: "M21.66 17.67a1.08 1.08 0 0 1-.04 1.6A12 12 0 0 1 4.73 2.38a1.1 1.1 0 0 1 1.61-.04z" }], ["path", { d: "M19.65 15.66A8 8 0 0 1 8.35 4.34" }], ["path", { d: "m14 10-5.5 5.5" }], ["path", { d: "M14 17.85V10H6.15" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clapperboard.js var Clapperboard; var init_clapperboard = __esmMin((() => { Clapperboard = [ ["path", { d: "M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z" }], ["path", { d: "m6.2 5.3 3.1 3.9" }], ["path", { d: "m12.4 3.4 3.1 4" }], ["path", { d: "M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clipboard-check.js var ClipboardCheck; var init_clipboard_check = __esmMin((() => { ClipboardCheck = [ ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1" }], ["path", { d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" }], ["path", { d: "m9 14 2 2 4-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clipboard-clock.js var ClipboardClock; var init_clipboard_clock = __esmMin((() => { ClipboardClock = [ ["path", { d: "M16 14v2.2l1.6 1" }], ["path", { d: "M16 4h2a2 2 0 0 1 2 2v.832" }], ["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h2" }], ["circle", { cx: "16", cy: "16", r: "6" }], ["rect", { x: "8", y: "2", width: "8", height: "4", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clipboard-copy.js var ClipboardCopy; var init_clipboard_copy = __esmMin((() => { ClipboardCopy = [ ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1" }], ["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2" }], ["path", { d: "M16 4h2a2 2 0 0 1 2 2v4" }], ["path", { d: "M21 14H11" }], ["path", { d: "m15 10-4 4 4 4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clipboard-list.js var ClipboardList; var init_clipboard_list = __esmMin((() => { ClipboardList = [ ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1" }], ["path", { d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" }], ["path", { d: "M12 11h4" }], ["path", { d: "M12 16h4" }], ["path", { d: "M8 11h.01" }], ["path", { d: "M8 16h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clipboard-paste.js var ClipboardPaste; var init_clipboard_paste = __esmMin((() => { ClipboardPaste = [ ["path", { d: "M11 14h10" }], ["path", { d: "M16 4h2a2 2 0 0 1 2 2v1.344" }], ["path", { d: "m17 18 4-4-4-4" }], ["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113" }], ["rect", { x: "8", y: "2", width: "8", height: "4", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clipboard-minus.js var ClipboardMinus; var init_clipboard_minus = __esmMin((() => { ClipboardMinus = [ ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1" }], ["path", { d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" }], ["path", { d: "M9 14h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clipboard-pen-line.js var ClipboardPenLine; var init_clipboard_pen_line = __esmMin((() => { ClipboardPenLine = [ ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1" }], ["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-.5" }], ["path", { d: "M16 4h2a2 2 0 0 1 1.73 1" }], ["path", { d: "M8 18h1" }], ["path", { d: "M21.378 12.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clipboard-pen.js var ClipboardPen; var init_clipboard_pen = __esmMin((() => { ClipboardPen = [ ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1" }], ["path", { d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-5.5" }], ["path", { d: "M4 13.5V6a2 2 0 0 1 2-2h2" }], ["path", { d: "M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clipboard-plus.js var ClipboardPlus; var init_clipboard_plus = __esmMin((() => { ClipboardPlus = [ ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1" }], ["path", { d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" }], ["path", { d: "M9 14h6" }], ["path", { d: "M12 17v-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clipboard-type.js var ClipboardType; var init_clipboard_type = __esmMin((() => { ClipboardType = [ ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1" }], ["path", { d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" }], ["path", { d: "M9 12v-1h6v1" }], ["path", { d: "M11 17h2" }], ["path", { d: "M12 11v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clipboard.js var Clipboard; var init_clipboard = __esmMin((() => { Clipboard = [["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1" }], ["path", { d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clipboard-x.js var ClipboardX; var init_clipboard_x = __esmMin((() => { ClipboardX = [ ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1" }], ["path", { d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" }], ["path", { d: "m15 11-6 6" }], ["path", { d: "m9 11 6 6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clock-1.js var Clock1; var init_clock_1 = __esmMin((() => { Clock1 = [["path", { d: "M12 6v6l2-4" }], ["circle", { cx: "12", cy: "12", r: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clock-10.js var Clock10; var init_clock_10 = __esmMin((() => { Clock10 = [["path", { d: "M12 6v6l-4-2" }], ["circle", { cx: "12", cy: "12", r: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clock-12.js var Clock12; var init_clock_12 = __esmMin((() => { Clock12 = [["path", { d: "M12 6v6" }], ["circle", { cx: "12", cy: "12", r: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clock-2.js var Clock2; var init_clock_2 = __esmMin((() => { Clock2 = [["path", { d: "M12 6v6l4-2" }], ["circle", { cx: "12", cy: "12", r: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clock-3.js var Clock3; var init_clock_3 = __esmMin((() => { Clock3 = [["path", { d: "M12 6v6h4" }], ["circle", { cx: "12", cy: "12", r: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clock-11.js var Clock11; var init_clock_11 = __esmMin((() => { Clock11 = [["path", { d: "M12 6v6l-2-4" }], ["circle", { cx: "12", cy: "12", r: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clock-4.js var Clock4; var init_clock_4 = __esmMin((() => { Clock4 = [["path", { d: "M12 6v6l4 2" }], ["circle", { cx: "12", cy: "12", r: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clock-5.js var Clock5; var init_clock_5 = __esmMin((() => { Clock5 = [["path", { d: "M12 6v6l2 4" }], ["circle", { cx: "12", cy: "12", r: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clock-6.js var Clock6; var init_clock_6 = __esmMin((() => { Clock6 = [["path", { d: "M12 6v10" }], ["circle", { cx: "12", cy: "12", r: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clock-7.js var Clock7; var init_clock_7 = __esmMin((() => { Clock7 = [["path", { d: "M12 6v6l-2 4" }], ["circle", { cx: "12", cy: "12", r: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clock-8.js var Clock8; var init_clock_8 = __esmMin((() => { Clock8 = [["path", { d: "M12 6v6l-4 2" }], ["circle", { cx: "12", cy: "12", r: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clock-9.js var Clock9; var init_clock_9 = __esmMin((() => { Clock9 = [["path", { d: "M12 6v6H8" }], ["circle", { cx: "12", cy: "12", r: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clock-alert.js var ClockAlert; var init_clock_alert = __esmMin((() => { ClockAlert = [ ["path", { d: "M12 6v6l4 2" }], ["path", { d: "M20 12v5" }], ["path", { d: "M20 21h.01" }], ["path", { d: "M21.25 8.2A10 10 0 1 0 16 21.16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clock-arrow-down.js var ClockArrowDown; var init_clock_arrow_down = __esmMin((() => { ClockArrowDown = [ ["path", { d: "M12 6v6l2 1" }], ["path", { d: "M12.337 21.994a10 10 0 1 1 9.588-8.767" }], ["path", { d: "m14 18 4 4 4-4" }], ["path", { d: "M18 14v8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clock-arrow-up.js var ClockArrowUp; var init_clock_arrow_up = __esmMin((() => { ClockArrowUp = [ ["path", { d: "M12 6v6l1.56.78" }], ["path", { d: "M13.227 21.925a10 10 0 1 1 8.767-9.588" }], ["path", { d: "m14 18 4-4 4 4" }], ["path", { d: "M18 22v-8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clock-check.js var ClockCheck; var init_clock_check = __esmMin((() => { ClockCheck = [ ["path", { d: "M12 6v6l4 2" }], ["path", { d: "M22 12a10 10 0 1 0-11 9.95" }], ["path", { d: "m22 16-5.5 5.5L14 19" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clock-fading.js var ClockFading; var init_clock_fading = __esmMin((() => { ClockFading = [ ["path", { d: "M12 2a10 10 0 0 1 7.38 16.75" }], ["path", { d: "M12 6v6l4 2" }], ["path", { d: "M2.5 8.875a10 10 0 0 0-.5 3" }], ["path", { d: "M2.83 16a10 10 0 0 0 2.43 3.4" }], ["path", { d: "M4.636 5.235a10 10 0 0 1 .891-.857" }], ["path", { d: "M8.644 21.42a10 10 0 0 0 7.631-.38" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clock-plus.js var ClockPlus; var init_clock_plus = __esmMin((() => { ClockPlus = [ ["path", { d: "M12 6v6l3.644 1.822" }], ["path", { d: "M16 19h6" }], ["path", { d: "M19 16v6" }], ["path", { d: "M21.92 13.267a10 10 0 1 0-8.653 8.653" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clock.js var Clock; var init_clock = __esmMin((() => { Clock = [["path", { d: "M12 6v6l4 2" }], ["circle", { cx: "12", cy: "12", r: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/closed-caption.js var ClosedCaption; var init_closed_caption = __esmMin((() => { ClosedCaption = [ ["path", { d: "M10 9.17a3 3 0 1 0 0 5.66" }], ["path", { d: "M17 9.17a3 3 0 1 0 0 5.66" }], ["rect", { x: "2", y: "5", width: "20", height: "14", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cloud-alert.js var CloudAlert; var init_cloud_alert = __esmMin((() => { CloudAlert = [ ["path", { d: "M12 12v4" }], ["path", { d: "M12 20h.01" }], ["path", { d: "M17 18h.5a1 1 0 0 0 0-9h-1.79A7 7 0 1 0 7 17.708" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cloud-check.js var CloudCheck; var init_cloud_check = __esmMin((() => { CloudCheck = [["path", { d: "m17 15-5.5 5.5L9 18" }], ["path", { d: "M5 17.743A7 7 0 1 1 15.71 10h1.79a4.5 4.5 0 0 1 1.5 8.742" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cloud-download.js var CloudDownload; var init_cloud_download = __esmMin((() => { CloudDownload = [ ["path", { d: "M12 13v8l-4-4" }], ["path", { d: "m12 21 4-4" }], ["path", { d: "M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cloud-cog.js var CloudCog; var init_cloud_cog = __esmMin((() => { CloudCog = [ ["path", { d: "m10.852 19.772-.383.924" }], ["path", { d: "m13.148 14.228.383-.923" }], ["path", { d: "M13.148 19.772a3 3 0 1 0-2.296-5.544l-.383-.923" }], ["path", { d: "m13.53 20.696-.382-.924a3 3 0 1 1-2.296-5.544" }], ["path", { d: "m14.772 15.852.923-.383" }], ["path", { d: "m14.772 18.148.923.383" }], ["path", { d: "M4.2 15.1a7 7 0 1 1 9.93-9.858A7 7 0 0 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.2" }], ["path", { d: "m9.228 15.852-.923-.383" }], ["path", { d: "m9.228 18.148-.923.383" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cloud-drizzle.js var CloudDrizzle; var init_cloud_drizzle = __esmMin((() => { CloudDrizzle = [ ["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" }], ["path", { d: "M8 19v1" }], ["path", { d: "M8 14v1" }], ["path", { d: "M16 19v1" }], ["path", { d: "M16 14v1" }], ["path", { d: "M12 21v1" }], ["path", { d: "M12 16v1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cloud-fog.js var CloudFog; var init_cloud_fog = __esmMin((() => { CloudFog = [ ["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" }], ["path", { d: "M16 17H7" }], ["path", { d: "M17 21H9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cloud-hail.js var CloudHail; var init_cloud_hail = __esmMin((() => { CloudHail = [ ["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" }], ["path", { d: "M16 14v2" }], ["path", { d: "M8 14v2" }], ["path", { d: "M16 20h.01" }], ["path", { d: "M8 20h.01" }], ["path", { d: "M12 16v2" }], ["path", { d: "M12 22h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cloud-lightning.js var CloudLightning; var init_cloud_lightning = __esmMin((() => { CloudLightning = [["path", { d: "M6 16.326A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 .5 8.973" }], ["path", { d: "m13 12-3 5h4l-3 5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cloud-moon-rain.js var CloudMoonRain; var init_cloud_moon_rain = __esmMin((() => { CloudMoonRain = [ ["path", { d: "M11 20v2" }], ["path", { d: "M18.376 14.512a6 6 0 0 0 3.461-4.127c.148-.625-.659-.97-1.248-.714a4 4 0 0 1-5.259-5.26c.255-.589-.09-1.395-.716-1.248a6 6 0 0 0-4.594 5.36" }], ["path", { d: "M3 20a5 5 0 1 1 8.9-4H13a3 3 0 0 1 2 5.24" }], ["path", { d: "M7 19v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cloud-moon.js var CloudMoon; var init_cloud_moon = __esmMin((() => { CloudMoon = [["path", { d: "M13 16a3 3 0 0 1 0 6H7a5 5 0 1 1 4.9-6z" }], ["path", { d: "M18.376 14.512a6 6 0 0 0 3.461-4.127c.148-.625-.659-.97-1.248-.714a4 4 0 0 1-5.259-5.26c.255-.589-.09-1.395-.716-1.248a6 6 0 0 0-4.594 5.36" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cloud-off.js var CloudOff; var init_cloud_off = __esmMin((() => { CloudOff = [ ["path", { d: "m2 2 20 20" }], ["path", { d: "M5.782 5.782A7 7 0 0 0 9 19h8.5a4.5 4.5 0 0 0 1.307-.193" }], ["path", { d: "M21.532 16.5A4.5 4.5 0 0 0 17.5 10h-1.79A7.008 7.008 0 0 0 10 5.07" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cloud-rain-wind.js var CloudRainWind; var init_cloud_rain_wind = __esmMin((() => { CloudRainWind = [ ["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" }], ["path", { d: "m9.2 22 3-7" }], ["path", { d: "m9 13-3 7" }], ["path", { d: "m17 13-3 7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cloud-rain.js var CloudRain; var init_cloud_rain = __esmMin((() => { CloudRain = [ ["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" }], ["path", { d: "M16 14v6" }], ["path", { d: "M8 14v6" }], ["path", { d: "M12 16v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cloud-snow.js var CloudSnow; var init_cloud_snow = __esmMin((() => { CloudSnow = [ ["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" }], ["path", { d: "M8 15h.01" }], ["path", { d: "M8 19h.01" }], ["path", { d: "M12 17h.01" }], ["path", { d: "M12 21h.01" }], ["path", { d: "M16 15h.01" }], ["path", { d: "M16 19h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cloud-sun-rain.js var CloudSunRain; var init_cloud_sun_rain = __esmMin((() => { CloudSunRain = [ ["path", { d: "M12 2v2" }], ["path", { d: "m4.93 4.93 1.41 1.41" }], ["path", { d: "M20 12h2" }], ["path", { d: "m19.07 4.93-1.41 1.41" }], ["path", { d: "M15.947 12.65a4 4 0 0 0-5.925-4.128" }], ["path", { d: "M3 20a5 5 0 1 1 8.9-4H13a3 3 0 0 1 2 5.24" }], ["path", { d: "M11 20v2" }], ["path", { d: "M7 19v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cloud-sun.js var CloudSun; var init_cloud_sun = __esmMin((() => { CloudSun = [ ["path", { d: "M12 2v2" }], ["path", { d: "m4.93 4.93 1.41 1.41" }], ["path", { d: "M20 12h2" }], ["path", { d: "m19.07 4.93-1.41 1.41" }], ["path", { d: "M15.947 12.65a4 4 0 0 0-5.925-4.128" }], ["path", { d: "M13 22H7a5 5 0 1 1 4.9-6H13a3 3 0 0 1 0 6Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cloud-upload.js var CloudUpload; var init_cloud_upload = __esmMin((() => { CloudUpload = [ ["path", { d: "M12 13v8" }], ["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" }], ["path", { d: "m8 17 4-4 4 4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cloud.js var Cloud; var init_cloud = __esmMin((() => { Cloud = [["path", { d: "M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cloudy.js var Cloudy; var init_cloudy = __esmMin((() => { Cloudy = [["path", { d: "M17.5 21H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z" }], ["path", { d: "M22 10a3 3 0 0 0-3-3h-2.207a5.502 5.502 0 0 0-10.702.5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/clover.js var Clover; var init_clover = __esmMin((() => { Clover = [ ["path", { d: "M16.17 7.83 2 22" }], ["path", { d: "M4.02 12a2.827 2.827 0 1 1 3.81-4.17A2.827 2.827 0 1 1 12 4.02a2.827 2.827 0 1 1 4.17 3.81A2.827 2.827 0 1 1 19.98 12a2.827 2.827 0 1 1-3.81 4.17A2.827 2.827 0 1 1 12 19.98a2.827 2.827 0 1 1-4.17-3.81A1 1 0 1 1 4 12" }], ["path", { d: "m7.83 7.83 8.34 8.34" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/club.js var Club; var init_club = __esmMin((() => { Club = [["path", { d: "M17.28 9.05a5.5 5.5 0 1 0-10.56 0A5.5 5.5 0 1 0 12 17.66a5.5 5.5 0 1 0 5.28-8.6Z" }], ["path", { d: "M12 17.66L12 22" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/code-xml.js var CodeXml; var init_code_xml = __esmMin((() => { CodeXml = [ ["path", { d: "m18 16 4-4-4-4" }], ["path", { d: "m6 8-4 4 4 4" }], ["path", { d: "m14.5 4-5 16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/code.js var Code; var init_code = __esmMin((() => { Code = [["path", { d: "m16 18 6-6-6-6" }], ["path", { d: "m8 6-6 6 6 6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/codepen.js var Codepen; var init_codepen = __esmMin((() => { Codepen = [ ["polygon", { points: "12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2" }], ["line", { x1: "12", x2: "12", y1: "22", y2: "15.5" }], ["polyline", { points: "22 8.5 12 15.5 2 8.5" }], ["polyline", { points: "2 15.5 12 8.5 22 15.5" }], ["line", { x1: "12", x2: "12", y1: "2", y2: "8.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/codesandbox.js var Codesandbox; var init_codesandbox = __esmMin((() => { Codesandbox = [ ["path", { d: "M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" }], ["polyline", { points: "7.5 4.21 12 6.81 16.5 4.21" }], ["polyline", { points: "7.5 19.79 7.5 14.6 3 12" }], ["polyline", { points: "21 12 16.5 14.6 16.5 19.79" }], ["polyline", { points: "3.27 6.96 12 12.01 20.73 6.96" }], ["line", { x1: "12", x2: "12", y1: "22.08", y2: "12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/coffee.js var Coffee; var init_coffee = __esmMin((() => { Coffee = [ ["path", { d: "M10 2v2" }], ["path", { d: "M14 2v2" }], ["path", { d: "M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1" }], ["path", { d: "M6 2v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cog.js var Cog; var init_cog = __esmMin((() => { Cog = [ ["path", { d: "M11 10.27 7 3.34" }], ["path", { d: "m11 13.73-4 6.93" }], ["path", { d: "M12 22v-2" }], ["path", { d: "M12 2v2" }], ["path", { d: "M14 12h8" }], ["path", { d: "m17 20.66-1-1.73" }], ["path", { d: "m17 3.34-1 1.73" }], ["path", { d: "M2 12h2" }], ["path", { d: "m20.66 17-1.73-1" }], ["path", { d: "m20.66 7-1.73 1" }], ["path", { d: "m3.34 17 1.73-1" }], ["path", { d: "m3.34 7 1.73 1" }], ["circle", { cx: "12", cy: "12", r: "2" }], ["circle", { cx: "12", cy: "12", r: "8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/coins.js var Coins; var init_coins = __esmMin((() => { Coins = [ ["circle", { cx: "8", cy: "8", r: "6" }], ["path", { d: "M18.09 10.37A6 6 0 1 1 10.34 18" }], ["path", { d: "M7 6h1v4" }], ["path", { d: "m16.71 13.88.7.71-2.82 2.82" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/columns-3-cog.js var Columns3Cog; var init_columns_3_cog = __esmMin((() => { Columns3Cog = [ ["path", { d: "M10.5 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v5.5" }], ["path", { d: "m14.3 19.6 1-.4" }], ["path", { d: "M15 3v7.5" }], ["path", { d: "m15.2 16.9-.9-.3" }], ["path", { d: "m16.6 21.7.3-.9" }], ["path", { d: "m16.8 15.3-.4-1" }], ["path", { d: "m19.1 15.2.3-.9" }], ["path", { d: "m19.6 21.7-.4-1" }], ["path", { d: "m20.7 16.8 1-.4" }], ["path", { d: "m21.7 19.4-.9-.3" }], ["path", { d: "M9 3v18" }], ["circle", { cx: "18", cy: "18", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/columns-2.js var Columns2; var init_columns_2 = __esmMin((() => { Columns2 = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M12 3v18" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/columns-3.js var Columns3; var init_columns_3 = __esmMin((() => { Columns3 = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M9 3v18" }], ["path", { d: "M15 3v18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/columns-4.js var Columns4; var init_columns_4 = __esmMin((() => { Columns4 = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M7.5 3v18" }], ["path", { d: "M12 3v18" }], ["path", { d: "M16.5 3v18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/combine.js var Combine; var init_combine = __esmMin((() => { Combine = [ ["path", { d: "M14 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1" }], ["path", { d: "M19 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1" }], ["path", { d: "m7 15 3 3" }], ["path", { d: "m7 21 3-3H5a2 2 0 0 1-2-2v-2" }], ["rect", { x: "14", y: "14", width: "7", height: "7", rx: "1" }], ["rect", { x: "3", y: "3", width: "7", height: "7", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/command.js var Command; var init_command = __esmMin((() => { Command = [["path", { d: "M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/compass.js var Compass; var init_compass = __esmMin((() => { Compass = [["path", { d: "m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z" }], ["circle", { cx: "12", cy: "12", r: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/component.js var Component; var init_component = __esmMin((() => { Component = [ ["path", { d: "M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z" }], ["path", { d: "M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z" }], ["path", { d: "M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z" }], ["path", { d: "M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/computer.js var Computer; var init_computer = __esmMin((() => { Computer = [ ["rect", { width: "14", height: "8", x: "5", y: "2", rx: "2" }], ["rect", { width: "20", height: "8", x: "2", y: "14", rx: "2" }], ["path", { d: "M6 18h2" }], ["path", { d: "M12 18h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/concierge-bell.js var ConciergeBell; var init_concierge_bell = __esmMin((() => { ConciergeBell = [ ["path", { d: "M3 20a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1Z" }], ["path", { d: "M20 16a8 8 0 1 0-16 0" }], ["path", { d: "M12 4v4" }], ["path", { d: "M10 4h4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cone.js var Cone; var init_cone = __esmMin((() => { Cone = [["path", { d: "m20.9 18.55-8-15.98a1 1 0 0 0-1.8 0l-8 15.98" }], ["ellipse", { cx: "12", cy: "19", rx: "9", ry: "3" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/construction.js var Construction; var init_construction = __esmMin((() => { Construction = [ ["rect", { x: "2", y: "6", width: "20", height: "8", rx: "1" }], ["path", { d: "M17 14v7" }], ["path", { d: "M7 14v7" }], ["path", { d: "M17 3v3" }], ["path", { d: "M7 3v3" }], ["path", { d: "M10 14 2.3 6.3" }], ["path", { d: "m14 6 7.7 7.7" }], ["path", { d: "m8 6 8 8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/contact-round.js var ContactRound; var init_contact_round = __esmMin((() => { ContactRound = [ ["path", { d: "M16 2v2" }], ["path", { d: "M17.915 22a6 6 0 0 0-12 0" }], ["path", { d: "M8 2v2" }], ["circle", { cx: "12", cy: "12", r: "4" }], ["rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/contact.js var Contact; var init_contact = __esmMin((() => { Contact = [ ["path", { d: "M16 2v2" }], ["path", { d: "M7 22v-2a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2" }], ["path", { d: "M8 2v2" }], ["circle", { cx: "12", cy: "11", r: "3" }], ["rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/container.js var Container; var init_container = __esmMin((() => { Container = [ ["path", { d: "M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z" }], ["path", { d: "M10 21.9V14L2.1 9.1" }], ["path", { d: "m10 14 11.9-6.9" }], ["path", { d: "M14 19.8v-8.1" }], ["path", { d: "M18 17.5V9.4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/contrast.js var Contrast; var init_contrast = __esmMin((() => { Contrast = [["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M12 18a6 6 0 0 0 0-12v12z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cookie.js var Cookie; var init_cookie = __esmMin((() => { Cookie = [ ["path", { d: "M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5" }], ["path", { d: "M8.5 8.5v.01" }], ["path", { d: "M16 15.5v.01" }], ["path", { d: "M12 12v.01" }], ["path", { d: "M11 17v.01" }], ["path", { d: "M7 14v.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cooking-pot.js var CookingPot; var init_cooking_pot = __esmMin((() => { CookingPot = [ ["path", { d: "M2 12h20" }], ["path", { d: "M20 12v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8" }], ["path", { d: "m4 8 16-4" }], ["path", { d: "m8.86 6.78-.45-1.81a2 2 0 0 1 1.45-2.43l1.94-.48a2 2 0 0 1 2.43 1.46l.45 1.8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/copy-check.js var CopyCheck; var init_copy_check = __esmMin((() => { CopyCheck = [ ["path", { d: "m12 15 2 2 4-4" }], ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }], ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/copy-minus.js var CopyMinus; var init_copy_minus = __esmMin((() => { CopyMinus = [ ["line", { x1: "12", x2: "18", y1: "15", y2: "15" }], ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }], ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/copy-plus.js var CopyPlus; var init_copy_plus = __esmMin((() => { CopyPlus = [ ["line", { x1: "15", x2: "15", y1: "12", y2: "18" }], ["line", { x1: "12", x2: "18", y1: "15", y2: "15" }], ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }], ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/copy-slash.js var CopySlash; var init_copy_slash = __esmMin((() => { CopySlash = [ ["line", { x1: "12", x2: "18", y1: "18", y2: "12" }], ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }], ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/copy-x.js var CopyX; var init_copy_x = __esmMin((() => { CopyX = [ ["line", { x1: "12", x2: "18", y1: "12", y2: "18" }], ["line", { x1: "12", x2: "18", y1: "18", y2: "12" }], ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }], ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/copy.js var Copy; var init_copy = __esmMin((() => { Copy = [["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }], ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/copyright.js var Copyright; var init_copyright = __esmMin((() => { Copyright = [["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M14.83 14.83a4 4 0 1 1 0-5.66" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/copyleft.js var Copyleft; var init_copyleft = __esmMin((() => { Copyleft = [["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M9.17 14.83a4 4 0 1 0 0-5.66" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/corner-down-left.js var CornerDownLeft; var init_corner_down_left = __esmMin((() => { CornerDownLeft = [["path", { d: "M20 4v7a4 4 0 0 1-4 4H4" }], ["path", { d: "m9 10-5 5 5 5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/corner-down-right.js var CornerDownRight; var init_corner_down_right = __esmMin((() => { CornerDownRight = [["path", { d: "m15 10 5 5-5 5" }], ["path", { d: "M4 4v7a4 4 0 0 0 4 4h12" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/corner-left-down.js var CornerLeftDown; var init_corner_left_down = __esmMin((() => { CornerLeftDown = [["path", { d: "m14 15-5 5-5-5" }], ["path", { d: "M20 4h-7a4 4 0 0 0-4 4v12" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/corner-left-up.js var CornerLeftUp; var init_corner_left_up = __esmMin((() => { CornerLeftUp = [["path", { d: "M14 9 9 4 4 9" }], ["path", { d: "M20 20h-7a4 4 0 0 1-4-4V4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/corner-right-down.js var CornerRightDown; var init_corner_right_down = __esmMin((() => { CornerRightDown = [["path", { d: "m10 15 5 5 5-5" }], ["path", { d: "M4 4h7a4 4 0 0 1 4 4v12" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/corner-right-up.js var CornerRightUp; var init_corner_right_up = __esmMin((() => { CornerRightUp = [["path", { d: "m10 9 5-5 5 5" }], ["path", { d: "M4 20h7a4 4 0 0 0 4-4V4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/corner-up-left.js var CornerUpLeft; var init_corner_up_left = __esmMin((() => { CornerUpLeft = [["path", { d: "M20 20v-7a4 4 0 0 0-4-4H4" }], ["path", { d: "M9 14 4 9l5-5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cpu.js var Cpu; var init_cpu = __esmMin((() => { Cpu = [ ["path", { d: "M12 20v2" }], ["path", { d: "M12 2v2" }], ["path", { d: "M17 20v2" }], ["path", { d: "M17 2v2" }], ["path", { d: "M2 12h2" }], ["path", { d: "M2 17h2" }], ["path", { d: "M2 7h2" }], ["path", { d: "M20 12h2" }], ["path", { d: "M20 17h2" }], ["path", { d: "M20 7h2" }], ["path", { d: "M7 20v2" }], ["path", { d: "M7 2v2" }], ["rect", { x: "4", y: "4", width: "16", height: "16", rx: "2" }], ["rect", { x: "8", y: "8", width: "8", height: "8", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/creative-commons.js var CreativeCommons; var init_creative_commons = __esmMin((() => { CreativeCommons = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M10 9.3a2.8 2.8 0 0 0-3.5 1 3.1 3.1 0 0 0 0 3.4 2.7 2.7 0 0 0 3.5 1" }], ["path", { d: "M17 9.3a2.8 2.8 0 0 0-3.5 1 3.1 3.1 0 0 0 0 3.4 2.7 2.7 0 0 0 3.5 1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/credit-card.js var CreditCard; var init_credit_card = __esmMin((() => { CreditCard = [["rect", { width: "20", height: "14", x: "2", y: "5", rx: "2" }], ["line", { x1: "2", x2: "22", y1: "10", y2: "10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/corner-up-right.js var CornerUpRight; var init_corner_up_right = __esmMin((() => { CornerUpRight = [["path", { d: "m15 14 5-5-5-5" }], ["path", { d: "M4 20v-7a4 4 0 0 1 4-4h12" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/croissant.js var Croissant; var init_croissant = __esmMin((() => { Croissant = [ ["path", { d: "M10.2 18H4.774a1.5 1.5 0 0 1-1.352-.97 11 11 0 0 1 .132-6.487" }], ["path", { d: "M18 10.2V4.774a1.5 1.5 0 0 0-.97-1.352 11 11 0 0 0-6.486.132" }], ["path", { d: "M18 5a4 3 0 0 1 4 3 2 2 0 0 1-2 2 10 10 0 0 0-5.139 1.42" }], ["path", { d: "M5 18a3 4 0 0 0 3 4 2 2 0 0 0 2-2 10 10 0 0 1 1.42-5.14" }], ["path", { d: "M8.709 2.554a10 10 0 0 0-6.155 6.155 1.5 1.5 0 0 0 .676 1.626l9.807 5.42a2 2 0 0 0 2.718-2.718l-5.42-9.807a1.5 1.5 0 0 0-1.626-.676" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/crop.js var Crop; var init_crop = __esmMin((() => { Crop = [["path", { d: "M6 2v14a2 2 0 0 0 2 2h14" }], ["path", { d: "M18 22V8a2 2 0 0 0-2-2H2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cross.js var Cross; var init_cross = __esmMin((() => { Cross = [["path", { d: "M4 9a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h4a1 1 0 0 1 1 1v4a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-4a1 1 0 0 1 1-1h4a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2h-4a1 1 0 0 1-1-1V4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4a1 1 0 0 1-1 1z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/crosshair.js var Crosshair; var init_crosshair = __esmMin((() => { Crosshair = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["line", { x1: "22", x2: "18", y1: "12", y2: "12" }], ["line", { x1: "6", x2: "2", y1: "12", y2: "12" }], ["line", { x1: "12", x2: "12", y1: "6", y2: "2" }], ["line", { x1: "12", x2: "12", y1: "22", y2: "18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/crown.js var Crown; var init_crown = __esmMin((() => { Crown = [["path", { d: "M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z" }], ["path", { d: "M5 21h14" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cuboid.js var Cuboid; var init_cuboid = __esmMin((() => { Cuboid = [ ["path", { d: "m21.12 6.4-6.05-4.06a2 2 0 0 0-2.17-.05L2.95 8.41a2 2 0 0 0-.95 1.7v5.82a2 2 0 0 0 .88 1.66l6.05 4.07a2 2 0 0 0 2.17.05l9.95-6.12a2 2 0 0 0 .95-1.7V8.06a2 2 0 0 0-.88-1.66Z" }], ["path", { d: "M10 22v-8L2.25 9.15" }], ["path", { d: "m10 14 11.77-6.87" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cup-soda.js var CupSoda; var init_cup_soda = __esmMin((() => { CupSoda = [ ["path", { d: "m6 8 1.75 12.28a2 2 0 0 0 2 1.72h4.54a2 2 0 0 0 2-1.72L18 8" }], ["path", { d: "M5 8h14" }], ["path", { d: "M7 15a6.47 6.47 0 0 1 5 0 6.47 6.47 0 0 0 5 0" }], ["path", { d: "m12 8 1-6h2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/currency.js var Currency; var init_currency = __esmMin((() => { Currency = [ ["circle", { cx: "12", cy: "12", r: "8" }], ["line", { x1: "3", x2: "6", y1: "3", y2: "6" }], ["line", { x1: "21", x2: "18", y1: "3", y2: "6" }], ["line", { x1: "3", x2: "6", y1: "21", y2: "18" }], ["line", { x1: "21", x2: "18", y1: "21", y2: "18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/cylinder.js var Cylinder; var init_cylinder = __esmMin((() => { Cylinder = [["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3" }], ["path", { d: "M3 5v14a9 3 0 0 0 18 0V5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/dam.js var Dam; var init_dam = __esmMin((() => { Dam = [ ["path", { d: "M11 11.31c1.17.56 1.54 1.69 3.5 1.69 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1" }], ["path", { d: "M11.75 18c.35.5 1.45 1 2.75 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1" }], ["path", { d: "M2 10h4" }], ["path", { d: "M2 14h4" }], ["path", { d: "M2 18h4" }], ["path", { d: "M2 6h4" }], ["path", { d: "M7 3a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1L10 4a1 1 0 0 0-1-1z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/database-backup.js var DatabaseBackup; var init_database_backup = __esmMin((() => { DatabaseBackup = [ ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3" }], ["path", { d: "M3 12a9 3 0 0 0 5 2.69" }], ["path", { d: "M21 9.3V5" }], ["path", { d: "M3 5v14a9 3 0 0 0 6.47 2.88" }], ["path", { d: "M12 12v4h4" }], ["path", { d: "M13 20a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L12 16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/database-zap.js var DatabaseZap; var init_database_zap = __esmMin((() => { DatabaseZap = [ ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3" }], ["path", { d: "M3 5V19A9 3 0 0 0 15 21.84" }], ["path", { d: "M21 5V8" }], ["path", { d: "M21 12L18 17H22L19 22" }], ["path", { d: "M3 12A9 3 0 0 0 14.59 14.87" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/database.js var Database; var init_database = __esmMin((() => { Database = [ ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3" }], ["path", { d: "M3 5V19A9 3 0 0 0 21 19V5" }], ["path", { d: "M3 12A9 3 0 0 0 21 12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/decimals-arrow-left.js var DecimalsArrowLeft; var init_decimals_arrow_left = __esmMin((() => { DecimalsArrowLeft = [ ["path", { d: "m13 21-3-3 3-3" }], ["path", { d: "M20 18H10" }], ["path", { d: "M3 11h.01" }], ["rect", { x: "6", y: "3", width: "5", height: "8", rx: "2.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/decimals-arrow-right.js var DecimalsArrowRight; var init_decimals_arrow_right = __esmMin((() => { DecimalsArrowRight = [ ["path", { d: "M10 18h10" }], ["path", { d: "m17 21 3-3-3-3" }], ["path", { d: "M3 11h.01" }], ["rect", { x: "15", y: "3", width: "5", height: "8", rx: "2.5" }], ["rect", { x: "6", y: "3", width: "5", height: "8", rx: "2.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/delete.js var Delete$2; var init_delete = __esmMin((() => { Delete$2 = [ ["path", { d: "M10 5a2 2 0 0 0-1.344.519l-6.328 5.74a1 1 0 0 0 0 1.481l6.328 5.741A2 2 0 0 0 10 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z" }], ["path", { d: "m12 9 6 6" }], ["path", { d: "m18 9-6 6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/dessert.js var Dessert; var init_dessert = __esmMin((() => { Dessert = [ ["path", { d: "M10.162 3.167A10 10 0 0 0 2 13a2 2 0 0 0 4 0v-1a2 2 0 0 1 4 0v4a2 2 0 0 0 4 0v-4a2 2 0 0 1 4 0v1a2 2 0 0 0 4-.006 10 10 0 0 0-8.161-9.826" }], ["path", { d: "M20.804 14.869a9 9 0 0 1-17.608 0" }], ["circle", { cx: "12", cy: "4", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/diameter.js var Diameter; var init_diameter = __esmMin((() => { Diameter = [ ["circle", { cx: "19", cy: "19", r: "2" }], ["circle", { cx: "5", cy: "5", r: "2" }], ["path", { d: "M6.48 3.66a10 10 0 0 1 13.86 13.86" }], ["path", { d: "m6.41 6.41 11.18 11.18" }], ["path", { d: "M3.66 6.48a10 10 0 0 0 13.86 13.86" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/diamond-minus.js var DiamondMinus; var init_diamond_minus = __esmMin((() => { DiamondMinus = [["path", { d: "M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41L13.7 2.71a2.41 2.41 0 0 0-3.41 0z" }], ["path", { d: "M8 12h8" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/diamond-percent.js var DiamondPercent; var init_diamond_percent = __esmMin((() => { DiamondPercent = [ ["path", { d: "M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41L13.7 2.71a2.41 2.41 0 0 0-3.41 0Z" }], ["path", { d: "M9.2 9.2h.01" }], ["path", { d: "m14.5 9.5-5 5" }], ["path", { d: "M14.7 14.8h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/diamond-plus.js var DiamondPlus; var init_diamond_plus = __esmMin((() => { DiamondPlus = [ ["path", { d: "M12 8v8" }], ["path", { d: "M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41L13.7 2.71a2.41 2.41 0 0 0-3.41 0z" }], ["path", { d: "M8 12h8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/diamond.js var Diamond; var init_diamond = __esmMin((() => { Diamond = [["path", { d: "M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/dice-1.js var Dice1; var init_dice_1 = __esmMin((() => { Dice1 = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }], ["path", { d: "M12 12h.01" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/dice-2.js var Dice2; var init_dice_2 = __esmMin((() => { Dice2 = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }], ["path", { d: "M15 9h.01" }], ["path", { d: "M9 15h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/dice-3.js var Dice3; var init_dice_3 = __esmMin((() => { Dice3 = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }], ["path", { d: "M16 8h.01" }], ["path", { d: "M12 12h.01" }], ["path", { d: "M8 16h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/dice-4.js var Dice4; var init_dice_4 = __esmMin((() => { Dice4 = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }], ["path", { d: "M16 8h.01" }], ["path", { d: "M8 8h.01" }], ["path", { d: "M8 16h.01" }], ["path", { d: "M16 16h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/dice-5.js var Dice5; var init_dice_5 = __esmMin((() => { Dice5 = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }], ["path", { d: "M16 8h.01" }], ["path", { d: "M8 8h.01" }], ["path", { d: "M8 16h.01" }], ["path", { d: "M16 16h.01" }], ["path", { d: "M12 12h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/dice-6.js var Dice6; var init_dice_6 = __esmMin((() => { Dice6 = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }], ["path", { d: "M16 8h.01" }], ["path", { d: "M16 12h.01" }], ["path", { d: "M16 16h.01" }], ["path", { d: "M8 8h.01" }], ["path", { d: "M8 12h.01" }], ["path", { d: "M8 16h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/dices.js var Dices; var init_dices = __esmMin((() => { Dices = [ ["rect", { width: "12", height: "12", x: "2", y: "10", rx: "2", ry: "2" }], ["path", { d: "m17.92 14 3.5-3.5a2.24 2.24 0 0 0 0-3l-5-4.92a2.24 2.24 0 0 0-3 0L10 6" }], ["path", { d: "M6 18h.01" }], ["path", { d: "M10 14h.01" }], ["path", { d: "M15 6h.01" }], ["path", { d: "M18 9h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/diff.js var Diff$2; var init_diff = __esmMin((() => { Diff$2 = [ ["path", { d: "M12 3v14" }], ["path", { d: "M5 10h14" }], ["path", { d: "M5 21h14" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/disc-2.js var Disc2; var init_disc_2 = __esmMin((() => { Disc2 = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["circle", { cx: "12", cy: "12", r: "4" }], ["path", { d: "M12 12h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/disc-3.js var Disc3; var init_disc_3 = __esmMin((() => { Disc3 = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M6 12c0-1.7.7-3.2 1.8-4.2" }], ["circle", { cx: "12", cy: "12", r: "2" }], ["path", { d: "M18 12c0 1.7-.7 3.2-1.8 4.2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/disc-album.js var DiscAlbum; var init_disc_album = __esmMin((() => { DiscAlbum = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["circle", { cx: "12", cy: "12", r: "5" }], ["path", { d: "M12 12h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/disc.js var Disc; var init_disc = __esmMin((() => { Disc = [["circle", { cx: "12", cy: "12", r: "10" }], ["circle", { cx: "12", cy: "12", r: "2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/divide.js var Divide; var init_divide = __esmMin((() => { Divide = [ ["circle", { cx: "12", cy: "6", r: "1" }], ["line", { x1: "5", x2: "19", y1: "12", y2: "12" }], ["circle", { cx: "12", cy: "18", r: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/dna-off.js var DnaOff; var init_dna_off = __esmMin((() => { DnaOff = [ ["path", { d: "M15 2c-1.35 1.5-2.092 3-2.5 4.5L14 8" }], ["path", { d: "m17 6-2.891-2.891" }], ["path", { d: "M2 15c3.333-3 6.667-3 10-3" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "m20 9 .891.891" }], ["path", { d: "M22 9c-1.5 1.35-3 2.092-4.5 2.5l-1-1" }], ["path", { d: "M3.109 14.109 4 15" }], ["path", { d: "m6.5 12.5 1 1" }], ["path", { d: "m7 18 2.891 2.891" }], ["path", { d: "M9 22c1.35-1.5 2.092-3 2.5-4.5L10 16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/dna.js var Dna; var init_dna = __esmMin((() => { Dna = [ ["path", { d: "m10 16 1.5 1.5" }], ["path", { d: "m14 8-1.5-1.5" }], ["path", { d: "M15 2c-1.798 1.998-2.518 3.995-2.807 5.993" }], ["path", { d: "m16.5 10.5 1 1" }], ["path", { d: "m17 6-2.891-2.891" }], ["path", { d: "M2 15c6.667-6 13.333 0 20-6" }], ["path", { d: "m20 9 .891.891" }], ["path", { d: "M3.109 14.109 4 15" }], ["path", { d: "m6.5 12.5 1 1" }], ["path", { d: "m7 18 2.891 2.891" }], ["path", { d: "M9 22c1.798-1.998 2.518-3.995 2.807-5.993" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/dock.js var Dock; var init_dock = __esmMin((() => { Dock = [ ["path", { d: "M2 8h20" }], ["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2" }], ["path", { d: "M6 16h12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/dog.js var Dog; var init_dog = __esmMin((() => { Dog = [ ["path", { d: "M11.25 16.25h1.5L12 17z" }], ["path", { d: "M16 14v.5" }], ["path", { d: "M4.42 11.247A13.152 13.152 0 0 0 4 14.556C4 18.728 7.582 21 12 21s8-2.272 8-6.444a11.702 11.702 0 0 0-.493-3.309" }], ["path", { d: "M8 14v.5" }], ["path", { d: "M8.5 8.5c-.384 1.05-1.083 2.028-2.344 2.5-1.931.722-3.576-.297-3.656-1-.113-.994 1.177-6.53 4-7 1.923-.321 3.651.845 3.651 2.235A7.497 7.497 0 0 1 14 5.277c0-1.39 1.844-2.598 3.767-2.277 2.823.47 4.113 6.006 4 7-.08.703-1.725 1.722-3.656 1-1.261-.472-1.855-1.45-2.239-2.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/dollar-sign.js var DollarSign; var init_dollar_sign = __esmMin((() => { DollarSign = [["line", { x1: "12", x2: "12", y1: "2", y2: "22" }], ["path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/donut.js var Donut; var init_donut = __esmMin((() => { Donut = [["path", { d: "M20.5 10a2.5 2.5 0 0 1-2.4-3H18a2.95 2.95 0 0 1-2.6-4.4 10 10 0 1 0 6.3 7.1c-.3.2-.8.3-1.2.3" }], ["circle", { cx: "12", cy: "12", r: "3" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/door-closed-locked.js var DoorClosedLocked; var init_door_closed_locked = __esmMin((() => { DoorClosedLocked = [ ["path", { d: "M10 12h.01" }], ["path", { d: "M18 9V6a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v14" }], ["path", { d: "M2 20h8" }], ["path", { d: "M20 17v-2a2 2 0 1 0-4 0v2" }], ["rect", { x: "14", y: "17", width: "8", height: "5", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/door-closed.js var DoorClosed; var init_door_closed = __esmMin((() => { DoorClosed = [ ["path", { d: "M10 12h.01" }], ["path", { d: "M18 20V6a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v14" }], ["path", { d: "M2 20h20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/door-open.js var DoorOpen; var init_door_open = __esmMin((() => { DoorOpen = [ ["path", { d: "M11 20H2" }], ["path", { d: "M11 4.562v16.157a1 1 0 0 0 1.242.97L19 20V5.562a2 2 0 0 0-1.515-1.94l-4-1A2 2 0 0 0 11 4.561z" }], ["path", { d: "M11 4H8a2 2 0 0 0-2 2v14" }], ["path", { d: "M14 12h.01" }], ["path", { d: "M22 20h-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/dot.js var Dot; var init_dot = __esmMin((() => { Dot = [["circle", { cx: "12.1", cy: "12.1", r: "1" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/download.js var Download; var init_download = __esmMin((() => { Download = [ ["path", { d: "M12 15V3" }], ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }], ["path", { d: "m7 10 5 5 5-5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/drafting-compass.js var DraftingCompass; var init_drafting_compass = __esmMin((() => { DraftingCompass = [ ["path", { d: "m12.99 6.74 1.93 3.44" }], ["path", { d: "M19.136 12a10 10 0 0 1-14.271 0" }], ["path", { d: "m21 21-2.16-3.84" }], ["path", { d: "m3 21 8.02-14.26" }], ["circle", { cx: "12", cy: "5", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/drama.js var Drama; var init_drama = __esmMin((() => { Drama = [ ["path", { d: "M10 11h.01" }], ["path", { d: "M14 6h.01" }], ["path", { d: "M18 6h.01" }], ["path", { d: "M6.5 13.1h.01" }], ["path", { d: "M22 5c0 9-4 12-6 12s-6-3-6-12c0-2 2-3 6-3s6 1 6 3" }], ["path", { d: "M17.4 9.9c-.8.8-2 .8-2.8 0" }], ["path", { d: "M10.1 7.1C9 7.2 7.7 7.7 6 8.6c-3.5 2-4.7 3.9-3.7 5.6 4.5 7.8 9.5 8.4 11.2 7.4.9-.5 1.9-2.1 1.9-4.7" }], ["path", { d: "M9.1 16.5c.3-1.1 1.4-1.7 2.4-1.4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/dribbble.js var Dribbble; var init_dribbble = __esmMin((() => { Dribbble = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M19.13 5.09C15.22 9.14 10 10.44 2.25 10.94" }], ["path", { d: "M21.75 12.84c-6.62-1.41-12.14 1-16.38 6.32" }], ["path", { d: "M8.56 2.75c4.37 6 6 9.42 8 17.72" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/drill.js var Drill; var init_drill = __esmMin((() => { Drill = [ ["path", { d: "M10 18a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H5a3 3 0 0 1-3-3 1 1 0 0 1 1-1z" }], ["path", { d: "M13 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1l-.81 3.242a1 1 0 0 1-.97.758H8" }], ["path", { d: "M14 4h3a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-3" }], ["path", { d: "M18 6h4" }], ["path", { d: "m5 10-2 8" }], ["path", { d: "m7 18 2-8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/drone.js var Drone; var init_drone = __esmMin((() => { Drone = [ ["path", { d: "M10 10 7 7" }], ["path", { d: "m10 14-3 3" }], ["path", { d: "m14 10 3-3" }], ["path", { d: "m14 14 3 3" }], ["path", { d: "M14.205 4.139a4 4 0 1 1 5.439 5.863" }], ["path", { d: "M19.637 14a4 4 0 1 1-5.432 5.868" }], ["path", { d: "M4.367 10a4 4 0 1 1 5.438-5.862" }], ["path", { d: "M9.795 19.862a4 4 0 1 1-5.429-5.873" }], ["rect", { x: "10", y: "8", width: "4", height: "8", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/droplet-off.js var DropletOff; var init_droplet_off = __esmMin((() => { DropletOff = [ ["path", { d: "M18.715 13.186C18.29 11.858 17.384 10.607 16 9.5c-2-1.6-3.5-4-4-6.5a10.7 10.7 0 0 1-.884 2.586" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M8.795 8.797A11 11 0 0 1 8 9.5C6 11.1 5 13 5 15a7 7 0 0 0 13.222 3.208" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/droplet.js var Droplet; var init_droplet = __esmMin((() => { Droplet = [["path", { d: "M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/droplets.js var Droplets; var init_droplets = __esmMin((() => { Droplets = [["path", { d: "M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z" }], ["path", { d: "M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/drum.js var Drum; var init_drum = __esmMin((() => { Drum = [ ["path", { d: "m2 2 8 8" }], ["path", { d: "m22 2-8 8" }], ["ellipse", { cx: "12", cy: "9", rx: "10", ry: "5" }], ["path", { d: "M7 13.4v7.9" }], ["path", { d: "M12 14v8" }], ["path", { d: "M17 13.4v7.9" }], ["path", { d: "M2 9v8a10 5 0 0 0 20 0V9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/drumstick.js var Drumstick; var init_drumstick = __esmMin((() => { Drumstick = [["path", { d: "M15.4 15.63a7.875 6 135 1 1 6.23-6.23 4.5 3.43 135 0 0-6.23 6.23" }], ["path", { d: "m8.29 12.71-2.6 2.6a2.5 2.5 0 1 0-1.65 4.65A2.5 2.5 0 1 0 8.7 18.3l2.59-2.59" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/dumbbell.js var Dumbbell; var init_dumbbell = __esmMin((() => { Dumbbell = [ ["path", { d: "M17.596 12.768a2 2 0 1 0 2.829-2.829l-1.768-1.767a2 2 0 0 0 2.828-2.829l-2.828-2.828a2 2 0 0 0-2.829 2.828l-1.767-1.768a2 2 0 1 0-2.829 2.829z" }], ["path", { d: "m2.5 21.5 1.4-1.4" }], ["path", { d: "m20.1 3.9 1.4-1.4" }], ["path", { d: "M5.343 21.485a2 2 0 1 0 2.829-2.828l1.767 1.768a2 2 0 1 0 2.829-2.829l-6.364-6.364a2 2 0 1 0-2.829 2.829l1.768 1.767a2 2 0 0 0-2.828 2.829z" }], ["path", { d: "m9.6 14.4 4.8-4.8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ear-off.js var EarOff; var init_ear_off = __esmMin((() => { EarOff = [ ["path", { d: "M6 18.5a3.5 3.5 0 1 0 7 0c0-1.57.92-2.52 2.04-3.46" }], ["path", { d: "M6 8.5c0-.75.13-1.47.36-2.14" }], ["path", { d: "M8.8 3.15A6.5 6.5 0 0 1 19 8.5c0 1.63-.44 2.81-1.09 3.76" }], ["path", { d: "M12.5 6A2.5 2.5 0 0 1 15 8.5M10 13a2 2 0 0 0 1.82-1.18" }], ["line", { x1: "2", x2: "22", y1: "2", y2: "22" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ear.js var Ear; var init_ear = __esmMin((() => { Ear = [["path", { d: "M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0" }], ["path", { d: "M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/earth-lock.js var EarthLock; var init_earth_lock = __esmMin((() => { EarthLock = [ ["path", { d: "M7 3.34V5a3 3 0 0 0 3 3" }], ["path", { d: "M11 21.95V18a2 2 0 0 0-2-2 2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05" }], ["path", { d: "M21.54 15H17a2 2 0 0 0-2 2v4.54" }], ["path", { d: "M12 2a10 10 0 1 0 9.54 13" }], ["path", { d: "M20 6V4a2 2 0 1 0-4 0v2" }], ["rect", { width: "8", height: "5", x: "14", y: "6", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/earth.js var Earth; var init_earth = __esmMin((() => { Earth = [ ["path", { d: "M21.54 15H17a2 2 0 0 0-2 2v4.54" }], ["path", { d: "M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17" }], ["path", { d: "M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05" }], ["circle", { cx: "12", cy: "12", r: "10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/eclipse.js var Eclipse; var init_eclipse = __esmMin((() => { Eclipse = [["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M12 2a7 7 0 1 0 10 10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/egg-fried.js var EggFried; var init_egg_fried = __esmMin((() => { EggFried = [["circle", { cx: "11.5", cy: "12.5", r: "3.5" }], ["path", { d: "M3 8c0-3.5 2.5-6 6.5-6 5 0 4.83 3 7.5 5s5 2 5 6c0 4.5-2.5 6.5-7 6.5-2.5 0-2.5 2.5-6 2.5s-7-2-7-5.5c0-3 1.5-3 1.5-5C3.5 10 3 9 3 8Z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/egg-off.js var EggOff; var init_egg_off = __esmMin((() => { EggOff = [ ["path", { d: "m2 2 20 20" }], ["path", { d: "M20 14.347V14c0-6-4-12-8-12-1.078 0-2.157.436-3.157 1.19" }], ["path", { d: "M6.206 6.21C4.871 8.4 4 11.2 4 14a8 8 0 0 0 14.568 4.568" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/egg.js var Egg; var init_egg = __esmMin((() => { Egg = [["path", { d: "M12 2C8 2 4 8 4 14a8 8 0 0 0 16 0c0-6-4-12-8-12" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ellipsis-vertical.js var EllipsisVertical; var init_ellipsis_vertical = __esmMin((() => { EllipsisVertical = [ ["circle", { cx: "12", cy: "12", r: "1" }], ["circle", { cx: "12", cy: "5", r: "1" }], ["circle", { cx: "12", cy: "19", r: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ellipsis.js var Ellipsis; var init_ellipsis = __esmMin((() => { Ellipsis = [ ["circle", { cx: "12", cy: "12", r: "1" }], ["circle", { cx: "19", cy: "12", r: "1" }], ["circle", { cx: "5", cy: "12", r: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/equal-approximately.js var EqualApproximately; var init_equal_approximately = __esmMin((() => { EqualApproximately = [["path", { d: "M5 15a6.5 6.5 0 0 1 7 0 6.5 6.5 0 0 0 7 0" }], ["path", { d: "M5 9a6.5 6.5 0 0 1 7 0 6.5 6.5 0 0 0 7 0" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/equal-not.js var EqualNot; var init_equal_not = __esmMin((() => { EqualNot = [ ["line", { x1: "5", x2: "19", y1: "9", y2: "9" }], ["line", { x1: "5", x2: "19", y1: "15", y2: "15" }], ["line", { x1: "19", x2: "5", y1: "5", y2: "19" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/equal.js var Equal; var init_equal = __esmMin((() => { Equal = [["line", { x1: "5", x2: "19", y1: "9", y2: "9" }], ["line", { x1: "5", x2: "19", y1: "15", y2: "15" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/eraser.js var Eraser; var init_eraser = __esmMin((() => { Eraser = [["path", { d: "M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21" }], ["path", { d: "m5.082 11.09 8.828 8.828" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ethernet-port.js var EthernetPort; var init_ethernet_port = __esmMin((() => { EthernetPort = [ ["path", { d: "m15 20 3-3h2a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h2l3 3z" }], ["path", { d: "M6 8v1" }], ["path", { d: "M10 8v1" }], ["path", { d: "M14 8v1" }], ["path", { d: "M18 8v1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/euro.js var Euro; var init_euro = __esmMin((() => { Euro = [ ["path", { d: "M4 10h12" }], ["path", { d: "M4 14h9" }], ["path", { d: "M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12c0 4.4 3.5 8 7.8 8 2 0 3.8-.8 5.2-2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ev-charger.js var EvCharger; var init_ev_charger = __esmMin((() => { EvCharger = [ ["path", { d: "M14 13h2a2 2 0 0 1 2 2v2a2 2 0 0 0 4 0v-6.998a2 2 0 0 0-.59-1.42L18 5" }], ["path", { d: "M14 21V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v16" }], ["path", { d: "M2 21h13" }], ["path", { d: "M3 7h11" }], ["path", { d: "m9 11-2 3h3l-2 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/expand.js var Expand; var init_expand = __esmMin((() => { Expand = [ ["path", { d: "m15 15 6 6" }], ["path", { d: "m15 9 6-6" }], ["path", { d: "M21 16v5h-5" }], ["path", { d: "M21 8V3h-5" }], ["path", { d: "M3 16v5h5" }], ["path", { d: "m3 21 6-6" }], ["path", { d: "M3 8V3h5" }], ["path", { d: "M9 9 3 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/external-link.js var ExternalLink; var init_external_link = __esmMin((() => { ExternalLink = [ ["path", { d: "M15 3h6v6" }], ["path", { d: "M10 14 21 3" }], ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/eye-closed.js var EyeClosed; var init_eye_closed = __esmMin((() => { EyeClosed = [ ["path", { d: "m15 18-.722-3.25" }], ["path", { d: "M2 8a10.645 10.645 0 0 0 20 0" }], ["path", { d: "m20 15-1.726-2.05" }], ["path", { d: "m4 15 1.726-2.05" }], ["path", { d: "m9 18 .722-3.25" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/eye-off.js var EyeOff; var init_eye_off = __esmMin((() => { EyeOff = [ ["path", { d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" }], ["path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242" }], ["path", { d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" }], ["path", { d: "m2 2 20 20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/eye.js var Eye; var init_eye = __esmMin((() => { Eye = [["path", { d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" }], ["circle", { cx: "12", cy: "12", r: "3" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/facebook.js var Facebook; var init_facebook = __esmMin((() => { Facebook = [["path", { d: "M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/factory.js var Factory; var init_factory = __esmMin((() => { Factory = [ ["path", { d: "M12 16h.01" }], ["path", { d: "M16 16h.01" }], ["path", { d: "M3 19a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-.769-.422l-4.462 2.844A.5.5 0 0 1 15 10.5v-2a.5.5 0 0 0-.769-.422L9.77 10.922A.5.5 0 0 1 9 10.5V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z" }], ["path", { d: "M8 16h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/fan.js var Fan; var init_fan = __esmMin((() => { Fan = [["path", { d: "M10.827 16.379a6.082 6.082 0 0 1-8.618-7.002l5.412 1.45a6.082 6.082 0 0 1 7.002-8.618l-1.45 5.412a6.082 6.082 0 0 1 8.618 7.002l-5.412-1.45a6.082 6.082 0 0 1-7.002 8.618l1.45-5.412Z" }], ["path", { d: "M12 12v.01" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/fast-forward.js var FastForward; var init_fast_forward = __esmMin((() => { FastForward = [["path", { d: "M12 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 12 18z" }], ["path", { d: "M2 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 2 18z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/feather.js var Feather; var init_feather = __esmMin((() => { Feather = [ ["path", { d: "M12.67 19a2 2 0 0 0 1.416-.588l6.154-6.172a6 6 0 0 0-8.49-8.49L5.586 9.914A2 2 0 0 0 5 11.328V18a1 1 0 0 0 1 1z" }], ["path", { d: "M16 8 2 22" }], ["path", { d: "M17.5 15H9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/fence.js var Fence; var init_fence = __esmMin((() => { Fence = [ ["path", { d: "M4 3 2 5v15c0 .6.4 1 1 1h2c.6 0 1-.4 1-1V5Z" }], ["path", { d: "M6 8h4" }], ["path", { d: "M6 18h4" }], ["path", { d: "m12 3-2 2v15c0 .6.4 1 1 1h2c.6 0 1-.4 1-1V5Z" }], ["path", { d: "M14 8h4" }], ["path", { d: "M14 18h4" }], ["path", { d: "m20 3-2 2v15c0 .6.4 1 1 1h2c.6 0 1-.4 1-1V5Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ferris-wheel.js var FerrisWheel; var init_ferris_wheel = __esmMin((() => { FerrisWheel = [ ["circle", { cx: "12", cy: "12", r: "2" }], ["path", { d: "M12 2v4" }], ["path", { d: "m6.8 15-3.5 2" }], ["path", { d: "m20.7 7-3.5 2" }], ["path", { d: "M6.8 9 3.3 7" }], ["path", { d: "m20.7 17-3.5-2" }], ["path", { d: "m9 22 3-8 3 8" }], ["path", { d: "M8 22h8" }], ["path", { d: "M18 18.7a9 9 0 1 0-12 0" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/figma.js var Figma; var init_figma = __esmMin((() => { Figma = [ ["path", { d: "M5 5.5A3.5 3.5 0 0 1 8.5 2H12v7H8.5A3.5 3.5 0 0 1 5 5.5z" }], ["path", { d: "M12 2h3.5a3.5 3.5 0 1 1 0 7H12V2z" }], ["path", { d: "M12 12.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 1 1-7 0z" }], ["path", { d: "M5 19.5A3.5 3.5 0 0 1 8.5 16H12v3.5a3.5 3.5 0 1 1-7 0z" }], ["path", { d: "M5 12.5A3.5 3.5 0 0 1 8.5 9H12v7H8.5A3.5 3.5 0 0 1 5 12.5z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-archive.js var FileArchive; var init_file_archive = __esmMin((() => { FileArchive = [ ["path", { d: "M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M8 12v-1" }], ["path", { d: "M8 18v-2" }], ["path", { d: "M8 7V6" }], ["circle", { cx: "8", cy: "20", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-axis-3d.js var FileAxis3d; var init_file_axis_3d = __esmMin((() => { FileAxis3d = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "m8 18 4-4" }], ["path", { d: "M8 10v8h8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-badge.js var FileBadge; var init_file_badge = __esmMin((() => { FileBadge = [ ["path", { d: "M13 22h5a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.3" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "m7.69 16.479 1.29 4.88a.5.5 0 0 1-.698.591l-1.843-.849a1 1 0 0 0-.879.001l-1.846.85a.5.5 0 0 1-.692-.593l1.29-4.88" }], ["circle", { cx: "6", cy: "14", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-box.js var FileBox; var init_file_box = __esmMin((() => { FileBox = [ ["path", { d: "M14.5 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.8" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M11.7 14.2 7 17l-4.7-2.8" }], ["path", { d: "M3 13.1a2 2 0 0 0-.999 1.76v3.24a2 2 0 0 0 .969 1.78L6 21.7a2 2 0 0 0 2.03.01L11 19.9a2 2 0 0 0 1-1.76V14.9a2 2 0 0 0-.97-1.78L8 11.3a2 2 0 0 0-2.03-.01z" }], ["path", { d: "M7 17v5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-braces-corner.js var FileBracesCorner; var init_file_braces_corner = __esmMin((() => { FileBracesCorner = [ ["path", { d: "M14 22h4a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v6" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M5 14a1 1 0 0 0-1 1v2a1 1 0 0 1-1 1 1 1 0 0 1 1 1v2a1 1 0 0 0 1 1" }], ["path", { d: "M9 22a1 1 0 0 0 1-1v-2a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-2a1 1 0 0 0-1-1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-braces.js var FileBraces; var init_file_braces = __esmMin((() => { FileBraces = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1" }], ["path", { d: "M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-chart-column-increasing.js var FileChartColumnIncreasing; var init_file_chart_column_increasing = __esmMin((() => { FileChartColumnIncreasing = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M8 18v-2" }], ["path", { d: "M12 18v-4" }], ["path", { d: "M16 18v-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-chart-column.js var FileChartColumn; var init_file_chart_column = __esmMin((() => { FileChartColumn = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M8 18v-1" }], ["path", { d: "M12 18v-6" }], ["path", { d: "M16 18v-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-chart-line.js var FileChartLine; var init_file_chart_line = __esmMin((() => { FileChartLine = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "m16 13-3.5 3.5-2-2L8 17" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-chart-pie.js var FileChartPie; var init_file_chart_pie = __esmMin((() => { FileChartPie = [ ["path", { d: "M15.941 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.704l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.512" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M4.017 11.512a6 6 0 1 0 8.466 8.475" }], ["path", { d: "M9 16a1 1 0 0 1-1-1v-4c0-.552.45-1.008.995-.917a6 6 0 0 1 4.922 4.922c.091.544-.365.995-.917.995z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-check-corner.js var FileCheckCorner; var init_file_check_corner = __esmMin((() => { FileCheckCorner = [ ["path", { d: "M10.5 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v6" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "m14 20 2 2 4-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-check.js var FileCheck; var init_file_check = __esmMin((() => { FileCheck = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "m9 15 2 2 4-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-clock.js var FileClock; var init_file_clock = __esmMin((() => { FileClock = [ ["path", { d: "M16 22h2a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v2.85" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M8 14v2.2l1.6 1" }], ["circle", { cx: "8", cy: "16", r: "6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-code.js var FileCode; var init_file_code = __esmMin((() => { FileCode = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M10 12.5 8 15l2 2.5" }], ["path", { d: "m14 12.5 2 2.5-2 2.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-code-corner.js var FileCodeCorner; var init_file_code_corner = __esmMin((() => { FileCodeCorner = [ ["path", { d: "M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "m5 16-3 3 3 3" }], ["path", { d: "m9 22 3-3-3-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-cog.js var FileCog; var init_file_cog = __esmMin((() => { FileCog = [ ["path", { d: "M13.85 22H18a2 2 0 0 0 2-2V8a2 2 0 0 0-.586-1.414l-4-4A2 2 0 0 0 14 2H6a2 2 0 0 0-2 2v6.6" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "m3.305 19.53.923-.382" }], ["path", { d: "m4.228 16.852-.924-.383" }], ["path", { d: "m5.852 15.228-.383-.923" }], ["path", { d: "m5.852 20.772-.383.924" }], ["path", { d: "m8.148 15.228.383-.923" }], ["path", { d: "m8.53 21.696-.382-.924" }], ["path", { d: "m9.773 16.852.922-.383" }], ["path", { d: "m9.773 19.148.922.383" }], ["circle", { cx: "7", cy: "18", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-diff.js var FileDiff; var init_file_diff = __esmMin((() => { FileDiff = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M9 10h6" }], ["path", { d: "M12 13V7" }], ["path", { d: "M9 17h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-digit.js var FileDigit; var init_file_digit = __esmMin((() => { FileDigit = [ ["path", { d: "M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M10 16h2v6" }], ["path", { d: "M10 22h4" }], ["rect", { x: "2", y: "16", width: "4", height: "6", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-down.js var FileDown; var init_file_down = __esmMin((() => { FileDown = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M12 18v-6" }], ["path", { d: "m9 15 3 3 3-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-exclamation-point.js var FileExclamationPoint; var init_file_exclamation_point = __esmMin((() => { FileExclamationPoint = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M12 9v4" }], ["path", { d: "M12 17h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-headphone.js var FileHeadphone; var init_file_headphone = __esmMin((() => { FileHeadphone = [ ["path", { d: "M4 6.835V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-.343" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M2 19a2 2 0 0 1 4 0v1a2 2 0 0 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 0 1-4 0v-1a2 2 0 0 1 4 0" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-heart.js var FileHeart; var init_file_heart = __esmMin((() => { FileHeart = [ ["path", { d: "M13 22h5a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v7" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M3.62 18.8A2.25 2.25 0 1 1 7 15.836a2.25 2.25 0 1 1 3.38 2.966l-2.626 2.856a1 1 0 0 1-1.507 0z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-image.js var FileImage; var init_file_image = __esmMin((() => { FileImage = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["circle", { cx: "10", cy: "12", r: "2" }], ["path", { d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-input.js var FileInput; var init_file_input = __esmMin((() => { FileInput = [ ["path", { d: "M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-1" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M2 15h10" }], ["path", { d: "m9 18 3-3-3-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-key.js var FileKey; var init_file_key = __esmMin((() => { FileKey = [ ["path", { d: "M10.65 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v10.1" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "m10 15 1 1" }], ["path", { d: "m11 14-4.586 4.586" }], ["circle", { cx: "5", cy: "20", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-lock.js var FileLock; var init_file_lock = __esmMin((() => { FileLock = [ ["path", { d: "M4 9.8V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M9 17v-2a2 2 0 0 0-4 0v2" }], ["rect", { width: "8", height: "5", x: "3", y: "17", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-minus-corner.js var FileMinusCorner; var init_file_minus_corner = __esmMin((() => { FileMinusCorner = [ ["path", { d: "M20 14V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M14 18h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-minus.js var FileMinus; var init_file_minus = __esmMin((() => { FileMinus = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M9 15h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-music.js var FileMusic; var init_file_music = __esmMin((() => { FileMusic = [ ["path", { d: "M11.65 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v10.35" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M8 20v-7l3 1.474" }], ["circle", { cx: "6", cy: "20", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-output.js var FileOutput; var init_file_output = __esmMin((() => { FileOutput = [ ["path", { d: "M4.226 20.925A2 2 0 0 0 6 22h12a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.127" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "m5 11-3 3" }], ["path", { d: "m5 17-3-3h10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-pen-line.js var FilePenLine; var init_file_pen_line = __esmMin((() => { FilePenLine = [ ["path", { d: "m18.226 5.226-2.52-2.52A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-.351" }], ["path", { d: "M21.378 12.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }], ["path", { d: "M8 18h1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-pen.js var FilePen; var init_file_pen = __esmMin((() => { FilePen = [ ["path", { d: "M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-play.js var FilePlay; var init_file_play = __esmMin((() => { FilePlay = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M15.033 13.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56v-4.704a.645.645 0 0 1 .967-.56z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-plus-corner.js var FilePlusCorner; var init_file_plus_corner = __esmMin((() => { FilePlusCorner = [ ["path", { d: "M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M14 19h6" }], ["path", { d: "M17 16v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-plus.js var FilePlus; var init_file_plus = __esmMin((() => { FilePlus = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M9 15h6" }], ["path", { d: "M12 18v-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-question-mark.js var FileQuestionMark; var init_file_question_mark = __esmMin((() => { FileQuestionMark = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M12 17h.01" }], ["path", { d: "M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-scan.js var FileScan; var init_file_scan = __esmMin((() => { FileScan = [ ["path", { d: "M20 10V8a2.4 2.4 0 0 0-.706-1.704l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4.35" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M16 14a2 2 0 0 0-2 2" }], ["path", { d: "M16 22a2 2 0 0 1-2-2" }], ["path", { d: "M20 14a2 2 0 0 1 2 2" }], ["path", { d: "M20 22a2 2 0 0 0 2-2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-search-corner.js var FileSearchCorner; var init_file_search_corner = __esmMin((() => { FileSearchCorner = [ ["path", { d: "M11.1 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.589 3.588A2.4 2.4 0 0 1 20 8v3.25" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "m21 22-2.88-2.88" }], ["circle", { cx: "16", cy: "17", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-search.js var FileSearch; var init_file_search = __esmMin((() => { FileSearch = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["circle", { cx: "11.5", cy: "14.5", r: "2.5" }], ["path", { d: "M13.3 16.3 15 18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-signal.js var FileSignal; var init_file_signal = __esmMin((() => { FileSignal = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M8 15h.01" }], ["path", { d: "M11.5 13.5a2.5 2.5 0 0 1 0 3" }], ["path", { d: "M15 12a5 5 0 0 1 0 6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-sliders.js var FileSliders; var init_file_sliders = __esmMin((() => { FileSliders = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M8 12h8" }], ["path", { d: "M10 11v2" }], ["path", { d: "M8 17h8" }], ["path", { d: "M14 16v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-spreadsheet.js var FileSpreadsheet; var init_file_spreadsheet = __esmMin((() => { FileSpreadsheet = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M8 13h2" }], ["path", { d: "M14 13h2" }], ["path", { d: "M8 17h2" }], ["path", { d: "M14 17h2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-stack.js var FileStack; var init_file_stack = __esmMin((() => { FileStack = [ ["path", { d: "M11 21a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1" }], ["path", { d: "M16 16a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1" }], ["path", { d: "M21 6a2 2 0 0 0-.586-1.414l-2-2A2 2 0 0 0 17 2h-3a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-symlink.js var FileSymlink; var init_file_symlink = __esmMin((() => { FileSymlink = [ ["path", { d: "M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h7" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "m10 18 3-3-3-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-terminal.js var FileTerminal; var init_file_terminal = __esmMin((() => { FileTerminal = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "m8 16 2-2-2-2" }], ["path", { d: "M12 18h4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-text.js var FileText; var init_file_text = __esmMin((() => { FileText = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M10 9H8" }], ["path", { d: "M16 13H8" }], ["path", { d: "M16 17H8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-type-corner.js var FileTypeCorner; var init_file_type_corner = __esmMin((() => { FileTypeCorner = [ ["path", { d: "M12 22h6a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v6" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M3 16v-1.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5V16" }], ["path", { d: "M6 22h2" }], ["path", { d: "M7 14v8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-type.js var FileType; var init_file_type = __esmMin((() => { FileType = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M11 18h2" }], ["path", { d: "M12 12v6" }], ["path", { d: "M9 13v-.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-up.js var FileUp; var init_file_up = __esmMin((() => { FileUp = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M12 12v6" }], ["path", { d: "m15 15-3-3-3 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-user.js var FileUser; var init_file_user = __esmMin((() => { FileUser = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M16 22a4 4 0 0 0-8 0" }], ["circle", { cx: "12", cy: "15", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-video-camera.js var FileVideoCamera; var init_file_video_camera = __esmMin((() => { FileVideoCamera = [ ["path", { d: "M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157" }], ["rect", { width: "7", height: "6", x: "3", y: "16", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-volume.js var FileVolume; var init_file_volume = __esmMin((() => { FileVolume = [ ["path", { d: "M4 11.55V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-1.95" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M12 15a5 5 0 0 1 0 6" }], ["path", { d: "M8 14.502a.5.5 0 0 0-.826-.381l-1.893 1.631a1 1 0 0 1-.651.243H3.5a.5.5 0 0 0-.5.501v3.006a.5.5 0 0 0 .5.501h1.129a1 1 0 0 1 .652.243l1.893 1.633a.5.5 0 0 0 .826-.38z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-x-corner.js var FileXCorner; var init_file_x_corner = __esmMin((() => { FileXCorner = [ ["path", { d: "M11 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "m15 17 5 5" }], ["path", { d: "m20 17-5 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file-x.js var FileX; var init_file_x = __esmMin((() => { FileX = [ ["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "m14.5 12.5-5 5" }], ["path", { d: "m9.5 12.5 5 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/file.js var File$1; var init_file = __esmMin((() => { File$1 = [["path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/files.js var Files; var init_files = __esmMin((() => { Files = [ ["path", { d: "M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8" }], ["path", { d: "M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z" }], ["path", { d: "M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/film.js var Film; var init_film = __esmMin((() => { Film = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M7 3v18" }], ["path", { d: "M3 7.5h4" }], ["path", { d: "M3 12h18" }], ["path", { d: "M3 16.5h4" }], ["path", { d: "M17 3v18" }], ["path", { d: "M17 7.5h4" }], ["path", { d: "M17 16.5h4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/fingerprint-pattern.js var FingerprintPattern; var init_fingerprint_pattern = __esmMin((() => { FingerprintPattern = [ ["path", { d: "M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4" }], ["path", { d: "M14 13.12c0 2.38 0 6.38-1 8.88" }], ["path", { d: "M17.29 21.02c.12-.6.43-2.3.5-3.02" }], ["path", { d: "M2 12a10 10 0 0 1 18-6" }], ["path", { d: "M2 16h.01" }], ["path", { d: "M21.8 16c.2-2 .131-5.354 0-6" }], ["path", { d: "M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2" }], ["path", { d: "M8.65 22c.21-.66.45-1.32.57-2" }], ["path", { d: "M9 6.8a6 6 0 0 1 9 5.2v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/fire-extinguisher.js var FireExtinguisher; var init_fire_extinguisher = __esmMin((() => { FireExtinguisher = [ ["path", { d: "M15 6.5V3a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v3.5" }], ["path", { d: "M9 18h8" }], ["path", { d: "M18 3h-3" }], ["path", { d: "M11 3a6 6 0 0 0-6 6v11" }], ["path", { d: "M5 13h4" }], ["path", { d: "M17 10a4 4 0 0 0-8 0v10a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/fish-off.js var FishOff; var init_fish_off = __esmMin((() => { FishOff = [ ["path", { d: "M18 12.47v.03m0-.5v.47m-.475 5.056A6.744 6.744 0 0 1 15 18c-3.56 0-7.56-2.53-8.5-6 .348-1.28 1.114-2.433 2.121-3.38m3.444-2.088A8.802 8.802 0 0 1 15 6c3.56 0 6.06 2.54 7 6-.309 1.14-.786 2.177-1.413 3.058" }], ["path", { d: "M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33m7.48-4.372A9.77 9.77 0 0 1 16 6.07m0 11.86a9.77 9.77 0 0 1-1.728-3.618" }], ["path", { d: "m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98M8.53 3h5.27a2 2 0 0 1 1.98 1.67l.23 1.4M2 2l20 20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/fish-symbol.js var FishSymbol; var init_fish_symbol = __esmMin((() => { FishSymbol = [["path", { d: "M2 16s9-15 20-4C11 23 2 8 2 8" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/fish.js var Fish; var init_fish = __esmMin((() => { Fish = [ ["path", { d: "M6.5 12c.94-3.46 4.94-6 8.5-6 3.56 0 6.06 2.54 7 6-.94 3.47-3.44 6-7 6s-7.56-2.53-8.5-6Z" }], ["path", { d: "M18 12v.5" }], ["path", { d: "M16 17.93a9.77 9.77 0 0 1 0-11.86" }], ["path", { d: "M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33" }], ["path", { d: "M10.46 7.26C10.2 5.88 9.17 4.24 8 3h5.8a2 2 0 0 1 1.98 1.67l.23 1.4" }], ["path", { d: "m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/flag-off.js var FlagOff; var init_flag_off = __esmMin((() => { FlagOff = [ ["path", { d: "M16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M4 22V4" }], ["path", { d: "M7.656 2H8c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10.347" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/flag-triangle-left.js var FlagTriangleLeft; var init_flag_triangle_left = __esmMin((() => { FlagTriangleLeft = [["path", { d: "M18 22V2.8a.8.8 0 0 0-1.17-.71L5.45 7.78a.8.8 0 0 0 0 1.44L18 15.5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/flag-triangle-right.js var FlagTriangleRight; var init_flag_triangle_right = __esmMin((() => { FlagTriangleRight = [["path", { d: "M6 22V2.8a.8.8 0 0 1 1.17-.71l11.38 5.69a.8.8 0 0 1 0 1.44L6 15.5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/flag.js var Flag; var init_flag = __esmMin((() => { Flag = [["path", { d: "M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/flame-kindling.js var FlameKindling; var init_flame_kindling = __esmMin((() => { FlameKindling = [ ["path", { d: "M12 2c1 3 2.5 3.5 3.5 4.5A5 5 0 0 1 17 10a5 5 0 1 1-10 0c0-.3 0-.6.1-.9a2 2 0 1 0 3.3-2C8 4.5 11 2 12 2Z" }], ["path", { d: "m5 22 14-4" }], ["path", { d: "m5 18 14 4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/flame.js var Flame; var init_flame = __esmMin((() => { Flame = [["path", { d: "M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/flashlight-off.js var FlashlightOff; var init_flashlight_off = __esmMin((() => { FlashlightOff = [ ["path", { d: "M11.652 6H18" }], ["path", { d: "M12 13v1" }], ["path", { d: "M16 16v4a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2v-8a4 4 0 0 0-.8-2.4l-.6-.8A3 3 0 0 1 6 7V6" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M7.649 2H17a1 1 0 0 1 1 1v4a3 3 0 0 1-.6 1.8l-.6.8a4 4 0 0 0-.55 1.007" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/flashlight.js var Flashlight; var init_flashlight = __esmMin((() => { Flashlight = [ ["path", { d: "M12 13v1" }], ["path", { d: "M17 2a1 1 0 0 1 1 1v4a3 3 0 0 1-.6 1.8l-.6.8A4 4 0 0 0 16 12v8a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2v-8a4 4 0 0 0-.8-2.4l-.6-.8A3 3 0 0 1 6 7V3a1 1 0 0 1 1-1z" }], ["path", { d: "M6 6h12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/flask-conical-off.js var FlaskConicalOff; var init_flask_conical_off = __esmMin((() => { FlaskConicalOff = [ ["path", { d: "M10 2v2.343" }], ["path", { d: "M14 2v6.343" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M20 20a2 2 0 0 1-2 2H6a2 2 0 0 1-1.755-2.96l5.227-9.563" }], ["path", { d: "M6.453 15H15" }], ["path", { d: "M8.5 2h7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/flask-conical.js var FlaskConical; var init_flask_conical = __esmMin((() => { FlaskConical = [ ["path", { d: "M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2" }], ["path", { d: "M6.453 15h11.094" }], ["path", { d: "M8.5 2h7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/flask-round.js var FlaskRound; var init_flask_round = __esmMin((() => { FlaskRound = [ ["path", { d: "M10 2v6.292a7 7 0 1 0 4 0V2" }], ["path", { d: "M5 15h14" }], ["path", { d: "M8.5 2h7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/flip-horizontal-2.js var FlipHorizontal2; var init_flip_horizontal_2 = __esmMin((() => { FlipHorizontal2 = [ ["path", { d: "m3 7 5 5-5 5V7" }], ["path", { d: "m21 7-5 5 5 5V7" }], ["path", { d: "M12 20v2" }], ["path", { d: "M12 14v2" }], ["path", { d: "M12 8v2" }], ["path", { d: "M12 2v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/flip-horizontal.js var FlipHorizontal; var init_flip_horizontal = __esmMin((() => { FlipHorizontal = [ ["path", { d: "M8 3H5a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h3" }], ["path", { d: "M16 3h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-3" }], ["path", { d: "M12 20v2" }], ["path", { d: "M12 14v2" }], ["path", { d: "M12 8v2" }], ["path", { d: "M12 2v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/flip-vertical-2.js var FlipVertical2; var init_flip_vertical_2 = __esmMin((() => { FlipVertical2 = [ ["path", { d: "m17 3-5 5-5-5h10" }], ["path", { d: "m17 21-5-5-5 5h10" }], ["path", { d: "M4 12H2" }], ["path", { d: "M10 12H8" }], ["path", { d: "M16 12h-2" }], ["path", { d: "M22 12h-2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/flip-vertical.js var FlipVertical; var init_flip_vertical = __esmMin((() => { FlipVertical = [ ["path", { d: "M21 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v3" }], ["path", { d: "M21 16v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-3" }], ["path", { d: "M4 12H2" }], ["path", { d: "M10 12H8" }], ["path", { d: "M16 12h-2" }], ["path", { d: "M22 12h-2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/flower-2.js var Flower2; var init_flower_2 = __esmMin((() => { Flower2 = [ ["path", { d: "M12 5a3 3 0 1 1 3 3m-3-3a3 3 0 1 0-3 3m3-3v1M9 8a3 3 0 1 0 3 3M9 8h1m5 0a3 3 0 1 1-3 3m3-3h-1m-2 3v-1" }], ["circle", { cx: "12", cy: "8", r: "2" }], ["path", { d: "M12 10v12" }], ["path", { d: "M12 22c4.2 0 7-1.667 7-5-4.2 0-7 1.667-7 5Z" }], ["path", { d: "M12 22c-4.2 0-7-1.667-7-5 4.2 0 7 1.667 7 5Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/flower.js var Flower; var init_flower = __esmMin((() => { Flower = [ ["circle", { cx: "12", cy: "12", r: "3" }], ["path", { d: "M12 16.5A4.5 4.5 0 1 1 7.5 12 4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 1 1 4.5 4.5 4.5 4.5 0 1 1-4.5 4.5" }], ["path", { d: "M12 7.5V9" }], ["path", { d: "M7.5 12H9" }], ["path", { d: "M16.5 12H15" }], ["path", { d: "M12 16.5V15" }], ["path", { d: "m8 8 1.88 1.88" }], ["path", { d: "M14.12 9.88 16 8" }], ["path", { d: "m8 16 1.88-1.88" }], ["path", { d: "M14.12 14.12 16 16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/focus.js var Focus; var init_focus = __esmMin((() => { Focus = [ ["circle", { cx: "12", cy: "12", r: "3" }], ["path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }], ["path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }], ["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }], ["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/fold-horizontal.js var FoldHorizontal; var init_fold_horizontal = __esmMin((() => { FoldHorizontal = [ ["path", { d: "M2 12h6" }], ["path", { d: "M22 12h-6" }], ["path", { d: "M12 2v2" }], ["path", { d: "M12 8v2" }], ["path", { d: "M12 14v2" }], ["path", { d: "M12 20v2" }], ["path", { d: "m19 9-3 3 3 3" }], ["path", { d: "m5 15 3-3-3-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/fold-vertical.js var FoldVertical; var init_fold_vertical = __esmMin((() => { FoldVertical = [ ["path", { d: "M12 22v-6" }], ["path", { d: "M12 8V2" }], ["path", { d: "M4 12H2" }], ["path", { d: "M10 12H8" }], ["path", { d: "M16 12h-2" }], ["path", { d: "M22 12h-2" }], ["path", { d: "m15 19-3-3-3 3" }], ["path", { d: "m15 5-3 3-3-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-archive.js var FolderArchive; var init_folder_archive = __esmMin((() => { FolderArchive = [ ["circle", { cx: "15", cy: "19", r: "2" }], ["path", { d: "M20.9 19.8A2 2 0 0 0 22 18V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h5.1" }], ["path", { d: "M15 11v-1" }], ["path", { d: "M15 17v-2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-check.js var FolderCheck; var init_folder_check = __esmMin((() => { FolderCheck = [["path", { d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }], ["path", { d: "m9 13 2 2 4-4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-clock.js var FolderClock; var init_folder_clock = __esmMin((() => { FolderClock = [ ["path", { d: "M16 14v2.2l1.6 1" }], ["path", { d: "M7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2" }], ["circle", { cx: "16", cy: "16", r: "6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-closed.js var FolderClosed; var init_folder_closed = __esmMin((() => { FolderClosed = [["path", { d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }], ["path", { d: "M2 10h20" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-code.js var FolderCode; var init_folder_code = __esmMin((() => { FolderCode = [ ["path", { d: "M10 10.5 8 13l2 2.5" }], ["path", { d: "m14 10.5 2 2.5-2 2.5" }], ["path", { d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-cog.js var FolderCog; var init_folder_cog = __esmMin((() => { FolderCog = [ ["path", { d: "M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.98a2 2 0 0 1 1.69.9l.66 1.2A2 2 0 0 0 12 6h8a2 2 0 0 1 2 2v3.3" }], ["path", { d: "m14.305 19.53.923-.382" }], ["path", { d: "m15.228 16.852-.923-.383" }], ["path", { d: "m16.852 15.228-.383-.923" }], ["path", { d: "m16.852 20.772-.383.924" }], ["path", { d: "m19.148 15.228.383-.923" }], ["path", { d: "m19.53 21.696-.382-.924" }], ["path", { d: "m20.772 16.852.924-.383" }], ["path", { d: "m20.772 19.148.924.383" }], ["circle", { cx: "18", cy: "18", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-dot.js var FolderDot; var init_folder_dot = __esmMin((() => { FolderDot = [["path", { d: "M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z" }], ["circle", { cx: "12", cy: "13", r: "1" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-down.js var FolderDown; var init_folder_down = __esmMin((() => { FolderDown = [ ["path", { d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }], ["path", { d: "M12 10v6" }], ["path", { d: "m15 13-3 3-3-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-git-2.js var FolderGit2; var init_folder_git_2 = __esmMin((() => { FolderGit2 = [ ["path", { d: "M18 19a5 5 0 0 1-5-5v8" }], ["path", { d: "M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5" }], ["circle", { cx: "13", cy: "12", r: "2" }], ["circle", { cx: "20", cy: "19", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-git.js var FolderGit; var init_folder_git = __esmMin((() => { FolderGit = [ ["circle", { cx: "12", cy: "13", r: "2" }], ["path", { d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }], ["path", { d: "M14 13h3" }], ["path", { d: "M7 13h3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-heart.js var FolderHeart; var init_folder_heart = __esmMin((() => { FolderHeart = [["path", { d: "M10.638 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v3.417" }], ["path", { d: "M14.62 18.8A2.25 2.25 0 1 1 18 15.836a2.25 2.25 0 1 1 3.38 2.966l-2.626 2.856a.998.998 0 0 1-1.507 0z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-input.js var FolderInput; var init_folder_input = __esmMin((() => { FolderInput = [ ["path", { d: "M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1" }], ["path", { d: "M2 13h10" }], ["path", { d: "m9 16 3-3-3-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-kanban.js var FolderKanban; var init_folder_kanban = __esmMin((() => { FolderKanban = [ ["path", { d: "M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z" }], ["path", { d: "M8 10v4" }], ["path", { d: "M12 10v2" }], ["path", { d: "M16 10v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-key.js var FolderKey; var init_folder_key = __esmMin((() => { FolderKey = [ ["circle", { cx: "16", cy: "20", r: "2" }], ["path", { d: "M10 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v2" }], ["path", { d: "m22 14-4.5 4.5" }], ["path", { d: "m21 15 1 1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-lock.js var FolderLock; var init_folder_lock = __esmMin((() => { FolderLock = [ ["rect", { width: "8", height: "5", x: "14", y: "17", rx: "1" }], ["path", { d: "M10 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v2.5" }], ["path", { d: "M20 17v-2a2 2 0 1 0-4 0v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-minus.js var FolderMinus; var init_folder_minus = __esmMin((() => { FolderMinus = [["path", { d: "M9 13h6" }], ["path", { d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-open-dot.js var FolderOpenDot; var init_folder_open_dot = __esmMin((() => { FolderOpenDot = [["path", { d: "m6 14 1.45-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.55 6a2 2 0 0 1-1.94 1.5H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.93a2 2 0 0 1 1.66.9l.82 1.2a2 2 0 0 0 1.66.9H18a2 2 0 0 1 2 2v2" }], ["circle", { cx: "14", cy: "15", r: "1" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-open.js var FolderOpen; var init_folder_open = __esmMin((() => { FolderOpen = [["path", { d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-output.js var FolderOutput; var init_folder_output = __esmMin((() => { FolderOutput = [ ["path", { d: "M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5" }], ["path", { d: "M2 13h10" }], ["path", { d: "m5 10-3 3 3 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-pen.js var FolderPen; var init_folder_pen = __esmMin((() => { FolderPen = [["path", { d: "M2 11.5V5a2 2 0 0 1 2-2h3.9c.7 0 1.3.3 1.7.9l.8 1.2c.4.6 1 .9 1.7.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-9.5" }], ["path", { d: "M11.378 13.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-plus.js var FolderPlus; var init_folder_plus = __esmMin((() => { FolderPlus = [ ["path", { d: "M12 10v6" }], ["path", { d: "M9 13h6" }], ["path", { d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-root.js var FolderRoot; var init_folder_root = __esmMin((() => { FolderRoot = [ ["path", { d: "M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z" }], ["circle", { cx: "12", cy: "13", r: "2" }], ["path", { d: "M12 15v5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-search-2.js var FolderSearch2; var init_folder_search_2 = __esmMin((() => { FolderSearch2 = [ ["circle", { cx: "11.5", cy: "12.5", r: "2.5" }], ["path", { d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }], ["path", { d: "M13.3 14.3 15 16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-search.js var FolderSearch; var init_folder_search = __esmMin((() => { FolderSearch = [ ["path", { d: "M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1" }], ["path", { d: "m21 21-1.9-1.9" }], ["circle", { cx: "17", cy: "17", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-symlink.js var FolderSymlink; var init_folder_symlink = __esmMin((() => { FolderSymlink = [["path", { d: "M2 9.35V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h7" }], ["path", { d: "m8 16 3-3-3-3" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-sync.js var FolderSync; var init_folder_sync = __esmMin((() => { FolderSync = [ ["path", { d: "M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v.5" }], ["path", { d: "M12 10v4h4" }], ["path", { d: "m12 14 1.535-1.605a5 5 0 0 1 8 1.5" }], ["path", { d: "M22 22v-4h-4" }], ["path", { d: "m22 18-1.535 1.605a5 5 0 0 1-8-1.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-tree.js var FolderTree; var init_folder_tree = __esmMin((() => { FolderTree = [ ["path", { d: "M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z" }], ["path", { d: "M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z" }], ["path", { d: "M3 5a2 2 0 0 0 2 2h3" }], ["path", { d: "M3 3v13a2 2 0 0 0 2 2h3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-up.js var FolderUp; var init_folder_up = __esmMin((() => { FolderUp = [ ["path", { d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }], ["path", { d: "M12 10v6" }], ["path", { d: "m9 13 3-3 3 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder-x.js var FolderX; var init_folder_x = __esmMin((() => { FolderX = [ ["path", { d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }], ["path", { d: "m9.5 10.5 5 5" }], ["path", { d: "m14.5 10.5-5 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folder.js var Folder$1; var init_folder = __esmMin((() => { Folder$1 = [["path", { d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/folders.js var Folders; var init_folders = __esmMin((() => { Folders = [["path", { d: "M20 5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h2.5a1.5 1.5 0 0 1 1.2.6l.6.8a1.5 1.5 0 0 0 1.2.6z" }], ["path", { d: "M3 8.268a2 2 0 0 0-1 1.738V19a2 2 0 0 0 2 2h11a2 2 0 0 0 1.732-1" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/footprints.js var Footprints; var init_footprints = __esmMin((() => { Footprints = [ ["path", { d: "M4 16v-2.38C4 11.5 2.97 10.5 3 8c.03-2.72 1.49-6 4.5-6C9.37 2 10 3.8 10 5.5c0 3.11-2 5.66-2 8.68V16a2 2 0 1 1-4 0Z" }], ["path", { d: "M20 20v-2.38c0-2.12 1.03-3.12 1-5.62-.03-2.72-1.49-6-4.5-6C14.63 6 14 7.8 14 9.5c0 3.11 2 5.66 2 8.68V20a2 2 0 1 0 4 0Z" }], ["path", { d: "M16 17h4" }], ["path", { d: "M4 13h4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/forklift.js var Forklift; var init_forklift = __esmMin((() => { Forklift = [ ["path", { d: "M12 12H5a2 2 0 0 0-2 2v5" }], ["circle", { cx: "13", cy: "19", r: "2" }], ["circle", { cx: "5", cy: "19", r: "2" }], ["path", { d: "M8 19h3m5-17v17h6M6 12V7c0-1.1.9-2 2-2h3l5 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/form.js var Form; var init_form = __esmMin((() => { Form = [ ["path", { d: "M4 14h6" }], ["path", { d: "M4 2h10" }], ["rect", { x: "4", y: "18", width: "16", height: "4", rx: "1" }], ["rect", { x: "4", y: "6", width: "16", height: "4", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/forward.js var Forward; var init_forward = __esmMin((() => { Forward = [["path", { d: "m15 17 5-5-5-5" }], ["path", { d: "M4 18v-2a4 4 0 0 1 4-4h12" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/frame.js var Frame; var init_frame = __esmMin((() => { Frame = [ ["line", { x1: "22", x2: "2", y1: "6", y2: "6" }], ["line", { x1: "22", x2: "2", y1: "18", y2: "18" }], ["line", { x1: "6", x2: "6", y1: "2", y2: "22" }], ["line", { x1: "18", x2: "18", y1: "2", y2: "22" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/framer.js var Framer; var init_framer = __esmMin((() => { Framer = [["path", { d: "M5 16V9h14V2H5l14 14h-7m-7 0 7 7v-7m-7 0h7" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/frown.js var Frown; var init_frown = __esmMin((() => { Frown = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M16 16s-1.5-2-4-2-4 2-4 2" }], ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9" }], ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/fuel.js var Fuel; var init_fuel = __esmMin((() => { Fuel = [ ["path", { d: "M14 13h2a2 2 0 0 1 2 2v2a2 2 0 0 0 4 0v-6.998a2 2 0 0 0-.59-1.42L18 5" }], ["path", { d: "M14 21V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v16" }], ["path", { d: "M2 21h13" }], ["path", { d: "M3 9h11" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/fullscreen.js var Fullscreen; var init_fullscreen = __esmMin((() => { Fullscreen = [ ["path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }], ["path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }], ["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }], ["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" }], ["rect", { width: "10", height: "8", x: "7", y: "8", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/funnel-plus.js var FunnelPlus; var init_funnel_plus = __esmMin((() => { FunnelPlus = [ ["path", { d: "M13.354 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14v6a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341l1.218-1.348" }], ["path", { d: "M16 6h6" }], ["path", { d: "M19 3v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/funnel-x.js var FunnelX; var init_funnel_x = __esmMin((() => { FunnelX = [ ["path", { d: "M12.531 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14v6a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341l.427-.473" }], ["path", { d: "m16.5 3.5 5 5" }], ["path", { d: "m21.5 3.5-5 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/funnel.js var Funnel; var init_funnel = __esmMin((() => { Funnel = [["path", { d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/gallery-horizontal-end.js var GalleryHorizontalEnd; var init_gallery_horizontal_end = __esmMin((() => { GalleryHorizontalEnd = [ ["path", { d: "M2 7v10" }], ["path", { d: "M6 5v14" }], ["rect", { width: "12", height: "18", x: "10", y: "3", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/gallery-horizontal.js var GalleryHorizontal; var init_gallery_horizontal = __esmMin((() => { GalleryHorizontal = [ ["path", { d: "M2 3v18" }], ["rect", { width: "12", height: "18", x: "6", y: "3", rx: "2" }], ["path", { d: "M22 3v18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/gallery-thumbnails.js var GalleryThumbnails; var init_gallery_thumbnails = __esmMin((() => { GalleryThumbnails = [ ["rect", { width: "18", height: "14", x: "3", y: "3", rx: "2" }], ["path", { d: "M4 21h1" }], ["path", { d: "M9 21h1" }], ["path", { d: "M14 21h1" }], ["path", { d: "M19 21h1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/gallery-vertical-end.js var GalleryVerticalEnd; var init_gallery_vertical_end = __esmMin((() => { GalleryVerticalEnd = [ ["path", { d: "M7 2h10" }], ["path", { d: "M5 6h14" }], ["rect", { width: "18", height: "12", x: "3", y: "10", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/gallery-vertical.js var GalleryVertical; var init_gallery_vertical = __esmMin((() => { GalleryVertical = [ ["path", { d: "M3 2h18" }], ["rect", { width: "18", height: "12", x: "3", y: "6", rx: "2" }], ["path", { d: "M3 22h18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/gamepad-2.js var Gamepad2; var init_gamepad_2 = __esmMin((() => { Gamepad2 = [ ["line", { x1: "6", x2: "10", y1: "11", y2: "11" }], ["line", { x1: "8", x2: "8", y1: "9", y2: "13" }], ["line", { x1: "15", x2: "15.01", y1: "12", y2: "12" }], ["line", { x1: "18", x2: "18.01", y1: "10", y2: "10" }], ["path", { d: "M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/gamepad-directional.js var GamepadDirectional; var init_gamepad_directional = __esmMin((() => { GamepadDirectional = [ ["path", { d: "M11.146 15.854a1.207 1.207 0 0 1 1.708 0l1.56 1.56A2 2 0 0 1 15 18.828V21a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1v-2.172a2 2 0 0 1 .586-1.414z" }], ["path", { d: "M18.828 15a2 2 0 0 1-1.414-.586l-1.56-1.56a1.207 1.207 0 0 1 0-1.708l1.56-1.56A2 2 0 0 1 18.828 9H21a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1z" }], ["path", { d: "M6.586 14.414A2 2 0 0 1 5.172 15H3a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1h2.172a2 2 0 0 1 1.414.586l1.56 1.56a1.207 1.207 0 0 1 0 1.708z" }], ["path", { d: "M9 3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2.172a2 2 0 0 1-.586 1.414l-1.56 1.56a1.207 1.207 0 0 1-1.708 0l-1.56-1.56A2 2 0 0 1 9 5.172z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/gamepad.js var Gamepad; var init_gamepad = __esmMin((() => { Gamepad = [ ["line", { x1: "6", x2: "10", y1: "12", y2: "12" }], ["line", { x1: "8", x2: "8", y1: "10", y2: "14" }], ["line", { x1: "15", x2: "15.01", y1: "13", y2: "13" }], ["line", { x1: "18", x2: "18.01", y1: "11", y2: "11" }], ["rect", { width: "20", height: "12", x: "2", y: "6", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/gauge.js var Gauge; var init_gauge = __esmMin((() => { Gauge = [["path", { d: "m12 14 4-4" }], ["path", { d: "M3.34 19a10 10 0 1 1 17.32 0" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/gavel.js var Gavel; var init_gavel = __esmMin((() => { Gavel = [ ["path", { d: "m14 13-8.381 8.38a1 1 0 0 1-3.001-3l8.384-8.381" }], ["path", { d: "m16 16 6-6" }], ["path", { d: "m21.5 10.5-8-8" }], ["path", { d: "m8 8 6-6" }], ["path", { d: "m8.5 7.5 8 8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/gem.js var Gem; var init_gem = __esmMin((() => { Gem = [ ["path", { d: "M10.5 3 8 9l4 13 4-13-2.5-6" }], ["path", { d: "M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z" }], ["path", { d: "M2 9h20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/georgian-lari.js var GeorgianLari; var init_georgian_lari = __esmMin((() => { GeorgianLari = [ ["path", { d: "M11.5 21a7.5 7.5 0 1 1 7.35-9" }], ["path", { d: "M13 12V3" }], ["path", { d: "M4 21h16" }], ["path", { d: "M9 12V3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ghost.js var Ghost; var init_ghost = __esmMin((() => { Ghost = [ ["path", { d: "M9 10h.01" }], ["path", { d: "M15 10h.01" }], ["path", { d: "M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/gift.js var Gift; var init_gift = __esmMin((() => { Gift = [ ["rect", { x: "3", y: "8", width: "18", height: "4", rx: "1" }], ["path", { d: "M12 8v13" }], ["path", { d: "M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7" }], ["path", { d: "M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/git-branch-minus.js var GitBranchMinus; var init_git_branch_minus = __esmMin((() => { GitBranchMinus = [ ["path", { d: "M15 6a9 9 0 0 0-9 9V3" }], ["path", { d: "M21 18h-6" }], ["circle", { cx: "18", cy: "6", r: "3" }], ["circle", { cx: "6", cy: "18", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/git-branch-plus.js var GitBranchPlus; var init_git_branch_plus = __esmMin((() => { GitBranchPlus = [ ["path", { d: "M6 3v12" }], ["path", { d: "M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" }], ["path", { d: "M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" }], ["path", { d: "M15 6a9 9 0 0 0-9 9" }], ["path", { d: "M18 15v6" }], ["path", { d: "M21 18h-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/git-branch.js var GitBranch; var init_git_branch = __esmMin((() => { GitBranch = [ ["line", { x1: "6", x2: "6", y1: "3", y2: "15" }], ["circle", { cx: "18", cy: "6", r: "3" }], ["circle", { cx: "6", cy: "18", r: "3" }], ["path", { d: "M18 9a9 9 0 0 1-9 9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/git-commit-horizontal.js var GitCommitHorizontal; var init_git_commit_horizontal = __esmMin((() => { GitCommitHorizontal = [ ["circle", { cx: "12", cy: "12", r: "3" }], ["line", { x1: "3", x2: "9", y1: "12", y2: "12" }], ["line", { x1: "15", x2: "21", y1: "12", y2: "12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/git-commit-vertical.js var GitCommitVertical; var init_git_commit_vertical = __esmMin((() => { GitCommitVertical = [ ["path", { d: "M12 3v6" }], ["circle", { cx: "12", cy: "12", r: "3" }], ["path", { d: "M12 15v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/git-compare-arrows.js var GitCompareArrows; var init_git_compare_arrows = __esmMin((() => { GitCompareArrows = [ ["circle", { cx: "5", cy: "6", r: "3" }], ["path", { d: "M12 6h5a2 2 0 0 1 2 2v7" }], ["path", { d: "m15 9-3-3 3-3" }], ["circle", { cx: "19", cy: "18", r: "3" }], ["path", { d: "M12 18H7a2 2 0 0 1-2-2V9" }], ["path", { d: "m9 15 3 3-3 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/git-compare.js var GitCompare; var init_git_compare = __esmMin((() => { GitCompare = [ ["circle", { cx: "18", cy: "18", r: "3" }], ["circle", { cx: "6", cy: "6", r: "3" }], ["path", { d: "M13 6h3a2 2 0 0 1 2 2v7" }], ["path", { d: "M11 18H8a2 2 0 0 1-2-2V9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/git-fork.js var GitFork; var init_git_fork = __esmMin((() => { GitFork = [ ["circle", { cx: "12", cy: "18", r: "3" }], ["circle", { cx: "6", cy: "6", r: "3" }], ["circle", { cx: "18", cy: "6", r: "3" }], ["path", { d: "M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9" }], ["path", { d: "M12 12v3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/git-graph.js var GitGraph; var init_git_graph = __esmMin((() => { GitGraph = [ ["circle", { cx: "5", cy: "6", r: "3" }], ["path", { d: "M5 9v6" }], ["circle", { cx: "5", cy: "18", r: "3" }], ["path", { d: "M12 3v18" }], ["circle", { cx: "19", cy: "6", r: "3" }], ["path", { d: "M16 15.7A9 9 0 0 0 19 9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/git-merge.js var GitMerge; var init_git_merge = __esmMin((() => { GitMerge = [ ["circle", { cx: "18", cy: "18", r: "3" }], ["circle", { cx: "6", cy: "6", r: "3" }], ["path", { d: "M6 21V9a9 9 0 0 0 9 9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/git-pull-request-arrow.js var GitPullRequestArrow; var init_git_pull_request_arrow = __esmMin((() => { GitPullRequestArrow = [ ["circle", { cx: "5", cy: "6", r: "3" }], ["path", { d: "M5 9v12" }], ["circle", { cx: "19", cy: "18", r: "3" }], ["path", { d: "m15 9-3-3 3-3" }], ["path", { d: "M12 6h5a2 2 0 0 1 2 2v7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/git-pull-request-closed.js var GitPullRequestClosed; var init_git_pull_request_closed = __esmMin((() => { GitPullRequestClosed = [ ["circle", { cx: "6", cy: "6", r: "3" }], ["path", { d: "M6 9v12" }], ["path", { d: "m21 3-6 6" }], ["path", { d: "m21 9-6-6" }], ["path", { d: "M18 11.5V15" }], ["circle", { cx: "18", cy: "18", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/git-pull-request-create-arrow.js var GitPullRequestCreateArrow; var init_git_pull_request_create_arrow = __esmMin((() => { GitPullRequestCreateArrow = [ ["circle", { cx: "5", cy: "6", r: "3" }], ["path", { d: "M5 9v12" }], ["path", { d: "m15 9-3-3 3-3" }], ["path", { d: "M12 6h5a2 2 0 0 1 2 2v3" }], ["path", { d: "M19 15v6" }], ["path", { d: "M22 18h-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/git-pull-request-create.js var GitPullRequestCreate; var init_git_pull_request_create = __esmMin((() => { GitPullRequestCreate = [ ["circle", { cx: "6", cy: "6", r: "3" }], ["path", { d: "M6 9v12" }], ["path", { d: "M13 6h3a2 2 0 0 1 2 2v3" }], ["path", { d: "M18 15v6" }], ["path", { d: "M21 18h-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/git-pull-request-draft.js var GitPullRequestDraft; var init_git_pull_request_draft = __esmMin((() => { GitPullRequestDraft = [ ["circle", { cx: "18", cy: "18", r: "3" }], ["circle", { cx: "6", cy: "6", r: "3" }], ["path", { d: "M18 6V5" }], ["path", { d: "M18 11v-1" }], ["line", { x1: "6", x2: "6", y1: "9", y2: "21" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/gitlab.js var Gitlab; var init_gitlab = __esmMin((() => { Gitlab = [["path", { d: "m22 13.29-3.33-10a.42.42 0 0 0-.14-.18.38.38 0 0 0-.22-.11.39.39 0 0 0-.23.07.42.42 0 0 0-.14.18l-2.26 6.67H8.32L6.1 3.26a.42.42 0 0 0-.1-.18.38.38 0 0 0-.26-.08.39.39 0 0 0-.23.07.42.42 0 0 0-.14.18L2 13.29a.74.74 0 0 0 .27.83L12 21l9.69-6.88a.71.71 0 0 0 .31-.83Z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/git-pull-request.js var GitPullRequest; var init_git_pull_request = __esmMin((() => { GitPullRequest = [ ["circle", { cx: "18", cy: "18", r: "3" }], ["circle", { cx: "6", cy: "6", r: "3" }], ["path", { d: "M13 6h3a2 2 0 0 1 2 2v7" }], ["line", { x1: "6", x2: "6", y1: "9", y2: "21" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/glass-water.js var GlassWater; var init_glass_water = __esmMin((() => { GlassWater = [["path", { d: "M5.116 4.104A1 1 0 0 1 6.11 3h11.78a1 1 0 0 1 .994 1.105L17.19 20.21A2 2 0 0 1 15.2 22H8.8a2 2 0 0 1-2-1.79z" }], ["path", { d: "M6 12a5 5 0 0 1 6 0 5 5 0 0 0 6 0" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/github.js var Github; var init_github = __esmMin((() => { Github = [["path", { d: "M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4" }], ["path", { d: "M9 18c-4.51 2-5-2-7-2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/glasses.js var Glasses; var init_glasses = __esmMin((() => { Glasses = [ ["circle", { cx: "6", cy: "15", r: "4" }], ["circle", { cx: "18", cy: "15", r: "4" }], ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2" }], ["path", { d: "M2.5 13 5 7c.7-1.3 1.4-2 3-2" }], ["path", { d: "M21.5 13 19 7c-.7-1.3-1.5-2-3-2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/globe-lock.js var GlobeLock; var init_globe_lock = __esmMin((() => { GlobeLock = [ ["path", { d: "M15.686 15A14.5 14.5 0 0 1 12 22a14.5 14.5 0 0 1 0-20 10 10 0 1 0 9.542 13" }], ["path", { d: "M2 12h8.5" }], ["path", { d: "M20 6V4a2 2 0 1 0-4 0v2" }], ["rect", { width: "8", height: "5", x: "14", y: "6", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/globe.js var Globe; var init_globe = __esmMin((() => { Globe = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }], ["path", { d: "M2 12h20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/goal.js var Goal; var init_goal = __esmMin((() => { Goal = [ ["path", { d: "M12 13V2l8 4-8 4" }], ["path", { d: "M20.561 10.222a9 9 0 1 1-12.55-5.29" }], ["path", { d: "M8.002 9.997a5 5 0 1 0 8.9 2.02" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/gpu.js var Gpu; var init_gpu = __esmMin((() => { Gpu = [ ["path", { d: "M2 21V3" }], ["path", { d: "M2 5h18a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2.26" }], ["path", { d: "M7 17v3a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1v-3" }], ["circle", { cx: "16", cy: "11", r: "2" }], ["circle", { cx: "8", cy: "11", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/graduation-cap.js var GraduationCap; var init_graduation_cap = __esmMin((() => { GraduationCap = [ ["path", { d: "M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z" }], ["path", { d: "M22 10v6" }], ["path", { d: "M6 12.5V16a6 3 0 0 0 12 0v-3.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/grape.js var Grape; var init_grape = __esmMin((() => { Grape = [ ["path", { d: "M22 5V2l-5.89 5.89" }], ["circle", { cx: "16.6", cy: "15.89", r: "3" }], ["circle", { cx: "8.11", cy: "7.4", r: "3" }], ["circle", { cx: "12.35", cy: "11.65", r: "3" }], ["circle", { cx: "13.91", cy: "5.85", r: "3" }], ["circle", { cx: "18.15", cy: "10.09", r: "3" }], ["circle", { cx: "6.56", cy: "13.2", r: "3" }], ["circle", { cx: "10.8", cy: "17.44", r: "3" }], ["circle", { cx: "5", cy: "19", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/grid-2x2-check.js var Grid2x2Check; var init_grid_2x2_check = __esmMin((() => { Grid2x2Check = [["path", { d: "M12 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3" }], ["path", { d: "m16 19 2 2 4-4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/grid-2x2-plus.js var Grid2x2Plus; var init_grid_2x2_plus = __esmMin((() => { Grid2x2Plus = [ ["path", { d: "M12 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3" }], ["path", { d: "M16 19h6" }], ["path", { d: "M19 22v-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/grid-2x2-x.js var Grid2x2X; var init_grid_2x2_x = __esmMin((() => { Grid2x2X = [ ["path", { d: "M12 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3" }], ["path", { d: "m16 16 5 5" }], ["path", { d: "m16 21 5-5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/grid-2x2.js var Grid2x2; var init_grid_2x2 = __esmMin((() => { Grid2x2 = [ ["path", { d: "M12 3v18" }], ["path", { d: "M3 12h18" }], ["rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/grid-3x2.js var Grid3x2; var init_grid_3x2 = __esmMin((() => { Grid3x2 = [ ["path", { d: "M15 3v18" }], ["path", { d: "M3 12h18" }], ["path", { d: "M9 3v18" }], ["rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/grid-3x3.js var Grid3x3; var init_grid_3x3 = __esmMin((() => { Grid3x3 = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M3 9h18" }], ["path", { d: "M3 15h18" }], ["path", { d: "M9 3v18" }], ["path", { d: "M15 3v18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/grip-horizontal.js var GripHorizontal; var init_grip_horizontal = __esmMin((() => { GripHorizontal = [ ["circle", { cx: "12", cy: "9", r: "1" }], ["circle", { cx: "19", cy: "9", r: "1" }], ["circle", { cx: "5", cy: "9", r: "1" }], ["circle", { cx: "12", cy: "15", r: "1" }], ["circle", { cx: "19", cy: "15", r: "1" }], ["circle", { cx: "5", cy: "15", r: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/grip-vertical.js var GripVertical; var init_grip_vertical = __esmMin((() => { GripVertical = [ ["circle", { cx: "9", cy: "12", r: "1" }], ["circle", { cx: "9", cy: "5", r: "1" }], ["circle", { cx: "9", cy: "19", r: "1" }], ["circle", { cx: "15", cy: "12", r: "1" }], ["circle", { cx: "15", cy: "5", r: "1" }], ["circle", { cx: "15", cy: "19", r: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/grip.js var Grip; var init_grip = __esmMin((() => { Grip = [ ["circle", { cx: "12", cy: "5", r: "1" }], ["circle", { cx: "19", cy: "5", r: "1" }], ["circle", { cx: "5", cy: "5", r: "1" }], ["circle", { cx: "12", cy: "12", r: "1" }], ["circle", { cx: "19", cy: "12", r: "1" }], ["circle", { cx: "5", cy: "12", r: "1" }], ["circle", { cx: "12", cy: "19", r: "1" }], ["circle", { cx: "19", cy: "19", r: "1" }], ["circle", { cx: "5", cy: "19", r: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/group.js var Group; var init_group = __esmMin((() => { Group = [ ["path", { d: "M3 7V5c0-1.1.9-2 2-2h2" }], ["path", { d: "M17 3h2c1.1 0 2 .9 2 2v2" }], ["path", { d: "M21 17v2c0 1.1-.9 2-2 2h-2" }], ["path", { d: "M7 21H5c-1.1 0-2-.9-2-2v-2" }], ["rect", { width: "7", height: "5", x: "7", y: "7", rx: "1" }], ["rect", { width: "7", height: "5", x: "10", y: "12", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/guitar.js var Guitar; var init_guitar = __esmMin((() => { Guitar = [ ["path", { d: "m11.9 12.1 4.514-4.514" }], ["path", { d: "M20.1 2.3a1 1 0 0 0-1.4 0l-1.114 1.114A2 2 0 0 0 17 4.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 17.828 7h1.344a2 2 0 0 0 1.414-.586L21.7 5.3a1 1 0 0 0 0-1.4z" }], ["path", { d: "m6 16 2 2" }], ["path", { d: "M8.23 9.85A3 3 0 0 1 11 8a5 5 0 0 1 5 5 3 3 0 0 1-1.85 2.77l-.92.38A2 2 0 0 0 12 18a4 4 0 0 1-4 4 6 6 0 0 1-6-6 4 4 0 0 1 4-4 2 2 0 0 0 1.85-1.23z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ham.js var Ham; var init_ham = __esmMin((() => { Ham = [ ["path", { d: "M13.144 21.144A7.274 10.445 45 1 0 2.856 10.856" }], ["path", { d: "M13.144 21.144A7.274 4.365 45 0 0 2.856 10.856a7.274 4.365 45 0 0 10.288 10.288" }], ["path", { d: "M16.565 10.435 18.6 8.4a2.501 2.501 0 1 0 1.65-4.65 2.5 2.5 0 1 0-4.66 1.66l-2.024 2.025" }], ["path", { d: "m8.5 16.5-1-1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hamburger.js var Hamburger; var init_hamburger = __esmMin((() => { Hamburger = [ ["path", { d: "M12 16H4a2 2 0 1 1 0-4h16a2 2 0 1 1 0 4h-4.25" }], ["path", { d: "M5 12a2 2 0 0 1-2-2 9 7 0 0 1 18 0 2 2 0 0 1-2 2" }], ["path", { d: "M5 16a2 2 0 0 0-2 2 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 2 2 0 0 0-2-2q0 0 0 0" }], ["path", { d: "m6.67 12 6.13 4.6a2 2 0 0 0 2.8-.4l3.15-4.2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hammer.js var Hammer; var init_hammer = __esmMin((() => { Hammer = [ ["path", { d: "m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9" }], ["path", { d: "m18 15 4-4" }], ["path", { d: "m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hand-fist.js var HandFist; var init_hand_fist = __esmMin((() => { HandFist = [ ["path", { d: "M12.035 17.012a3 3 0 0 0-3-3l-.311-.002a.72.72 0 0 1-.505-1.229l1.195-1.195A2 2 0 0 1 10.828 11H12a2 2 0 0 0 0-4H9.243a3 3 0 0 0-2.122.879l-2.707 2.707A4.83 4.83 0 0 0 3 14a8 8 0 0 0 8 8h2a8 8 0 0 0 8-8V7a2 2 0 1 0-4 0v2a2 2 0 1 0 4 0" }], ["path", { d: "M13.888 9.662A2 2 0 0 0 17 8V5A2 2 0 1 0 13 5" }], ["path", { d: "M9 5A2 2 0 1 0 5 5V10" }], ["path", { d: "M9 7V4A2 2 0 1 1 13 4V7.268" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hand-coins.js var HandCoins; var init_hand_coins = __esmMin((() => { HandCoins = [ ["path", { d: "M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17" }], ["path", { d: "m7 21 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9" }], ["path", { d: "m2 16 6 6" }], ["circle", { cx: "16", cy: "9", r: "2.9" }], ["circle", { cx: "6", cy: "5", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hand-grab.js var HandGrab; var init_hand_grab = __esmMin((() => { HandGrab = [ ["path", { d: "M18 11.5V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1.4" }], ["path", { d: "M14 10V8a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" }], ["path", { d: "M10 9.9V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v5" }], ["path", { d: "M6 14a2 2 0 0 0-2-2a2 2 0 0 0-2 2" }], ["path", { d: "M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-4a8 8 0 0 1-8-8 2 2 0 1 1 4 0" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hand-heart.js var HandHeart; var init_hand_heart = __esmMin((() => { HandHeart = [ ["path", { d: "M11 14h2a2 2 0 0 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 16" }], ["path", { d: "m14.45 13.39 5.05-4.694C20.196 8 21 6.85 21 5.75a2.75 2.75 0 0 0-4.797-1.837.276.276 0 0 1-.406 0A2.75 2.75 0 0 0 11 5.75c0 1.2.802 2.248 1.5 2.946L16 11.95" }], ["path", { d: "m2 15 6 6" }], ["path", { d: "m7 20 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a1 1 0 0 0-2.75-2.91" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hand-helping.js var HandHelping; var init_hand_helping = __esmMin((() => { HandHelping = [ ["path", { d: "M11 12h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 14" }], ["path", { d: "m7 18 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9" }], ["path", { d: "m2 13 6 6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hand-metal.js var HandMetal; var init_hand_metal = __esmMin((() => { HandMetal = [ ["path", { d: "M18 12.5V10a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1.4" }], ["path", { d: "M14 11V9a2 2 0 1 0-4 0v2" }], ["path", { d: "M10 10.5V5a2 2 0 1 0-4 0v9" }], ["path", { d: "m7 15-1.76-1.76a2 2 0 0 0-2.83 2.82l3.6 3.6C7.5 21.14 9.2 22 12 22h2a8 8 0 0 0 8-8V7a2 2 0 1 0-4 0v5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hand-platter.js var HandPlatter; var init_hand_platter = __esmMin((() => { HandPlatter = [ ["path", { d: "M12 3V2" }], ["path", { d: "m15.4 17.4 3.2-2.8a2 2 0 1 1 2.8 2.9l-3.6 3.3c-.7.8-1.7 1.2-2.8 1.2h-4c-1.1 0-2.1-.4-2.8-1.2l-1.302-1.464A1 1 0 0 0 6.151 19H5" }], ["path", { d: "M2 14h12a2 2 0 0 1 0 4h-2" }], ["path", { d: "M4 10h16" }], ["path", { d: "M5 10a7 7 0 0 1 14 0" }], ["path", { d: "M5 14v6a1 1 0 0 1-1 1H2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hand.js var Hand; var init_hand = __esmMin((() => { Hand = [ ["path", { d: "M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2" }], ["path", { d: "M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" }], ["path", { d: "M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8" }], ["path", { d: "M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/handbag.js var Handbag; var init_handbag = __esmMin((() => { Handbag = [["path", { d: "M2.048 18.566A2 2 0 0 0 4 21h16a2 2 0 0 0 1.952-2.434l-2-9A2 2 0 0 0 18 8H6a2 2 0 0 0-1.952 1.566z" }], ["path", { d: "M8 11V6a4 4 0 0 1 8 0v5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/handshake.js var Handshake; var init_handshake = __esmMin((() => { Handshake = [ ["path", { d: "m11 17 2 2a1 1 0 1 0 3-3" }], ["path", { d: "m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4" }], ["path", { d: "m21 3 1 11h-2" }], ["path", { d: "M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3" }], ["path", { d: "M3 4h8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hard-drive-download.js var HardDriveDownload; var init_hard_drive_download = __esmMin((() => { HardDriveDownload = [ ["path", { d: "M12 2v8" }], ["path", { d: "m16 6-4 4-4-4" }], ["rect", { width: "20", height: "8", x: "2", y: "14", rx: "2" }], ["path", { d: "M6 18h.01" }], ["path", { d: "M10 18h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hard-drive-upload.js var HardDriveUpload; var init_hard_drive_upload = __esmMin((() => { HardDriveUpload = [ ["path", { d: "m16 6-4-4-4 4" }], ["path", { d: "M12 2v8" }], ["rect", { width: "20", height: "8", x: "2", y: "14", rx: "2" }], ["path", { d: "M6 18h.01" }], ["path", { d: "M10 18h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hard-drive.js var HardDrive; var init_hard_drive = __esmMin((() => { HardDrive = [ ["line", { x1: "22", x2: "2", y1: "12", y2: "12" }], ["path", { d: "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" }], ["line", { x1: "6", x2: "6.01", y1: "16", y2: "16" }], ["line", { x1: "10", x2: "10.01", y1: "16", y2: "16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hard-hat.js var HardHat; var init_hard_hat = __esmMin((() => { HardHat = [ ["path", { d: "M10 10V5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v5" }], ["path", { d: "M14 6a6 6 0 0 1 6 6v3" }], ["path", { d: "M4 15v-3a6 6 0 0 1 6-6" }], ["rect", { x: "2", y: "15", width: "20", height: "4", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hash.js var Hash; var init_hash = __esmMin((() => { Hash = [ ["line", { x1: "4", x2: "20", y1: "9", y2: "9" }], ["line", { x1: "4", x2: "20", y1: "15", y2: "15" }], ["line", { x1: "10", x2: "8", y1: "3", y2: "21" }], ["line", { x1: "16", x2: "14", y1: "3", y2: "21" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hat-glasses.js var HatGlasses; var init_hat_glasses = __esmMin((() => { HatGlasses = [ ["path", { d: "M14 18a2 2 0 0 0-4 0" }], ["path", { d: "m19 11-2.11-6.657a2 2 0 0 0-2.752-1.148l-1.276.61A2 2 0 0 1 12 4H8.5a2 2 0 0 0-1.925 1.456L5 11" }], ["path", { d: "M2 11h20" }], ["circle", { cx: "17", cy: "18", r: "3" }], ["circle", { cx: "7", cy: "18", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hdmi-port.js var HdmiPort; var init_hdmi_port = __esmMin((() => { HdmiPort = [["path", { d: "M22 9a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h1l2 2h12l2-2h1a1 1 0 0 0 1-1Z" }], ["path", { d: "M7.5 12h9" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/haze.js var Haze; var init_haze = __esmMin((() => { Haze = [ ["path", { d: "m5.2 6.2 1.4 1.4" }], ["path", { d: "M2 13h2" }], ["path", { d: "M20 13h2" }], ["path", { d: "m17.4 7.6 1.4-1.4" }], ["path", { d: "M22 17H2" }], ["path", { d: "M22 21H2" }], ["path", { d: "M16 13a4 4 0 0 0-8 0" }], ["path", { d: "M12 5V2.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/heading-1.js var Heading1; var init_heading_1 = __esmMin((() => { Heading1 = [ ["path", { d: "M4 12h8" }], ["path", { d: "M4 18V6" }], ["path", { d: "M12 18V6" }], ["path", { d: "m17 12 3-2v8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/heading-2.js var Heading2; var init_heading_2 = __esmMin((() => { Heading2 = [ ["path", { d: "M4 12h8" }], ["path", { d: "M4 18V6" }], ["path", { d: "M12 18V6" }], ["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/heading-3.js var Heading3; var init_heading_3 = __esmMin((() => { Heading3 = [ ["path", { d: "M4 12h8" }], ["path", { d: "M4 18V6" }], ["path", { d: "M12 18V6" }], ["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2" }], ["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/heading-4.js var Heading4; var init_heading_4 = __esmMin((() => { Heading4 = [ ["path", { d: "M12 18V6" }], ["path", { d: "M17 10v3a1 1 0 0 0 1 1h3" }], ["path", { d: "M21 10v8" }], ["path", { d: "M4 12h8" }], ["path", { d: "M4 18V6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/heading-6.js var Heading6; var init_heading_6 = __esmMin((() => { Heading6 = [ ["path", { d: "M4 12h8" }], ["path", { d: "M4 18V6" }], ["path", { d: "M12 18V6" }], ["circle", { cx: "19", cy: "16", r: "2" }], ["path", { d: "M20 10c-2 2-3 3.5-3 6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/heading-5.js var Heading5; var init_heading_5 = __esmMin((() => { Heading5 = [ ["path", { d: "M4 12h8" }], ["path", { d: "M4 18V6" }], ["path", { d: "M12 18V6" }], ["path", { d: "M17 13v-3h4" }], ["path", { d: "M17 17.7c.4.2.8.3 1.3.3 1.5 0 2.7-1.1 2.7-2.5S19.8 13 18.3 13H17" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/heading.js var Heading; var init_heading = __esmMin((() => { Heading = [ ["path", { d: "M6 12h12" }], ["path", { d: "M6 20V4" }], ["path", { d: "M18 20V4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/headphone-off.js var HeadphoneOff; var init_headphone_off = __esmMin((() => { HeadphoneOff = [ ["path", { d: "M21 14h-1.343" }], ["path", { d: "M9.128 3.47A9 9 0 0 1 21 12v3.343" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M20.414 20.414A2 2 0 0 1 19 21h-1a2 2 0 0 1-2-2v-3" }], ["path", { d: "M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 2.636-6.364" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/headphones.js var Headphones; var init_headphones = __esmMin((() => { Headphones = [["path", { d: "M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/headset.js var Headset; var init_headset = __esmMin((() => { Headset = [["path", { d: "M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z" }], ["path", { d: "M21 16v2a4 4 0 0 1-4 4h-5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/heart-crack.js var HeartCrack; var init_heart_crack = __esmMin((() => { HeartCrack = [["path", { d: "M12.409 5.824c-.702.792-1.15 1.496-1.415 2.166l2.153 2.156a.5.5 0 0 1 0 .707l-2.293 2.293a.5.5 0 0 0 0 .707L12 15" }], ["path", { d: "M13.508 20.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5a5.5 5.5 0 0 1 9.591-3.677.6.6 0 0 0 .818.001A5.5 5.5 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/heart-handshake.js var HeartHandshake; var init_heart_handshake = __esmMin((() => { HeartHandshake = [["path", { d: "M19.414 14.414C21 12.828 22 11.5 22 9.5a5.5 5.5 0 0 0-9.591-3.676.6.6 0 0 1-.818.001A5.5 5.5 0 0 0 2 9.5c0 2.3 1.5 4 3 5.5l5.535 5.362a2 2 0 0 0 2.879.052 2.12 2.12 0 0 0-.004-3 2.124 2.124 0 1 0 3-3 2.124 2.124 0 0 0 3.004 0 2 2 0 0 0 0-2.828l-1.881-1.882a2.41 2.41 0 0 0-3.409 0l-1.71 1.71a2 2 0 0 1-2.828 0 2 2 0 0 1 0-2.828l2.823-2.762" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/heart-minus.js var HeartMinus; var init_heart_minus = __esmMin((() => { HeartMinus = [["path", { d: "m14.876 18.99-1.368 1.323a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5a5.2 5.2 0 0 1-.244 1.572" }], ["path", { d: "M15 15h6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/heart-off.js var HeartOff; var init_heart_off = __esmMin((() => { HeartOff = [ ["path", { d: "M10.5 4.893a5.5 5.5 0 0 1 1.091.931.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 1.872-1.002 3.356-2.187 4.655" }], ["path", { d: "m16.967 16.967-3.459 3.346a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5a5.5 5.5 0 0 1 2.747-4.761" }], ["path", { d: "m2 2 20 20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/heart-plus.js var HeartPlus; var init_heart_plus = __esmMin((() => { HeartPlus = [ ["path", { d: "m14.479 19.374-.971.939a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5a5.2 5.2 0 0 1-.219 1.49" }], ["path", { d: "M15 15h6" }], ["path", { d: "M18 12v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/heart-pulse.js var HeartPulse; var init_heart_pulse = __esmMin((() => { HeartPulse = [["path", { d: "M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5" }], ["path", { d: "M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/heart.js var Heart; var init_heart = __esmMin((() => { Heart = [["path", { d: "M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/heater.js var Heater; var init_heater = __esmMin((() => { Heater = [ ["path", { d: "M11 8c2-3-2-3 0-6" }], ["path", { d: "M15.5 8c2-3-2-3 0-6" }], ["path", { d: "M6 10h.01" }], ["path", { d: "M6 14h.01" }], ["path", { d: "M10 16v-4" }], ["path", { d: "M14 16v-4" }], ["path", { d: "M18 16v-4" }], ["path", { d: "M20 6a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3" }], ["path", { d: "M5 20v2" }], ["path", { d: "M19 20v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/helicopter.js var Helicopter; var init_helicopter = __esmMin((() => { Helicopter = [ ["path", { d: "M11 17v4" }], ["path", { d: "M14 3v8a2 2 0 0 0 2 2h5.865" }], ["path", { d: "M17 17v4" }], ["path", { d: "M18 17a4 4 0 0 0 4-4 8 6 0 0 0-8-6 6 5 0 0 0-6 5v3a2 2 0 0 0 2 2z" }], ["path", { d: "M2 10v5" }], ["path", { d: "M6 3h16" }], ["path", { d: "M7 21h14" }], ["path", { d: "M8 13H2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hexagon.js var Hexagon; var init_hexagon = __esmMin((() => { Hexagon = [["path", { d: "M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/highlighter.js var Highlighter; var init_highlighter = __esmMin((() => { Highlighter = [["path", { d: "m9 11-6 6v3h9l3-3" }], ["path", { d: "m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/history.js var History; var init_history = __esmMin((() => { History = [ ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }], ["path", { d: "M3 3v5h5" }], ["path", { d: "M12 7v5l4 2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hop-off.js var HopOff; var init_hop_off = __esmMin((() => { HopOff = [ ["path", { d: "M10.82 16.12c1.69.6 3.91.79 5.18.85.28.01.53-.09.7-.27" }], ["path", { d: "M11.14 20.57c.52.24 2.44 1.12 4.08 1.37.46.06.86-.25.9-.71.12-1.52-.3-3.43-.5-4.28" }], ["path", { d: "M16.13 21.05c1.65.63 3.68.84 4.87.91a.9.9 0 0 0 .7-.26" }], ["path", { d: "M17.99 5.52a20.83 20.83 0 0 1 3.15 4.5.8.8 0 0 1-.68 1.13c-1.17.1-2.5.02-3.9-.25" }], ["path", { d: "M20.57 11.14c.24.52 1.12 2.44 1.37 4.08.04.3-.08.59-.31.75" }], ["path", { d: "M4.93 4.93a10 10 0 0 0-.67 13.4c.35.43.96.4 1.17-.12.69-1.71 1.07-5.07 1.07-6.71 1.34.45 3.1.9 4.88.62a.85.85 0 0 0 .48-.24" }], ["path", { d: "M5.52 17.99c1.05.95 2.91 2.42 4.5 3.15a.8.8 0 0 0 1.13-.68c.2-2.34-.33-5.3-1.57-8.28" }], ["path", { d: "M8.35 2.68a10 10 0 0 1 9.98 1.58c.43.35.4.96-.12 1.17-1.5.6-4.3.98-6.07 1.05" }], ["path", { d: "m2 2 20 20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hop.js var Hop; var init_hop = __esmMin((() => { Hop = [ ["path", { d: "M10.82 16.12c1.69.6 3.91.79 5.18.85.55.03 1-.42.97-.97-.06-1.27-.26-3.5-.85-5.18" }], ["path", { d: "M11.5 6.5c1.64 0 5-.38 6.71-1.07.52-.2.55-.82.12-1.17A10 10 0 0 0 4.26 18.33c.35.43.96.4 1.17-.12.69-1.71 1.07-5.07 1.07-6.71 1.34.45 3.1.9 4.88.62a.88.88 0 0 0 .73-.74c.3-2.14-.15-3.5-.61-4.88" }], ["path", { d: "M15.62 16.95c.2.85.62 2.76.5 4.28a.77.77 0 0 1-.9.7 16.64 16.64 0 0 1-4.08-1.36" }], ["path", { d: "M16.13 21.05c1.65.63 3.68.84 4.87.91a.9.9 0 0 0 .96-.96 17.68 17.68 0 0 0-.9-4.87" }], ["path", { d: "M16.94 15.62c.86.2 2.77.62 4.29.5a.77.77 0 0 0 .7-.9 16.64 16.64 0 0 0-1.36-4.08" }], ["path", { d: "M17.99 5.52a20.82 20.82 0 0 1 3.15 4.5.8.8 0 0 1-.68 1.13c-2.33.2-5.3-.32-8.27-1.57" }], ["path", { d: "M4.93 4.93 3 3a.7.7 0 0 1 0-1" }], ["path", { d: "M9.58 12.18c1.24 2.98 1.77 5.95 1.57 8.28a.8.8 0 0 1-1.13.68 20.82 20.82 0 0 1-4.5-3.15" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hospital.js var Hospital; var init_hospital = __esmMin((() => { Hospital = [ ["path", { d: "M12 7v4" }], ["path", { d: "M14 21v-3a2 2 0 0 0-4 0v3" }], ["path", { d: "M14 9h-4" }], ["path", { d: "M18 11h2a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-9a2 2 0 0 1 2-2h2" }], ["path", { d: "M18 21V5a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hotel.js var Hotel; var init_hotel = __esmMin((() => { Hotel = [ ["path", { d: "M10 22v-6.57" }], ["path", { d: "M12 11h.01" }], ["path", { d: "M12 7h.01" }], ["path", { d: "M14 15.43V22" }], ["path", { d: "M15 16a5 5 0 0 0-6 0" }], ["path", { d: "M16 11h.01" }], ["path", { d: "M16 7h.01" }], ["path", { d: "M8 11h.01" }], ["path", { d: "M8 7h.01" }], ["rect", { x: "4", y: "2", width: "16", height: "20", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/hourglass.js var Hourglass; var init_hourglass = __esmMin((() => { Hourglass = [ ["path", { d: "M5 22h14" }], ["path", { d: "M5 2h14" }], ["path", { d: "M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22" }], ["path", { d: "M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/house-plug.js var HousePlug; var init_house_plug = __esmMin((() => { HousePlug = [ ["path", { d: "M10 12V8.964" }], ["path", { d: "M14 12V8.964" }], ["path", { d: "M15 12a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2v-2a1 1 0 0 1 1-1z" }], ["path", { d: "M8.5 21H5a2 2 0 0 1-2-2v-9a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2v-2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/house-heart.js var HouseHeart; var init_house_heart = __esmMin((() => { HouseHeart = [["path", { d: "M8.62 13.8A2.25 2.25 0 1 1 12 10.836a2.25 2.25 0 1 1 3.38 2.966l-2.626 2.856a.998.998 0 0 1-1.507 0z" }], ["path", { d: "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/house-plus.js var HousePlus; var init_house_plus = __esmMin((() => { HousePlus = [ ["path", { d: "M12.35 21H5a2 2 0 0 1-2-2v-9a2 2 0 0 1 .71-1.53l7-6a2 2 0 0 1 2.58 0l7 6A2 2 0 0 1 21 10v2.35" }], ["path", { d: "M14.8 12.4A1 1 0 0 0 14 12h-4a1 1 0 0 0-1 1v8" }], ["path", { d: "M15 18h6" }], ["path", { d: "M18 15v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/house-wifi.js var HouseWifi; var init_house_wifi = __esmMin((() => { HouseWifi = [ ["path", { d: "M9.5 13.866a4 4 0 0 1 5 .01" }], ["path", { d: "M12 17h.01" }], ["path", { d: "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }], ["path", { d: "M7 10.754a8 8 0 0 1 10 0" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/house.js var House; var init_house = __esmMin((() => { House = [["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" }], ["path", { d: "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ice-cream-bowl.js var IceCreamBowl; var init_ice_cream_bowl = __esmMin((() => { IceCreamBowl = [ ["path", { d: "M12 17c5 0 8-2.69 8-6H4c0 3.31 3 6 8 6m-4 4h8m-4-3v3M5.14 11a3.5 3.5 0 1 1 6.71 0" }], ["path", { d: "M12.14 11a3.5 3.5 0 1 1 6.71 0" }], ["path", { d: "M15.5 6.5a3.5 3.5 0 1 0-7 0" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ice-cream-cone.js var IceCreamCone; var init_ice_cream_cone = __esmMin((() => { IceCreamCone = [ ["path", { d: "m7 11 4.08 10.35a1 1 0 0 0 1.84 0L17 11" }], ["path", { d: "M17 7A5 5 0 0 0 7 7" }], ["path", { d: "M17 7a2 2 0 0 1 0 4H7a2 2 0 0 1 0-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/id-card-lanyard.js var IdCardLanyard; var init_id_card_lanyard = __esmMin((() => { IdCardLanyard = [ ["path", { d: "M13.5 8h-3" }], ["path", { d: "m15 2-1 2h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h3" }], ["path", { d: "M16.899 22A5 5 0 0 0 7.1 22" }], ["path", { d: "m9 2 3 6" }], ["circle", { cx: "12", cy: "15", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/id-card.js var IdCard; var init_id_card = __esmMin((() => { IdCard = [ ["path", { d: "M16 10h2" }], ["path", { d: "M16 14h2" }], ["path", { d: "M6.17 15a3 3 0 0 1 5.66 0" }], ["circle", { cx: "9", cy: "11", r: "2" }], ["rect", { x: "2", y: "5", width: "20", height: "14", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/image-down.js var ImageDown; var init_image_down = __esmMin((() => { ImageDown = [ ["path", { d: "M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21" }], ["path", { d: "m14 19 3 3v-5.5" }], ["path", { d: "m17 22 3-3" }], ["circle", { cx: "9", cy: "9", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/image-minus.js var ImageMinus; var init_image_minus = __esmMin((() => { ImageMinus = [ ["path", { d: "M21 9v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7" }], ["line", { x1: "16", x2: "22", y1: "5", y2: "5" }], ["circle", { cx: "9", cy: "9", r: "2" }], ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/image-off.js var ImageOff; var init_image_off = __esmMin((() => { ImageOff = [ ["line", { x1: "2", x2: "22", y1: "2", y2: "22" }], ["path", { d: "M10.41 10.41a2 2 0 1 1-2.83-2.83" }], ["line", { x1: "13.5", x2: "6", y1: "13.5", y2: "21" }], ["line", { x1: "18", x2: "21", y1: "12", y2: "15" }], ["path", { d: "M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59" }], ["path", { d: "M21 15V5a2 2 0 0 0-2-2H9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/image-play.js var ImagePlay; var init_image_play = __esmMin((() => { ImagePlay = [ ["path", { d: "M15 15.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997a1 1 0 0 1-1.517-.86z" }], ["path", { d: "M21 12.17V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6" }], ["path", { d: "m6 21 5-5" }], ["circle", { cx: "9", cy: "9", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/image-plus.js var ImagePlus; var init_image_plus = __esmMin((() => { ImagePlus = [ ["path", { d: "M16 5h6" }], ["path", { d: "M19 2v6" }], ["path", { d: "M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5" }], ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }], ["circle", { cx: "9", cy: "9", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/image-up.js var ImageUp; var init_image_up = __esmMin((() => { ImageUp = [ ["path", { d: "M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21" }], ["path", { d: "m14 19.5 3-3 3 3" }], ["path", { d: "M17 22v-5.5" }], ["circle", { cx: "9", cy: "9", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/image-upscale.js var ImageUpscale; var init_image_upscale = __esmMin((() => { ImageUpscale = [ ["path", { d: "M16 3h5v5" }], ["path", { d: "M17 21h2a2 2 0 0 0 2-2" }], ["path", { d: "M21 12v3" }], ["path", { d: "m21 3-5 5" }], ["path", { d: "M3 7V5a2 2 0 0 1 2-2" }], ["path", { d: "m5 21 4.144-4.144a1.21 1.21 0 0 1 1.712 0L13 19" }], ["path", { d: "M9 3h3" }], ["rect", { x: "3", y: "11", width: "10", height: "10", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/image.js var Image$1; var init_image = __esmMin((() => { Image$1 = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }], ["circle", { cx: "9", cy: "9", r: "2" }], ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/images.js var Images; var init_images = __esmMin((() => { Images = [ ["path", { d: "m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16" }], ["path", { d: "M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2" }], ["circle", { cx: "13", cy: "7", r: "1", fill: "currentColor" }], ["rect", { x: "8", y: "2", width: "14", height: "14", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/import.js var Import; var init_import = __esmMin((() => { Import = [ ["path", { d: "M12 3v12" }], ["path", { d: "m8 11 4 4 4-4" }], ["path", { d: "M8 5H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/inbox.js var Inbox; var init_inbox = __esmMin((() => { Inbox = [["polyline", { points: "22 12 16 12 14 15 10 15 8 12 2 12" }], ["path", { d: "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/indian-rupee.js var IndianRupee; var init_indian_rupee = __esmMin((() => { IndianRupee = [ ["path", { d: "M6 3h12" }], ["path", { d: "M6 8h12" }], ["path", { d: "m6 13 8.5 8" }], ["path", { d: "M6 13h3" }], ["path", { d: "M9 13c6.667 0 6.667-10 0-10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/infinity.js var Infinity$1; var init_infinity = __esmMin((() => { Infinity$1 = [["path", { d: "M6 16c5 0 7-8 12-8a4 4 0 0 1 0 8c-5 0-7-8-12-8a4 4 0 1 0 0 8" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/info.js var Info; var init_info = __esmMin((() => { Info = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M12 16v-4" }], ["path", { d: "M12 8h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/inspection-panel.js var InspectionPanel; var init_inspection_panel = __esmMin((() => { InspectionPanel = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M7 7h.01" }], ["path", { d: "M17 7h.01" }], ["path", { d: "M7 17h.01" }], ["path", { d: "M17 17h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/instagram.js var Instagram; var init_instagram = __esmMin((() => { Instagram = [ ["rect", { width: "20", height: "20", x: "2", y: "2", rx: "5", ry: "5" }], ["path", { d: "M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z" }], ["line", { x1: "17.5", x2: "17.51", y1: "6.5", y2: "6.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/italic.js var Italic; var init_italic = __esmMin((() => { Italic = [ ["line", { x1: "19", x2: "10", y1: "4", y2: "4" }], ["line", { x1: "14", x2: "5", y1: "20", y2: "20" }], ["line", { x1: "15", x2: "9", y1: "4", y2: "20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/iteration-ccw.js var IterationCcw; var init_iteration_ccw = __esmMin((() => { IterationCcw = [["path", { d: "m16 14 4 4-4 4" }], ["path", { d: "M20 10a8 8 0 1 0-8 8h8" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/iteration-cw.js var IterationCw; var init_iteration_cw = __esmMin((() => { IterationCw = [["path", { d: "M4 10a8 8 0 1 1 8 8H4" }], ["path", { d: "m8 22-4-4 4-4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/japanese-yen.js var JapaneseYen; var init_japanese_yen = __esmMin((() => { JapaneseYen = [ ["path", { d: "M12 9.5V21m0-11.5L6 3m6 6.5L18 3" }], ["path", { d: "M6 15h12" }], ["path", { d: "M6 11h12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/joystick.js var Joystick; var init_joystick = __esmMin((() => { Joystick = [ ["path", { d: "M21 17a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-2Z" }], ["path", { d: "M6 15v-2" }], ["path", { d: "M12 15V9" }], ["circle", { cx: "12", cy: "6", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/kanban.js var Kanban; var init_kanban = __esmMin((() => { Kanban = [ ["path", { d: "M5 3v14" }], ["path", { d: "M12 3v8" }], ["path", { d: "M19 3v18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/kayak.js var Kayak; var init_kayak = __esmMin((() => { Kayak = [ ["path", { d: "M18 17a1 1 0 0 0-1 1v1a2 2 0 1 0 2-2z" }], ["path", { d: "M20.97 3.61a.45.45 0 0 0-.58-.58C10.2 6.6 6.6 10.2 3.03 20.39a.45.45 0 0 0 .58.58C13.8 17.4 17.4 13.8 20.97 3.61" }], ["path", { d: "m6.707 6.707 10.586 10.586" }], ["path", { d: "M7 5a2 2 0 1 0-2 2h1a1 1 0 0 0 1-1z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/key-round.js var KeyRound; var init_key_round = __esmMin((() => { KeyRound = [["path", { d: "M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z" }], ["circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/key-square.js var KeySquare; var init_key_square = __esmMin((() => { KeySquare = [ ["path", { d: "M12.4 2.7a2.5 2.5 0 0 1 3.4 0l5.5 5.5a2.5 2.5 0 0 1 0 3.4l-3.7 3.7a2.5 2.5 0 0 1-3.4 0L8.7 9.8a2.5 2.5 0 0 1 0-3.4z" }], ["path", { d: "m14 7 3 3" }], ["path", { d: "m9.4 10.6-6.814 6.814A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/key.js var Key; var init_key = __esmMin((() => { Key = [ ["path", { d: "m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4" }], ["path", { d: "m21 2-9.6 9.6" }], ["circle", { cx: "7.5", cy: "15.5", r: "5.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/keyboard-music.js var KeyboardMusic; var init_keyboard_music = __esmMin((() => { KeyboardMusic = [ ["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2" }], ["path", { d: "M6 8h4" }], ["path", { d: "M14 8h.01" }], ["path", { d: "M18 8h.01" }], ["path", { d: "M2 12h20" }], ["path", { d: "M6 12v4" }], ["path", { d: "M10 12v4" }], ["path", { d: "M14 12v4" }], ["path", { d: "M18 12v4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/keyboard-off.js var KeyboardOff; var init_keyboard_off = __esmMin((() => { KeyboardOff = [ ["path", { d: "M 20 4 A2 2 0 0 1 22 6" }], ["path", { d: "M 22 6 L 22 16.41" }], ["path", { d: "M 7 16 L 16 16" }], ["path", { d: "M 9.69 4 L 20 4" }], ["path", { d: "M14 8h.01" }], ["path", { d: "M18 8h.01" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M20 20H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2" }], ["path", { d: "M6 8h.01" }], ["path", { d: "M8 12h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/keyboard.js var Keyboard; var init_keyboard = __esmMin((() => { Keyboard = [ ["path", { d: "M10 8h.01" }], ["path", { d: "M12 12h.01" }], ["path", { d: "M14 8h.01" }], ["path", { d: "M16 12h.01" }], ["path", { d: "M18 8h.01" }], ["path", { d: "M6 8h.01" }], ["path", { d: "M7 16h10" }], ["path", { d: "M8 12h.01" }], ["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/lamp-ceiling.js var LampCeiling; var init_lamp_ceiling = __esmMin((() => { LampCeiling = [ ["path", { d: "M12 2v5" }], ["path", { d: "M14.829 15.998a3 3 0 1 1-5.658 0" }], ["path", { d: "M20.92 14.606A1 1 0 0 1 20 16H4a1 1 0 0 1-.92-1.394l3-7A1 1 0 0 1 7 7h10a1 1 0 0 1 .92.606z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/lamp-desk.js var LampDesk; var init_lamp_desk = __esmMin((() => { LampDesk = [ ["path", { d: "M10.293 2.293a1 1 0 0 1 1.414 0l2.5 2.5 5.994 1.227a1 1 0 0 1 .506 1.687l-7 7a1 1 0 0 1-1.687-.506l-1.227-5.994-2.5-2.5a1 1 0 0 1 0-1.414z" }], ["path", { d: "m14.207 4.793-3.414 3.414" }], ["path", { d: "M3 20a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z" }], ["path", { d: "m9.086 6.5-4.793 4.793a1 1 0 0 0-.18 1.17L7 18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/lamp-floor.js var LampFloor; var init_lamp_floor = __esmMin((() => { LampFloor = [ ["path", { d: "M12 10v12" }], ["path", { d: "M17.929 7.629A1 1 0 0 1 17 9H7a1 1 0 0 1-.928-1.371l2-5A1 1 0 0 1 9 2h6a1 1 0 0 1 .928.629z" }], ["path", { d: "M9 22h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/lamp-wall-down.js var LampWallDown; var init_lamp_wall_down = __esmMin((() => { LampWallDown = [ ["path", { d: "M19.929 18.629A1 1 0 0 1 19 20H9a1 1 0 0 1-.928-1.371l2-5A1 1 0 0 1 11 13h6a1 1 0 0 1 .928.629z" }], ["path", { d: "M6 3a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z" }], ["path", { d: "M8 6h4a2 2 0 0 1 2 2v5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/lamp-wall-up.js var LampWallUp; var init_lamp_wall_up = __esmMin((() => { LampWallUp = [ ["path", { d: "M19.929 9.629A1 1 0 0 1 19 11H9a1 1 0 0 1-.928-1.371l2-5A1 1 0 0 1 11 4h6a1 1 0 0 1 .928.629z" }], ["path", { d: "M6 15a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1z" }], ["path", { d: "M8 18h4a2 2 0 0 0 2-2v-5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/land-plot.js var LandPlot; var init_land_plot = __esmMin((() => { LandPlot = [ ["path", { d: "m12 8 6-3-6-3v10" }], ["path", { d: "m8 11.99-5.5 3.14a1 1 0 0 0 0 1.74l8.5 4.86a2 2 0 0 0 2 0l8.5-4.86a1 1 0 0 0 0-1.74L16 12" }], ["path", { d: "m6.49 12.85 11.02 6.3" }], ["path", { d: "M17.51 12.85 6.5 19.15" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/lamp.js var Lamp; var init_lamp = __esmMin((() => { Lamp = [ ["path", { d: "M12 12v6" }], ["path", { d: "M4.077 10.615A1 1 0 0 0 5 12h14a1 1 0 0 0 .923-1.385l-3.077-7.384A2 2 0 0 0 15 2H9a2 2 0 0 0-1.846 1.23Z" }], ["path", { d: "M8 20a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/landmark.js var Landmark; var init_landmark = __esmMin((() => { Landmark = [ ["path", { d: "M10 18v-7" }], ["path", { d: "M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z" }], ["path", { d: "M14 18v-7" }], ["path", { d: "M18 18v-7" }], ["path", { d: "M3 22h18" }], ["path", { d: "M6 18v-7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/languages.js var Languages; var init_languages = __esmMin((() => { Languages = [ ["path", { d: "m5 8 6 6" }], ["path", { d: "m4 14 6-6 2-3" }], ["path", { d: "M2 5h12" }], ["path", { d: "M7 2h1" }], ["path", { d: "m22 22-5-10-5 10" }], ["path", { d: "M14 18h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/laptop-minimal-check.js var LaptopMinimalCheck; var init_laptop_minimal_check = __esmMin((() => { LaptopMinimalCheck = [ ["path", { d: "M2 20h20" }], ["path", { d: "m9 10 2 2 4-4" }], ["rect", { x: "3", y: "4", width: "18", height: "12", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/laptop-minimal.js var LaptopMinimal; var init_laptop_minimal = __esmMin((() => { LaptopMinimal = [["rect", { width: "18", height: "12", x: "3", y: "4", rx: "2", ry: "2" }], ["line", { x1: "2", x2: "22", y1: "20", y2: "20" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/laptop.js var Laptop; var init_laptop = __esmMin((() => { Laptop = [["path", { d: "M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z" }], ["path", { d: "M20.054 15.987H3.946" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/lasso.js var Lasso; var init_lasso = __esmMin((() => { Lasso = [ ["path", { d: "M3.704 14.467A10 8 0 0 1 2 10a10 8 0 0 1 20 0 10 8 0 0 1-10 8 10 8 0 0 1-5.181-1.158" }], ["path", { d: "M7 22a5 5 0 0 1-2-3.994" }], ["circle", { cx: "5", cy: "16", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/lasso-select.js var LassoSelect; var init_lasso_select = __esmMin((() => { LassoSelect = [ ["path", { d: "M7 22a5 5 0 0 1-2-4" }], ["path", { d: "M7 16.93c.96.43 1.96.74 2.99.91" }], ["path", { d: "M3.34 14A6.8 6.8 0 0 1 2 10c0-4.42 4.48-8 10-8s10 3.58 10 8a7.19 7.19 0 0 1-.33 2" }], ["path", { d: "M5 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z" }], ["path", { d: "M14.33 22h-.09a.35.35 0 0 1-.24-.32v-10a.34.34 0 0 1 .33-.34c.08 0 .15.03.21.08l7.34 6a.33.33 0 0 1-.21.59h-4.49l-2.57 3.85a.35.35 0 0 1-.28.14z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/laugh.js var Laugh; var init_laugh = __esmMin((() => { Laugh = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M18 13a6 6 0 0 1-6 5 6 6 0 0 1-6-5h12Z" }], ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9" }], ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/layers-2.js var Layers2; var init_layers_2 = __esmMin((() => { Layers2 = [["path", { d: "M13 13.74a2 2 0 0 1-2 0L2.5 8.87a1 1 0 0 1 0-1.74L11 2.26a2 2 0 0 1 2 0l8.5 4.87a1 1 0 0 1 0 1.74z" }], ["path", { d: "m20 14.285 1.5.845a1 1 0 0 1 0 1.74L13 21.74a2 2 0 0 1-2 0l-8.5-4.87a1 1 0 0 1 0-1.74l1.5-.845" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/layers.js var Layers; var init_layers = __esmMin((() => { Layers = [ ["path", { d: "M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z" }], ["path", { d: "M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12" }], ["path", { d: "M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/layout-dashboard.js var LayoutDashboard; var init_layout_dashboard = __esmMin((() => { LayoutDashboard = [ ["rect", { width: "7", height: "9", x: "3", y: "3", rx: "1" }], ["rect", { width: "7", height: "5", x: "14", y: "3", rx: "1" }], ["rect", { width: "7", height: "9", x: "14", y: "12", rx: "1" }], ["rect", { width: "7", height: "5", x: "3", y: "16", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/layout-grid.js var LayoutGrid; var init_layout_grid = __esmMin((() => { LayoutGrid = [ ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1" }], ["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1" }], ["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1" }], ["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/layout-list.js var LayoutList; var init_layout_list = __esmMin((() => { LayoutList = [ ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1" }], ["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1" }], ["path", { d: "M14 4h7" }], ["path", { d: "M14 9h7" }], ["path", { d: "M14 15h7" }], ["path", { d: "M14 20h7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/layout-panel-left.js var LayoutPanelLeft; var init_layout_panel_left = __esmMin((() => { LayoutPanelLeft = [ ["rect", { width: "7", height: "18", x: "3", y: "3", rx: "1" }], ["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1" }], ["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/layout-panel-top.js var LayoutPanelTop; var init_layout_panel_top = __esmMin((() => { LayoutPanelTop = [ ["rect", { width: "18", height: "7", x: "3", y: "3", rx: "1" }], ["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1" }], ["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/layout-template.js var LayoutTemplate; var init_layout_template = __esmMin((() => { LayoutTemplate = [ ["rect", { width: "18", height: "7", x: "3", y: "3", rx: "1" }], ["rect", { width: "9", height: "7", x: "3", y: "14", rx: "1" }], ["rect", { width: "5", height: "7", x: "16", y: "14", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/leaf.js var Leaf; var init_leaf = __esmMin((() => { Leaf = [["path", { d: "M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z" }], ["path", { d: "M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/leafy-green.js var LeafyGreen; var init_leafy_green = __esmMin((() => { LeafyGreen = [["path", { d: "M2 22c1.25-.987 2.27-1.975 3.9-2.2a5.56 5.56 0 0 1 3.8 1.5 4 4 0 0 0 6.187-2.353 3.5 3.5 0 0 0 3.69-5.116A3.5 3.5 0 0 0 20.95 8 3.5 3.5 0 1 0 16 3.05a3.5 3.5 0 0 0-5.831 1.373 3.5 3.5 0 0 0-5.116 3.69 4 4 0 0 0-2.348 6.155C3.499 15.42 4.409 16.712 4.2 18.1 3.926 19.743 3.014 20.732 2 22" }], ["path", { d: "M2 22 17 7" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/lectern.js var Lectern; var init_lectern = __esmMin((() => { Lectern = [ ["path", { d: "M16 12h3a2 2 0 0 0 1.902-1.38l1.056-3.333A1 1 0 0 0 21 6H3a1 1 0 0 0-.958 1.287l1.056 3.334A2 2 0 0 0 5 12h3" }], ["path", { d: "M18 6V3a1 1 0 0 0-1-1h-3" }], ["rect", { width: "8", height: "12", x: "8", y: "10", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/library-big.js var LibraryBig; var init_library_big = __esmMin((() => { LibraryBig = [ ["rect", { width: "8", height: "18", x: "3", y: "3", rx: "1" }], ["path", { d: "M7 3v18" }], ["path", { d: "M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/library.js var Library; var init_library = __esmMin((() => { Library = [ ["path", { d: "m16 6 4 14" }], ["path", { d: "M12 6v14" }], ["path", { d: "M8 8v12" }], ["path", { d: "M4 4v16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/life-buoy.js var LifeBuoy; var init_life_buoy = __esmMin((() => { LifeBuoy = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "m4.93 4.93 4.24 4.24" }], ["path", { d: "m14.83 9.17 4.24-4.24" }], ["path", { d: "m14.83 14.83 4.24 4.24" }], ["path", { d: "m9.17 14.83-4.24 4.24" }], ["circle", { cx: "12", cy: "12", r: "4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ligature.js var Ligature; var init_ligature = __esmMin((() => { Ligature = [ ["path", { d: "M14 12h2v8" }], ["path", { d: "M14 20h4" }], ["path", { d: "M6 12h4" }], ["path", { d: "M6 20h4" }], ["path", { d: "M8 20V8a4 4 0 0 1 7.464-2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/lightbulb-off.js var LightbulbOff; var init_lightbulb_off = __esmMin((() => { LightbulbOff = [ ["path", { d: "M16.8 11.2c.8-.9 1.2-2 1.2-3.2a6 6 0 0 0-9.3-5" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M6.3 6.3a4.67 4.67 0 0 0 1.2 5.2c.7.7 1.3 1.5 1.5 2.5" }], ["path", { d: "M9 18h6" }], ["path", { d: "M10 22h4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/lightbulb.js var Lightbulb; var init_lightbulb = __esmMin((() => { Lightbulb = [ ["path", { d: "M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5" }], ["path", { d: "M9 18h6" }], ["path", { d: "M10 22h4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/line-squiggle.js var LineSquiggle; var init_line_squiggle = __esmMin((() => { LineSquiggle = [["path", { d: "M7 3.5c5-2 7 2.5 3 4C1.5 10 2 15 5 16c5 2 9-10 14-7s.5 13.5-4 12c-5-2.5.5-11 6-2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/link-2-off.js var Link2Off; var init_link_2_off = __esmMin((() => { Link2Off = [ ["path", { d: "M9 17H7A5 5 0 0 1 7 7" }], ["path", { d: "M15 7h2a5 5 0 0 1 4 8" }], ["line", { x1: "8", x2: "12", y1: "12", y2: "12" }], ["line", { x1: "2", x2: "22", y1: "2", y2: "22" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/link-2.js var Link2; var init_link_2 = __esmMin((() => { Link2 = [ ["path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }], ["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }], ["line", { x1: "8", x2: "16", y1: "12", y2: "12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/link.js var Link; var init_link = __esmMin((() => { Link = [["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }], ["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/linkedin.js var Linkedin; var init_linkedin = __esmMin((() => { Linkedin = [ ["path", { d: "M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z" }], ["rect", { width: "4", height: "12", x: "2", y: "9" }], ["circle", { cx: "4", cy: "4", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-check.js var ListCheck; var init_list_check = __esmMin((() => { ListCheck = [ ["path", { d: "M16 5H3" }], ["path", { d: "M16 12H3" }], ["path", { d: "M11 19H3" }], ["path", { d: "m15 18 2 2 4-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-checks.js var ListChecks; var init_list_checks = __esmMin((() => { ListChecks = [ ["path", { d: "M13 5h8" }], ["path", { d: "M13 12h8" }], ["path", { d: "M13 19h8" }], ["path", { d: "m3 17 2 2 4-4" }], ["path", { d: "m3 7 2 2 4-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-chevrons-down-up.js var ListChevronsDownUp; var init_list_chevrons_down_up = __esmMin((() => { ListChevronsDownUp = [ ["path", { d: "M3 5h8" }], ["path", { d: "M3 12h8" }], ["path", { d: "M3 19h8" }], ["path", { d: "m15 5 3 3 3-3" }], ["path", { d: "m15 19 3-3 3 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-chevrons-up-down.js var ListChevronsUpDown; var init_list_chevrons_up_down = __esmMin((() => { ListChevronsUpDown = [ ["path", { d: "M3 5h8" }], ["path", { d: "M3 12h8" }], ["path", { d: "M3 19h8" }], ["path", { d: "m15 8 3-3 3 3" }], ["path", { d: "m15 16 3 3 3-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-collapse.js var ListCollapse; var init_list_collapse = __esmMin((() => { ListCollapse = [ ["path", { d: "M10 5h11" }], ["path", { d: "M10 12h11" }], ["path", { d: "M10 19h11" }], ["path", { d: "m3 10 3-3-3-3" }], ["path", { d: "m3 20 3-3-3-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-end.js var ListEnd; var init_list_end = __esmMin((() => { ListEnd = [ ["path", { d: "M16 5H3" }], ["path", { d: "M16 12H3" }], ["path", { d: "M9 19H3" }], ["path", { d: "m16 16-3 3 3 3" }], ["path", { d: "M21 5v12a2 2 0 0 1-2 2h-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-filter-plus.js var ListFilterPlus; var init_list_filter_plus = __esmMin((() => { ListFilterPlus = [ ["path", { d: "M12 5H2" }], ["path", { d: "M6 12h12" }], ["path", { d: "M9 19h6" }], ["path", { d: "M16 5h6" }], ["path", { d: "M19 8V2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-filter.js var ListFilter; var init_list_filter = __esmMin((() => { ListFilter = [ ["path", { d: "M2 5h20" }], ["path", { d: "M6 12h12" }], ["path", { d: "M9 19h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-indent-decrease.js var ListIndentDecrease; var init_list_indent_decrease = __esmMin((() => { ListIndentDecrease = [ ["path", { d: "M21 5H11" }], ["path", { d: "M21 12H11" }], ["path", { d: "M21 19H11" }], ["path", { d: "m7 8-4 4 4 4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-indent-increase.js var ListIndentIncrease; var init_list_indent_increase = __esmMin((() => { ListIndentIncrease = [ ["path", { d: "M21 5H11" }], ["path", { d: "M21 12H11" }], ["path", { d: "M21 19H11" }], ["path", { d: "m3 8 4 4-4 4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-minus.js var ListMinus; var init_list_minus = __esmMin((() => { ListMinus = [ ["path", { d: "M16 5H3" }], ["path", { d: "M11 12H3" }], ["path", { d: "M16 19H3" }], ["path", { d: "M21 12h-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-music.js var ListMusic; var init_list_music = __esmMin((() => { ListMusic = [ ["path", { d: "M16 5H3" }], ["path", { d: "M11 12H3" }], ["path", { d: "M11 19H3" }], ["path", { d: "M21 16V5" }], ["circle", { cx: "18", cy: "16", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-ordered.js var ListOrdered; var init_list_ordered = __esmMin((() => { ListOrdered = [ ["path", { d: "M11 5h10" }], ["path", { d: "M11 12h10" }], ["path", { d: "M11 19h10" }], ["path", { d: "M4 4h1v5" }], ["path", { d: "M4 9h2" }], ["path", { d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-plus.js var ListPlus; var init_list_plus = __esmMin((() => { ListPlus = [ ["path", { d: "M16 5H3" }], ["path", { d: "M11 12H3" }], ["path", { d: "M16 19H3" }], ["path", { d: "M18 9v6" }], ["path", { d: "M21 12h-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-restart.js var ListRestart; var init_list_restart = __esmMin((() => { ListRestart = [ ["path", { d: "M21 5H3" }], ["path", { d: "M7 12H3" }], ["path", { d: "M7 19H3" }], ["path", { d: "M12 18a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L11 14" }], ["path", { d: "M11 10v4h4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-start.js var ListStart; var init_list_start = __esmMin((() => { ListStart = [ ["path", { d: "M3 5h6" }], ["path", { d: "M3 12h13" }], ["path", { d: "M3 19h13" }], ["path", { d: "m16 8-3-3 3-3" }], ["path", { d: "M21 19V7a2 2 0 0 0-2-2h-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-todo.js var ListTodo; var init_list_todo = __esmMin((() => { ListTodo = [ ["path", { d: "M13 5h8" }], ["path", { d: "M13 12h8" }], ["path", { d: "M13 19h8" }], ["path", { d: "m3 17 2 2 4-4" }], ["rect", { x: "3", y: "4", width: "6", height: "6", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-tree.js var ListTree; var init_list_tree = __esmMin((() => { ListTree = [ ["path", { d: "M8 5h13" }], ["path", { d: "M13 12h8" }], ["path", { d: "M13 19h8" }], ["path", { d: "M3 10a2 2 0 0 0 2 2h3" }], ["path", { d: "M3 5v12a2 2 0 0 0 2 2h3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-video.js var ListVideo; var init_list_video = __esmMin((() => { ListVideo = [ ["path", { d: "M21 5H3" }], ["path", { d: "M10 12H3" }], ["path", { d: "M10 19H3" }], ["path", { d: "M15 12.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997a1 1 0 0 1-1.517-.86z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list-x.js var ListX; var init_list_x = __esmMin((() => { ListX = [ ["path", { d: "M16 5H3" }], ["path", { d: "M11 12H3" }], ["path", { d: "M16 19H3" }], ["path", { d: "m15.5 9.5 5 5" }], ["path", { d: "m20.5 9.5-5 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/list.js var List; var init_list = __esmMin((() => { List = [ ["path", { d: "M3 5h.01" }], ["path", { d: "M3 12h.01" }], ["path", { d: "M3 19h.01" }], ["path", { d: "M8 5h13" }], ["path", { d: "M8 12h13" }], ["path", { d: "M8 19h13" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/loader-circle.js var LoaderCircle; var init_loader_circle = __esmMin((() => { LoaderCircle = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/loader-pinwheel.js var LoaderPinwheel; var init_loader_pinwheel = __esmMin((() => { LoaderPinwheel = [ ["path", { d: "M22 12a1 1 0 0 1-10 0 1 1 0 0 0-10 0" }], ["path", { d: "M7 20.7a1 1 0 1 1 5-8.7 1 1 0 1 0 5-8.6" }], ["path", { d: "M7 3.3a1 1 0 1 1 5 8.6 1 1 0 1 0 5 8.6" }], ["circle", { cx: "12", cy: "12", r: "10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/loader.js var Loader; var init_loader = __esmMin((() => { Loader = [ ["path", { d: "M12 2v4" }], ["path", { d: "m16.2 7.8 2.9-2.9" }], ["path", { d: "M18 12h4" }], ["path", { d: "m16.2 16.2 2.9 2.9" }], ["path", { d: "M12 18v4" }], ["path", { d: "m4.9 19.1 2.9-2.9" }], ["path", { d: "M2 12h4" }], ["path", { d: "m4.9 4.9 2.9 2.9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/locate-off.js var LocateOff; var init_locate_off = __esmMin((() => { LocateOff = [ ["path", { d: "M12 19v3" }], ["path", { d: "M12 2v3" }], ["path", { d: "M18.89 13.24a7 7 0 0 0-8.13-8.13" }], ["path", { d: "M19 12h3" }], ["path", { d: "M2 12h3" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M7.05 7.05a7 7 0 0 0 9.9 9.9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/locate-fixed.js var LocateFixed; var init_locate_fixed = __esmMin((() => { LocateFixed = [ ["line", { x1: "2", x2: "5", y1: "12", y2: "12" }], ["line", { x1: "19", x2: "22", y1: "12", y2: "12" }], ["line", { x1: "12", x2: "12", y1: "2", y2: "5" }], ["line", { x1: "12", x2: "12", y1: "19", y2: "22" }], ["circle", { cx: "12", cy: "12", r: "7" }], ["circle", { cx: "12", cy: "12", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/locate.js var Locate; var init_locate = __esmMin((() => { Locate = [ ["line", { x1: "2", x2: "5", y1: "12", y2: "12" }], ["line", { x1: "19", x2: "22", y1: "12", y2: "12" }], ["line", { x1: "12", x2: "12", y1: "2", y2: "5" }], ["line", { x1: "12", x2: "12", y1: "19", y2: "22" }], ["circle", { cx: "12", cy: "12", r: "7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/lock-keyhole-open.js var LockKeyholeOpen; var init_lock_keyhole_open = __esmMin((() => { LockKeyholeOpen = [ ["circle", { cx: "12", cy: "16", r: "1" }], ["rect", { width: "18", height: "12", x: "3", y: "10", rx: "2" }], ["path", { d: "M7 10V7a5 5 0 0 1 9.33-2.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/lock-keyhole.js var LockKeyhole; var init_lock_keyhole = __esmMin((() => { LockKeyhole = [ ["circle", { cx: "12", cy: "16", r: "1" }], ["rect", { x: "3", y: "10", width: "18", height: "12", rx: "2" }], ["path", { d: "M7 10V7a5 5 0 0 1 10 0v3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/lock-open.js var LockOpen; var init_lock_open = __esmMin((() => { LockOpen = [["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }], ["path", { d: "M7 11V7a5 5 0 0 1 9.9-1" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/lock.js var Lock; var init_lock = __esmMin((() => { Lock = [["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }], ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/log-out.js var LogOut; var init_log_out = __esmMin((() => { LogOut = [ ["path", { d: "m16 17 5-5-5-5" }], ["path", { d: "M21 12H9" }], ["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/log-in.js var LogIn; var init_log_in = __esmMin((() => { LogIn = [ ["path", { d: "m10 17 5-5-5-5" }], ["path", { d: "M15 12H3" }], ["path", { d: "M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/logs.js var Logs; var init_logs = __esmMin((() => { Logs = [ ["path", { d: "M3 5h1" }], ["path", { d: "M3 12h1" }], ["path", { d: "M3 19h1" }], ["path", { d: "M8 5h1" }], ["path", { d: "M8 12h1" }], ["path", { d: "M8 19h1" }], ["path", { d: "M13 5h8" }], ["path", { d: "M13 12h8" }], ["path", { d: "M13 19h8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/lollipop.js var Lollipop; var init_lollipop = __esmMin((() => { Lollipop = [ ["circle", { cx: "11", cy: "11", r: "8" }], ["path", { d: "m21 21-4.3-4.3" }], ["path", { d: "M11 11a2 2 0 0 0 4 0 4 4 0 0 0-8 0 6 6 0 0 0 12 0" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/luggage.js var Luggage; var init_luggage = __esmMin((() => { Luggage = [ ["path", { d: "M6 20a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2" }], ["path", { d: "M8 18V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v14" }], ["path", { d: "M10 20h4" }], ["circle", { cx: "16", cy: "20", r: "2" }], ["circle", { cx: "8", cy: "20", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/magnet.js var Magnet; var init_magnet = __esmMin((() => { Magnet = [ ["path", { d: "m12 15 4 4" }], ["path", { d: "M2.352 10.648a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.029-6.029a1 1 0 1 1 3 3l-6.029 6.029a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.365-6.367A1 1 0 0 0 8.716 4.282z" }], ["path", { d: "m5 8 4 4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mail-check.js var MailCheck; var init_mail_check = __esmMin((() => { MailCheck = [ ["path", { d: "M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8" }], ["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" }], ["path", { d: "m16 19 2 2 4-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mail-minus.js var MailMinus; var init_mail_minus = __esmMin((() => { MailMinus = [ ["path", { d: "M22 15V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8" }], ["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" }], ["path", { d: "M16 19h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mail-open.js var MailOpen; var init_mail_open = __esmMin((() => { MailOpen = [["path", { d: "M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z" }], ["path", { d: "m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mail-plus.js var MailPlus; var init_mail_plus = __esmMin((() => { MailPlus = [ ["path", { d: "M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8" }], ["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" }], ["path", { d: "M19 16v6" }], ["path", { d: "M16 19h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mail-question-mark.js var MailQuestionMark; var init_mail_question_mark = __esmMin((() => { MailQuestionMark = [ ["path", { d: "M22 10.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h12.5" }], ["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" }], ["path", { d: "M18 15.28c.2-.4.5-.8.9-1a2.1 2.1 0 0 1 2.6.4c.3.4.5.8.5 1.3 0 1.3-2 2-2 2" }], ["path", { d: "M20 22v.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mail-search.js var MailSearch; var init_mail_search = __esmMin((() => { MailSearch = [ ["path", { d: "M22 12.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h7.5" }], ["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" }], ["path", { d: "M18 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" }], ["circle", { cx: "18", cy: "18", r: "3" }], ["path", { d: "m22 22-1.5-1.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mail-warning.js var MailWarning; var init_mail_warning = __esmMin((() => { MailWarning = [ ["path", { d: "M22 10.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h12.5" }], ["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" }], ["path", { d: "M20 14v4" }], ["path", { d: "M20 22v.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mail-x.js var MailX; var init_mail_x = __esmMin((() => { MailX = [ ["path", { d: "M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h9" }], ["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" }], ["path", { d: "m17 17 4 4" }], ["path", { d: "m21 17-4 4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mail.js var Mail; var init_mail = __esmMin((() => { Mail = [["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" }], ["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mailbox.js var Mailbox; var init_mailbox = __esmMin((() => { Mailbox = [ ["path", { d: "M22 17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9.5C2 7 4 5 6.5 5H18c2.2 0 4 1.8 4 4v8Z" }], ["polyline", { points: "15,9 18,9 18,11" }], ["path", { d: "M6.5 5C9 5 11 7 11 9.5V17a2 2 0 0 1-2 2" }], ["line", { x1: "6", x2: "7", y1: "10", y2: "10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mails.js var Mails; var init_mails = __esmMin((() => { Mails = [ ["path", { d: "M17 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 1-1.732" }], ["path", { d: "m22 5.5-6.419 4.179a2 2 0 0 1-2.162 0L7 5.5" }], ["rect", { x: "7", y: "3", width: "15", height: "12", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/map-minus.js var MapMinus; var init_map_minus = __esmMin((() => { MapMinus = [ ["path", { d: "m11 19-1.106-.552a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0l4.212 2.106a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619V14" }], ["path", { d: "M15 5.764V14" }], ["path", { d: "M21 18h-6" }], ["path", { d: "M9 3.236v15" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/map-pin-check-inside.js var MapPinCheckInside; var init_map_pin_check_inside = __esmMin((() => { MapPinCheckInside = [["path", { d: "M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" }], ["path", { d: "m9 10 2 2 4-4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/map-pin-check.js var MapPinCheck; var init_map_pin_check = __esmMin((() => { MapPinCheck = [ ["path", { d: "M19.43 12.935c.357-.967.57-1.955.57-2.935a8 8 0 0 0-16 0c0 4.993 5.539 10.193 7.399 11.799a1 1 0 0 0 1.202 0 32.197 32.197 0 0 0 .813-.728" }], ["circle", { cx: "12", cy: "10", r: "3" }], ["path", { d: "m16 18 2 2 4-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/map-pin-house.js var MapPinHouse; var init_map_pin_house = __esmMin((() => { MapPinHouse = [ ["path", { d: "M15 22a1 1 0 0 1-1-1v-4a1 1 0 0 1 .445-.832l3-2a1 1 0 0 1 1.11 0l3 2A1 1 0 0 1 22 17v4a1 1 0 0 1-1 1z" }], ["path", { d: "M18 10a8 8 0 0 0-16 0c0 4.993 5.539 10.193 7.399 11.799a1 1 0 0 0 .601.2" }], ["path", { d: "M18 22v-3" }], ["circle", { cx: "10", cy: "10", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/map-pin-minus-inside.js var MapPinMinusInside; var init_map_pin_minus_inside = __esmMin((() => { MapPinMinusInside = [["path", { d: "M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" }], ["path", { d: "M9 10h6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/map-pin-minus.js var MapPinMinus; var init_map_pin_minus = __esmMin((() => { MapPinMinus = [ ["path", { d: "M18.977 14C19.6 12.701 20 11.343 20 10a8 8 0 0 0-16 0c0 4.993 5.539 10.193 7.399 11.799a1 1 0 0 0 1.202 0 32 32 0 0 0 .824-.738" }], ["circle", { cx: "12", cy: "10", r: "3" }], ["path", { d: "M16 18h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/map-pin-off.js var MapPinOff; var init_map_pin_off = __esmMin((() => { MapPinOff = [ ["path", { d: "M12.75 7.09a3 3 0 0 1 2.16 2.16" }], ["path", { d: "M17.072 17.072c-1.634 2.17-3.527 3.912-4.471 4.727a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 1.432-4.568" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M8.475 2.818A8 8 0 0 1 20 10c0 1.183-.31 2.377-.81 3.533" }], ["path", { d: "M9.13 9.13a3 3 0 0 0 3.74 3.74" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/map-pin-pen.js var MapPinPen; var init_map_pin_pen = __esmMin((() => { MapPinPen = [ ["path", { d: "M17.97 9.304A8 8 0 0 0 2 10c0 4.69 4.887 9.562 7.022 11.468" }], ["path", { d: "M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }], ["circle", { cx: "10", cy: "10", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/map-pin-plus-inside.js var MapPinPlusInside; var init_map_pin_plus_inside = __esmMin((() => { MapPinPlusInside = [ ["path", { d: "M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" }], ["path", { d: "M12 7v6" }], ["path", { d: "M9 10h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/map-pin-x-inside.js var MapPinXInside; var init_map_pin_x_inside = __esmMin((() => { MapPinXInside = [ ["path", { d: "M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" }], ["path", { d: "m14.5 7.5-5 5" }], ["path", { d: "m9.5 7.5 5 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/map-pin-plus.js var MapPinPlus; var init_map_pin_plus = __esmMin((() => { MapPinPlus = [ ["path", { d: "M19.914 11.105A7.298 7.298 0 0 0 20 10a8 8 0 0 0-16 0c0 4.993 5.539 10.193 7.399 11.799a1 1 0 0 0 1.202 0 32 32 0 0 0 .824-.738" }], ["circle", { cx: "12", cy: "10", r: "3" }], ["path", { d: "M16 18h6" }], ["path", { d: "M19 15v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/map-pin-x.js var MapPinX; var init_map_pin_x = __esmMin((() => { MapPinX = [ ["path", { d: "M19.752 11.901A7.78 7.78 0 0 0 20 10a8 8 0 0 0-16 0c0 4.993 5.539 10.193 7.399 11.799a1 1 0 0 0 1.202 0 19 19 0 0 0 .09-.077" }], ["circle", { cx: "12", cy: "10", r: "3" }], ["path", { d: "m21.5 15.5-5 5" }], ["path", { d: "m21.5 20.5-5-5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/map-pin.js var MapPin; var init_map_pin = __esmMin((() => { MapPin = [["path", { d: "M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" }], ["circle", { cx: "12", cy: "10", r: "3" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/map-pinned.js var MapPinned; var init_map_pinned = __esmMin((() => { MapPinned = [ ["path", { d: "M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0" }], ["circle", { cx: "12", cy: "8", r: "2" }], ["path", { d: "M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/map-plus.js var MapPlus; var init_map_plus = __esmMin((() => { MapPlus = [ ["path", { d: "m11 19-1.106-.552a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0l4.212 2.106a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619V12" }], ["path", { d: "M15 5.764V12" }], ["path", { d: "M18 15v6" }], ["path", { d: "M21 18h-6" }], ["path", { d: "M9 3.236v15" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/map.js var Map$1; var init_map = __esmMin((() => { Map$1 = [ ["path", { d: "M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z" }], ["path", { d: "M15 5.764v15" }], ["path", { d: "M9 3.236v15" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mars.js var Mars; var init_mars = __esmMin((() => { Mars = [ ["path", { d: "M16 3h5v5" }], ["path", { d: "m21 3-6.75 6.75" }], ["circle", { cx: "10", cy: "14", r: "6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mars-stroke.js var MarsStroke; var init_mars_stroke = __esmMin((() => { MarsStroke = [ ["path", { d: "m14 6 4 4" }], ["path", { d: "M17 3h4v4" }], ["path", { d: "m21 3-7.75 7.75" }], ["circle", { cx: "9", cy: "15", r: "6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/martini.js var Martini; var init_martini = __esmMin((() => { Martini = [ ["path", { d: "M8 22h8" }], ["path", { d: "M12 11v11" }], ["path", { d: "m19 3-7 8-7-8Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/maximize-2.js var Maximize2; var init_maximize_2 = __esmMin((() => { Maximize2 = [ ["path", { d: "M15 3h6v6" }], ["path", { d: "m21 3-7 7" }], ["path", { d: "m3 21 7-7" }], ["path", { d: "M9 21H3v-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/maximize.js var Maximize; var init_maximize = __esmMin((() => { Maximize = [ ["path", { d: "M8 3H5a2 2 0 0 0-2 2v3" }], ["path", { d: "M21 8V5a2 2 0 0 0-2-2h-3" }], ["path", { d: "M3 16v3a2 2 0 0 0 2 2h3" }], ["path", { d: "M16 21h3a2 2 0 0 0 2-2v-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/medal.js var Medal; var init_medal = __esmMin((() => { Medal = [ ["path", { d: "M7.21 15 2.66 7.14a2 2 0 0 1 .13-2.2L4.4 2.8A2 2 0 0 1 6 2h12a2 2 0 0 1 1.6.8l1.6 2.14a2 2 0 0 1 .14 2.2L16.79 15" }], ["path", { d: "M11 12 5.12 2.2" }], ["path", { d: "m13 12 5.88-9.8" }], ["path", { d: "M8 7h8" }], ["circle", { cx: "12", cy: "17", r: "5" }], ["path", { d: "M12 18v-2h-.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/megaphone-off.js var MegaphoneOff; var init_megaphone_off = __esmMin((() => { MegaphoneOff = [ ["path", { d: "M11.636 6A13 13 0 0 0 19.4 3.2 1 1 0 0 1 21 4v11.344" }], ["path", { d: "M14.378 14.357A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h1" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14" }], ["path", { d: "M8 8v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/megaphone.js var Megaphone; var init_megaphone = __esmMin((() => { Megaphone = [ ["path", { d: "M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z" }], ["path", { d: "M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14" }], ["path", { d: "M8 6v8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/meh.js var Meh; var init_meh = __esmMin((() => { Meh = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["line", { x1: "8", x2: "16", y1: "15", y2: "15" }], ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9" }], ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/memory-stick.js var MemoryStick; var init_memory_stick = __esmMin((() => { MemoryStick = [ ["path", { d: "M6 19v-3" }], ["path", { d: "M10 19v-3" }], ["path", { d: "M14 19v-3" }], ["path", { d: "M18 19v-3" }], ["path", { d: "M8 11V9" }], ["path", { d: "M16 11V9" }], ["path", { d: "M12 11V9" }], ["path", { d: "M2 15h20" }], ["path", { d: "M2 7a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1.1a2 2 0 0 0 0 3.837V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5.1a2 2 0 0 0 0-3.837Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/menu.js var Menu; var init_menu = __esmMin((() => { Menu = [ ["path", { d: "M4 5h16" }], ["path", { d: "M4 12h16" }], ["path", { d: "M4 19h16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/merge.js var Merge; var init_merge = __esmMin((() => { Merge = [ ["path", { d: "m8 6 4-4 4 4" }], ["path", { d: "M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22" }], ["path", { d: "m20 22-5-5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-circle-code.js var MessageCircleCode; var init_message_circle_code = __esmMin((() => { MessageCircleCode = [ ["path", { d: "m10 9-3 3 3 3" }], ["path", { d: "m14 15 3-3-3-3" }], ["path", { d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-circle-dashed.js var MessageCircleDashed; var init_message_circle_dashed = __esmMin((() => { MessageCircleDashed = [ ["path", { d: "M10.1 2.182a10 10 0 0 1 3.8 0" }], ["path", { d: "M13.9 21.818a10 10 0 0 1-3.8 0" }], ["path", { d: "M17.609 3.72a10 10 0 0 1 2.69 2.7" }], ["path", { d: "M2.182 13.9a10 10 0 0 1 0-3.8" }], ["path", { d: "M20.28 17.61a10 10 0 0 1-2.7 2.69" }], ["path", { d: "M21.818 10.1a10 10 0 0 1 0 3.8" }], ["path", { d: "M3.721 6.391a10 10 0 0 1 2.7-2.69" }], ["path", { d: "m6.163 21.117-2.906.85a1 1 0 0 1-1.236-1.169l.965-2.98" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-circle-heart.js var MessageCircleHeart; var init_message_circle_heart = __esmMin((() => { MessageCircleHeart = [["path", { d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" }], ["path", { d: "M7.828 13.07A3 3 0 0 1 12 8.764a3 3 0 0 1 5.004 2.224 3 3 0 0 1-.832 2.083l-3.447 3.62a1 1 0 0 1-1.45-.001z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-circle-more.js var MessageCircleMore; var init_message_circle_more = __esmMin((() => { MessageCircleMore = [ ["path", { d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" }], ["path", { d: "M8 12h.01" }], ["path", { d: "M12 12h.01" }], ["path", { d: "M16 12h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-circle-off.js var MessageCircleOff; var init_message_circle_off = __esmMin((() => { MessageCircleOff = [ ["path", { d: "m2 2 20 20" }], ["path", { d: "M4.93 4.929a10 10 0 0 0-1.938 11.412 2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 0 0 11.302-1.989" }], ["path", { d: "M8.35 2.69A10 10 0 0 1 21.3 15.65" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-circle-plus.js var MessageCirclePlus; var init_message_circle_plus = __esmMin((() => { MessageCirclePlus = [ ["path", { d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" }], ["path", { d: "M8 12h8" }], ["path", { d: "M12 8v8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-circle-question-mark.js var MessageCircleQuestionMark; var init_message_circle_question_mark = __esmMin((() => { MessageCircleQuestionMark = [ ["path", { d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" }], ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }], ["path", { d: "M12 17h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-circle-reply.js var MessageCircleReply; var init_message_circle_reply = __esmMin((() => { MessageCircleReply = [ ["path", { d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" }], ["path", { d: "m10 15-3-3 3-3" }], ["path", { d: "M7 12h8a2 2 0 0 1 2 2v1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-circle-warning.js var MessageCircleWarning; var init_message_circle_warning = __esmMin((() => { MessageCircleWarning = [ ["path", { d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" }], ["path", { d: "M12 8v4" }], ["path", { d: "M12 16h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-circle-x.js var MessageCircleX; var init_message_circle_x = __esmMin((() => { MessageCircleX = [ ["path", { d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" }], ["path", { d: "m15 9-6 6" }], ["path", { d: "m9 9 6 6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-circle.js var MessageCircle; var init_message_circle = __esmMin((() => { MessageCircle = [["path", { d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-square-code.js var MessageSquareCode; var init_message_square_code = __esmMin((() => { MessageSquareCode = [ ["path", { d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }], ["path", { d: "m10 8-3 3 3 3" }], ["path", { d: "m14 14 3-3-3-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-square-dashed.js var MessageSquareDashed; var init_message_square_dashed = __esmMin((() => { MessageSquareDashed = [ ["path", { d: "M12 19h.01" }], ["path", { d: "M12 3h.01" }], ["path", { d: "M16 19h.01" }], ["path", { d: "M16 3h.01" }], ["path", { d: "M2 13h.01" }], ["path", { d: "M2 17v4.286a.71.71 0 0 0 1.212.502l2.202-2.202A2 2 0 0 1 6.828 19H8" }], ["path", { d: "M2 5a2 2 0 0 1 2-2" }], ["path", { d: "M2 9h.01" }], ["path", { d: "M20 3a2 2 0 0 1 2 2" }], ["path", { d: "M22 13h.01" }], ["path", { d: "M22 17a2 2 0 0 1-2 2" }], ["path", { d: "M22 9h.01" }], ["path", { d: "M8 3h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-square-diff.js var MessageSquareDiff; var init_message_square_diff = __esmMin((() => { MessageSquareDiff = [ ["path", { d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }], ["path", { d: "M10 15h4" }], ["path", { d: "M10 9h4" }], ["path", { d: "M12 7v4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-square-dot.js var MessageSquareDot; var init_message_square_dot = __esmMin((() => { MessageSquareDot = [["path", { d: "M12.7 3H4a2 2 0 0 0-2 2v16.286a.71.71 0 0 0 1.212.502l2.202-2.202A2 2 0 0 1 6.828 19H20a2 2 0 0 0 2-2v-4.7" }], ["circle", { cx: "19", cy: "6", r: "3" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-square-heart.js var MessageSquareHeart; var init_message_square_heart = __esmMin((() => { MessageSquareHeart = [["path", { d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }], ["path", { d: "M7.5 9.5c0 .687.265 1.383.697 1.844l3.009 3.264a1.14 1.14 0 0 0 .407.314 1 1 0 0 0 .783-.004 1.14 1.14 0 0 0 .398-.31l3.008-3.264A2.77 2.77 0 0 0 16.5 9.5 2.5 2.5 0 0 0 12 8a2.5 2.5 0 0 0-4.5 1.5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-square-lock.js var MessageSquareLock; var init_message_square_lock = __esmMin((() => { MessageSquareLock = [ ["path", { d: "M22 8.5V5a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v16.286a.71.71 0 0 0 1.212.502l2.202-2.202A2 2 0 0 1 6.828 19H10" }], ["path", { d: "M20 15v-2a2 2 0 0 0-4 0v2" }], ["rect", { x: "14", y: "15", width: "8", height: "5", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-square-more.js var MessageSquareMore; var init_message_square_more = __esmMin((() => { MessageSquareMore = [ ["path", { d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }], ["path", { d: "M12 11h.01" }], ["path", { d: "M16 11h.01" }], ["path", { d: "M8 11h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-square-off.js var MessageSquareOff; var init_message_square_off = __esmMin((() => { MessageSquareOff = [ ["path", { d: "M19 19H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.7.7 0 0 1 2 21.286V5a2 2 0 0 1 1.184-1.826" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M8.656 3H20a2 2 0 0 1 2 2v11.344" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-square-plus.js var MessageSquarePlus; var init_message_square_plus = __esmMin((() => { MessageSquarePlus = [ ["path", { d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }], ["path", { d: "M12 8v6" }], ["path", { d: "M9 11h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-square-quote.js var MessageSquareQuote; var init_message_square_quote = __esmMin((() => { MessageSquareQuote = [ ["path", { d: "M14 14a2 2 0 0 0 2-2V8h-2" }], ["path", { d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }], ["path", { d: "M8 14a2 2 0 0 0 2-2V8H8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-square-reply.js var MessageSquareReply; var init_message_square_reply = __esmMin((() => { MessageSquareReply = [ ["path", { d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }], ["path", { d: "m10 8-3 3 3 3" }], ["path", { d: "M17 14v-1a2 2 0 0 0-2-2H7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-square-share.js var MessageSquareShare; var init_message_square_share = __esmMin((() => { MessageSquareShare = [ ["path", { d: "M12 3H4a2 2 0 0 0-2 2v16.286a.71.71 0 0 0 1.212.502l2.202-2.202A2 2 0 0 1 6.828 19H20a2 2 0 0 0 2-2v-4" }], ["path", { d: "M16 3h6v6" }], ["path", { d: "m16 9 6-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-square-text.js var MessageSquareText; var init_message_square_text = __esmMin((() => { MessageSquareText = [ ["path", { d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }], ["path", { d: "M7 11h10" }], ["path", { d: "M7 15h6" }], ["path", { d: "M7 7h8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-square-warning.js var MessageSquareWarning; var init_message_square_warning = __esmMin((() => { MessageSquareWarning = [ ["path", { d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }], ["path", { d: "M12 15h.01" }], ["path", { d: "M12 7v4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-square-x.js var MessageSquareX; var init_message_square_x = __esmMin((() => { MessageSquareX = [ ["path", { d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }], ["path", { d: "m14.5 8.5-5 5" }], ["path", { d: "m9.5 8.5 5 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/message-square.js var MessageSquare; var init_message_square = __esmMin((() => { MessageSquare = [["path", { d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/messages-square.js var MessagesSquare; var init_messages_square = __esmMin((() => { MessagesSquare = [["path", { d: "M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z" }], ["path", { d: "M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mic-off.js var MicOff; var init_mic_off = __esmMin((() => { MicOff = [ ["path", { d: "M12 19v3" }], ["path", { d: "M15 9.34V5a3 3 0 0 0-5.68-1.33" }], ["path", { d: "M16.95 16.95A7 7 0 0 1 5 12v-2" }], ["path", { d: "M18.89 13.23A7 7 0 0 0 19 12v-2" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M9 9v3a3 3 0 0 0 5.12 2.12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mic-vocal.js var MicVocal; var init_mic_vocal = __esmMin((() => { MicVocal = [ ["path", { d: "m11 7.601-5.994 8.19a1 1 0 0 0 .1 1.298l.817.818a1 1 0 0 0 1.314.087L15.09 12" }], ["path", { d: "M16.5 21.174C15.5 20.5 14.372 20 13 20c-2.058 0-3.928 2.356-6 2-2.072-.356-2.775-3.369-1.5-4.5" }], ["circle", { cx: "16", cy: "7", r: "5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mic.js var Mic; var init_mic = __esmMin((() => { Mic = [ ["path", { d: "M12 19v3" }], ["path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }], ["rect", { x: "9", y: "2", width: "6", height: "13", rx: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/microchip.js var Microchip; var init_microchip = __esmMin((() => { Microchip = [ ["path", { d: "M18 12h2" }], ["path", { d: "M18 16h2" }], ["path", { d: "M18 20h2" }], ["path", { d: "M18 4h2" }], ["path", { d: "M18 8h2" }], ["path", { d: "M4 12h2" }], ["path", { d: "M4 16h2" }], ["path", { d: "M4 20h2" }], ["path", { d: "M4 4h2" }], ["path", { d: "M4 8h2" }], ["path", { d: "M8 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2h-1.5c-.276 0-.494.227-.562.495a2 2 0 0 1-3.876 0C9.994 2.227 9.776 2 9.5 2z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/microscope.js var Microscope; var init_microscope = __esmMin((() => { Microscope = [ ["path", { d: "M6 18h8" }], ["path", { d: "M3 22h18" }], ["path", { d: "M14 22a7 7 0 1 0 0-14h-1" }], ["path", { d: "M9 14h2" }], ["path", { d: "M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z" }], ["path", { d: "M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/milestone.js var Milestone; var init_milestone = __esmMin((() => { Milestone = [ ["path", { d: "M12 13v8" }], ["path", { d: "M12 3v3" }], ["path", { d: "M4 6a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h13a2 2 0 0 0 1.152-.365l3.424-2.317a1 1 0 0 0 0-1.635l-3.424-2.318A2 2 0 0 0 17 6z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/microwave.js var Microwave; var init_microwave = __esmMin((() => { Microwave = [ ["rect", { width: "20", height: "15", x: "2", y: "4", rx: "2" }], ["rect", { width: "8", height: "7", x: "6", y: "8", rx: "1" }], ["path", { d: "M18 8v7" }], ["path", { d: "M6 19v2" }], ["path", { d: "M18 19v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/milk-off.js var MilkOff; var init_milk_off = __esmMin((() => { MilkOff = [ ["path", { d: "M8 2h8" }], ["path", { d: "M9 2v1.343M15 2v2.789a4 4 0 0 0 .672 2.219l.656.984a4 4 0 0 1 .672 2.22v1.131M7.8 7.8l-.128.192A4 4 0 0 0 7 10.212V20a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-3" }], ["path", { d: "M7 15a6.47 6.47 0 0 1 5 0 6.472 6.472 0 0 0 3.435.435" }], ["line", { x1: "2", x2: "22", y1: "2", y2: "22" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/milk.js var Milk; var init_milk = __esmMin((() => { Milk = [ ["path", { d: "M8 2h8" }], ["path", { d: "M9 2v2.789a4 4 0 0 1-.672 2.219l-.656.984A4 4 0 0 0 7 10.212V20a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-9.789a4 4 0 0 0-.672-2.219l-.656-.984A4 4 0 0 1 15 4.788V2" }], ["path", { d: "M7 15a6.472 6.472 0 0 1 5 0 6.47 6.47 0 0 0 5 0" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/minimize-2.js var Minimize2; var init_minimize_2 = __esmMin((() => { Minimize2 = [ ["path", { d: "m14 10 7-7" }], ["path", { d: "M20 10h-6V4" }], ["path", { d: "m3 21 7-7" }], ["path", { d: "M4 14h6v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/minimize.js var Minimize; var init_minimize = __esmMin((() => { Minimize = [ ["path", { d: "M8 3v3a2 2 0 0 1-2 2H3" }], ["path", { d: "M21 8h-3a2 2 0 0 1-2-2V3" }], ["path", { d: "M3 16h3a2 2 0 0 1 2 2v3" }], ["path", { d: "M16 21v-3a2 2 0 0 1 2-2h3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/minus.js var Minus; var init_minus = __esmMin((() => { Minus = [["path", { d: "M5 12h14" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/monitor-check.js var MonitorCheck; var init_monitor_check = __esmMin((() => { MonitorCheck = [ ["path", { d: "m9 10 2 2 4-4" }], ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }], ["path", { d: "M12 17v4" }], ["path", { d: "M8 21h8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/monitor-cloud.js var MonitorCloud; var init_monitor_cloud = __esmMin((() => { MonitorCloud = [ ["path", { d: "M11 13a3 3 0 1 1 2.83-4H14a2 2 0 0 1 0 4z" }], ["path", { d: "M12 17v4" }], ["path", { d: "M8 21h8" }], ["rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/monitor-cog.js var MonitorCog; var init_monitor_cog = __esmMin((() => { MonitorCog = [ ["path", { d: "M12 17v4" }], ["path", { d: "m14.305 7.53.923-.382" }], ["path", { d: "m15.228 4.852-.923-.383" }], ["path", { d: "m16.852 3.228-.383-.924" }], ["path", { d: "m16.852 8.772-.383.923" }], ["path", { d: "m19.148 3.228.383-.924" }], ["path", { d: "m19.53 9.696-.382-.924" }], ["path", { d: "m20.772 4.852.924-.383" }], ["path", { d: "m20.772 7.148.924.383" }], ["path", { d: "M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7" }], ["path", { d: "M8 21h8" }], ["circle", { cx: "18", cy: "6", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/monitor-dot.js var MonitorDot; var init_monitor_dot = __esmMin((() => { MonitorDot = [ ["path", { d: "M12 17v4" }], ["path", { d: "M22 12.307V15a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h8.693" }], ["path", { d: "M8 21h8" }], ["circle", { cx: "19", cy: "6", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/monitor-down.js var MonitorDown; var init_monitor_down = __esmMin((() => { MonitorDown = [ ["path", { d: "M12 13V7" }], ["path", { d: "m15 10-3 3-3-3" }], ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }], ["path", { d: "M12 17v4" }], ["path", { d: "M8 21h8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/monitor-off.js var MonitorOff; var init_monitor_off = __esmMin((() => { MonitorOff = [ ["path", { d: "M17 17H4a2 2 0 0 1-2-2V5c0-1.5 1-2 1-2" }], ["path", { d: "M22 15V5a2 2 0 0 0-2-2H9" }], ["path", { d: "M8 21h8" }], ["path", { d: "M12 17v4" }], ["path", { d: "m2 2 20 20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/monitor-pause.js var MonitorPause; var init_monitor_pause = __esmMin((() => { MonitorPause = [ ["path", { d: "M10 13V7" }], ["path", { d: "M14 13V7" }], ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }], ["path", { d: "M12 17v4" }], ["path", { d: "M8 21h8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/monitor-play.js var MonitorPlay; var init_monitor_play = __esmMin((() => { MonitorPlay = [ ["path", { d: "M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.645.645 0 0 1 .967-.56z" }], ["path", { d: "M12 17v4" }], ["path", { d: "M8 21h8" }], ["rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/monitor-smartphone.js var MonitorSmartphone; var init_monitor_smartphone = __esmMin((() => { MonitorSmartphone = [ ["path", { d: "M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8" }], ["path", { d: "M10 19v-3.96 3.15" }], ["path", { d: "M7 19h5" }], ["rect", { width: "6", height: "10", x: "16", y: "12", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/monitor-speaker.js var MonitorSpeaker; var init_monitor_speaker = __esmMin((() => { MonitorSpeaker = [ ["path", { d: "M5.5 20H8" }], ["path", { d: "M17 9h.01" }], ["rect", { width: "10", height: "16", x: "12", y: "4", rx: "2" }], ["path", { d: "M8 6H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h4" }], ["circle", { cx: "17", cy: "15", r: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/monitor-stop.js var MonitorStop; var init_monitor_stop = __esmMin((() => { MonitorStop = [ ["path", { d: "M12 17v4" }], ["path", { d: "M8 21h8" }], ["rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }], ["rect", { x: "9", y: "7", width: "6", height: "6", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/monitor-up.js var MonitorUp; var init_monitor_up = __esmMin((() => { MonitorUp = [ ["path", { d: "m9 10 3-3 3 3" }], ["path", { d: "M12 13V7" }], ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }], ["path", { d: "M12 17v4" }], ["path", { d: "M8 21h8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/monitor-x.js var MonitorX; var init_monitor_x = __esmMin((() => { MonitorX = [ ["path", { d: "m14.5 12.5-5-5" }], ["path", { d: "m9.5 12.5 5-5" }], ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }], ["path", { d: "M12 17v4" }], ["path", { d: "M8 21h8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/monitor.js var Monitor; var init_monitor = __esmMin((() => { Monitor = [ ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }], ["line", { x1: "8", x2: "16", y1: "21", y2: "21" }], ["line", { x1: "12", x2: "12", y1: "17", y2: "21" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/moon-star.js var MoonStar; var init_moon_star = __esmMin((() => { MoonStar = [ ["path", { d: "M18 5h4" }], ["path", { d: "M20 3v4" }], ["path", { d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/moon.js var Moon; var init_moon = __esmMin((() => { Moon = [["path", { d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/motorbike.js var Motorbike; var init_motorbike = __esmMin((() => { Motorbike = [ ["path", { d: "m18 14-1-3" }], ["path", { d: "m3 9 6 2a2 2 0 0 1 2-2h2a2 2 0 0 1 1.99 1.81" }], ["path", { d: "M8 17h3a1 1 0 0 0 1-1 6 6 0 0 1 6-6 1 1 0 0 0 1-1v-.75A5 5 0 0 0 17 5" }], ["circle", { cx: "19", cy: "17", r: "3" }], ["circle", { cx: "5", cy: "17", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mountain-snow.js var MountainSnow; var init_mountain_snow = __esmMin((() => { MountainSnow = [["path", { d: "m8 3 4 8 5-5 5 15H2L8 3z" }], ["path", { d: "M4.14 15.08c2.62-1.57 5.24-1.43 7.86.42 2.74 1.94 5.49 2 8.23.19" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mountain.js var Mountain; var init_mountain = __esmMin((() => { Mountain = [["path", { d: "m8 3 4 8 5-5 5 15H2L8 3z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mouse-off.js var MouseOff; var init_mouse_off = __esmMin((() => { MouseOff = [ ["path", { d: "M12 6v.343" }], ["path", { d: "M18.218 18.218A7 7 0 0 1 5 15V9a7 7 0 0 1 .782-3.218" }], ["path", { d: "M19 13.343V9A7 7 0 0 0 8.56 2.902" }], ["path", { d: "M22 22 2 2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mouse-pointer-2-off.js var MousePointer2Off; var init_mouse_pointer_2_off = __esmMin((() => { MousePointer2Off = [ ["path", { d: "m15.55 8.45 5.138 2.087a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063L8.45 15.551" }], ["path", { d: "M22 2 2 22" }], ["path", { d: "m6.816 11.528-2.779-6.84a.495.495 0 0 1 .651-.651l6.84 2.779" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mouse-pointer-2.js var MousePointer2; var init_mouse_pointer_2 = __esmMin((() => { MousePointer2 = [["path", { d: "M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mouse-pointer-ban.js var MousePointerBan; var init_mouse_pointer_ban = __esmMin((() => { MousePointerBan = [ ["path", { d: "M2.034 2.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.944L8.204 7.545a1 1 0 0 0-.66.66l-1.066 3.443a.5.5 0 0 1-.944.033z" }], ["circle", { cx: "16", cy: "16", r: "6" }], ["path", { d: "m11.8 11.8 8.4 8.4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mouse-pointer-click.js var MousePointerClick; var init_mouse_pointer_click = __esmMin((() => { MousePointerClick = [ ["path", { d: "M14 4.1 12 6" }], ["path", { d: "m5.1 8-2.9-.8" }], ["path", { d: "m6 12-1.9 2" }], ["path", { d: "M7.2 2.2 8 5.1" }], ["path", { d: "M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mouse-pointer.js var MousePointer; var init_mouse_pointer = __esmMin((() => { MousePointer = [["path", { d: "M12.586 12.586 19 19" }], ["path", { d: "M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.579a.5.5 0 0 0 .063-.947z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/mouse.js var Mouse; var init_mouse = __esmMin((() => { Mouse = [["rect", { x: "5", y: "2", width: "14", height: "20", rx: "7" }], ["path", { d: "M12 6v4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/move-diagonal.js var MoveDiagonal; var init_move_diagonal = __esmMin((() => { MoveDiagonal = [ ["path", { d: "M11 19H5v-6" }], ["path", { d: "M13 5h6v6" }], ["path", { d: "M19 5 5 19" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/move-diagonal-2.js var MoveDiagonal2; var init_move_diagonal_2 = __esmMin((() => { MoveDiagonal2 = [ ["path", { d: "M19 13v6h-6" }], ["path", { d: "M5 11V5h6" }], ["path", { d: "m5 5 14 14" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/move-3d.js var Move3d; var init_move_3d = __esmMin((() => { Move3d = [ ["path", { d: "M5 3v16h16" }], ["path", { d: "m5 19 6-6" }], ["path", { d: "m2 6 3-3 3 3" }], ["path", { d: "m18 16 3 3-3 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/move-down-left.js var MoveDownLeft; var init_move_down_left = __esmMin((() => { MoveDownLeft = [["path", { d: "M11 19H5V13" }], ["path", { d: "M19 5L5 19" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/move-down-right.js var MoveDownRight; var init_move_down_right = __esmMin((() => { MoveDownRight = [["path", { d: "M19 13V19H13" }], ["path", { d: "M5 5L19 19" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/move-down.js var MoveDown; var init_move_down = __esmMin((() => { MoveDown = [["path", { d: "M8 18L12 22L16 18" }], ["path", { d: "M12 2V22" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/move-left.js var MoveLeft; var init_move_left = __esmMin((() => { MoveLeft = [["path", { d: "M6 8L2 12L6 16" }], ["path", { d: "M2 12H22" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/move-horizontal.js var MoveHorizontal; var init_move_horizontal = __esmMin((() => { MoveHorizontal = [ ["path", { d: "m18 8 4 4-4 4" }], ["path", { d: "M2 12h20" }], ["path", { d: "m6 8-4 4 4 4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/move-right.js var MoveRight; var init_move_right = __esmMin((() => { MoveRight = [["path", { d: "M18 8L22 12L18 16" }], ["path", { d: "M2 12H22" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/move-up-left.js var MoveUpLeft; var init_move_up_left = __esmMin((() => { MoveUpLeft = [["path", { d: "M5 11V5H11" }], ["path", { d: "M5 5L19 19" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/move-up-right.js var MoveUpRight; var init_move_up_right = __esmMin((() => { MoveUpRight = [["path", { d: "M13 5H19V11" }], ["path", { d: "M19 5L5 19" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/move-up.js var MoveUp; var init_move_up = __esmMin((() => { MoveUp = [["path", { d: "M8 6L12 2L16 6" }], ["path", { d: "M12 2V22" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/move-vertical.js var MoveVertical; var init_move_vertical = __esmMin((() => { MoveVertical = [ ["path", { d: "M12 2v20" }], ["path", { d: "m8 18 4 4 4-4" }], ["path", { d: "m8 6 4-4 4 4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/move.js var Move; var init_move = __esmMin((() => { Move = [ ["path", { d: "M12 2v20" }], ["path", { d: "m15 19-3 3-3-3" }], ["path", { d: "m19 9 3 3-3 3" }], ["path", { d: "M2 12h20" }], ["path", { d: "m5 9-3 3 3 3" }], ["path", { d: "m9 5 3-3 3 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/music-2.js var Music2; var init_music_2 = __esmMin((() => { Music2 = [["circle", { cx: "8", cy: "18", r: "4" }], ["path", { d: "M12 18V2l7 4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/music-3.js var Music3; var init_music_3 = __esmMin((() => { Music3 = [["circle", { cx: "12", cy: "18", r: "4" }], ["path", { d: "M16 18V2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/music-4.js var Music4; var init_music_4 = __esmMin((() => { Music4 = [ ["path", { d: "M9 18V5l12-2v13" }], ["path", { d: "m9 9 12-2" }], ["circle", { cx: "6", cy: "18", r: "3" }], ["circle", { cx: "18", cy: "16", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/music.js var Music; var init_music = __esmMin((() => { Music = [ ["path", { d: "M9 18V5l12-2v13" }], ["circle", { cx: "6", cy: "18", r: "3" }], ["circle", { cx: "18", cy: "16", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/navigation-2.js var Navigation2; var init_navigation_2 = __esmMin((() => { Navigation2 = [["polygon", { points: "12 2 19 21 12 17 5 21 12 2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/navigation-2-off.js var Navigation2Off; var init_navigation_2_off = __esmMin((() => { Navigation2Off = [ ["path", { d: "M9.31 9.31 5 21l7-4 7 4-1.17-3.17" }], ["path", { d: "M14.53 8.88 12 2l-1.17 3.17" }], ["line", { x1: "2", x2: "22", y1: "2", y2: "22" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/navigation-off.js var NavigationOff; var init_navigation_off = __esmMin((() => { NavigationOff = [ ["path", { d: "M8.43 8.43 3 11l8 2 2 8 2.57-5.43" }], ["path", { d: "M17.39 11.73 22 2l-9.73 4.61" }], ["line", { x1: "2", x2: "22", y1: "2", y2: "22" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/navigation.js var Navigation; var init_navigation = __esmMin((() => { Navigation = [["polygon", { points: "3 11 22 2 13 21 11 13 3 11" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/network.js var Network; var init_network = __esmMin((() => { Network = [ ["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1" }], ["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1" }], ["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1" }], ["path", { d: "M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3" }], ["path", { d: "M12 12V8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/newspaper.js var Newspaper; var init_newspaper = __esmMin((() => { Newspaper = [ ["path", { d: "M15 18h-5" }], ["path", { d: "M18 14h-8" }], ["path", { d: "M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2" }], ["rect", { width: "8", height: "4", x: "10", y: "6", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/nfc.js var Nfc; var init_nfc = __esmMin((() => { Nfc = [ ["path", { d: "M6 8.32a7.43 7.43 0 0 1 0 7.36" }], ["path", { d: "M9.46 6.21a11.76 11.76 0 0 1 0 11.58" }], ["path", { d: "M12.91 4.1a15.91 15.91 0 0 1 .01 15.8" }], ["path", { d: "M16.37 2a20.16 20.16 0 0 1 0 20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/non-binary.js var NonBinary; var init_non_binary = __esmMin((() => { NonBinary = [ ["path", { d: "M12 2v10" }], ["path", { d: "m8.5 4 7 4" }], ["path", { d: "m8.5 8 7-4" }], ["circle", { cx: "12", cy: "17", r: "5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/notebook-pen.js var NotebookPen; var init_notebook_pen = __esmMin((() => { NotebookPen = [ ["path", { d: "M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4" }], ["path", { d: "M2 6h4" }], ["path", { d: "M2 10h4" }], ["path", { d: "M2 14h4" }], ["path", { d: "M2 18h4" }], ["path", { d: "M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/notebook-tabs.js var NotebookTabs; var init_notebook_tabs = __esmMin((() => { NotebookTabs = [ ["path", { d: "M2 6h4" }], ["path", { d: "M2 10h4" }], ["path", { d: "M2 14h4" }], ["path", { d: "M2 18h4" }], ["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2" }], ["path", { d: "M15 2v20" }], ["path", { d: "M15 7h5" }], ["path", { d: "M15 12h5" }], ["path", { d: "M15 17h5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/notebook-text.js var NotebookText; var init_notebook_text = __esmMin((() => { NotebookText = [ ["path", { d: "M2 6h4" }], ["path", { d: "M2 10h4" }], ["path", { d: "M2 14h4" }], ["path", { d: "M2 18h4" }], ["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2" }], ["path", { d: "M9.5 8h5" }], ["path", { d: "M9.5 12H16" }], ["path", { d: "M9.5 16H14" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/notebook.js var Notebook; var init_notebook = __esmMin((() => { Notebook = [ ["path", { d: "M2 6h4" }], ["path", { d: "M2 10h4" }], ["path", { d: "M2 14h4" }], ["path", { d: "M2 18h4" }], ["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2" }], ["path", { d: "M16 2v20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/notepad-text-dashed.js var NotepadTextDashed; var init_notepad_text_dashed = __esmMin((() => { NotepadTextDashed = [ ["path", { d: "M8 2v4" }], ["path", { d: "M12 2v4" }], ["path", { d: "M16 2v4" }], ["path", { d: "M16 4h2a2 2 0 0 1 2 2v2" }], ["path", { d: "M20 12v2" }], ["path", { d: "M20 18v2a2 2 0 0 1-2 2h-1" }], ["path", { d: "M13 22h-2" }], ["path", { d: "M7 22H6a2 2 0 0 1-2-2v-2" }], ["path", { d: "M4 14v-2" }], ["path", { d: "M4 8V6a2 2 0 0 1 2-2h2" }], ["path", { d: "M8 10h6" }], ["path", { d: "M8 14h8" }], ["path", { d: "M8 18h5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/nut-off.js var NutOff; var init_nut_off = __esmMin((() => { NutOff = [ ["path", { d: "M12 4V2" }], ["path", { d: "M5 10v4a7.004 7.004 0 0 0 5.277 6.787c.412.104.802.292 1.102.592L12 22l.621-.621c.3-.3.69-.488 1.102-.592a7.01 7.01 0 0 0 4.125-2.939" }], ["path", { d: "M19 10v3.343" }], ["path", { d: "M12 12c-1.349-.573-1.905-1.005-2.5-2-.546.902-1.048 1.353-2.5 2-1.018-.644-1.46-1.08-2-2-1.028.71-1.69.918-3 1 1.081-1.048 1.757-2.03 2-3 .194-.776.84-1.551 1.79-2.21m11.654 5.997c.887-.457 1.28-.891 1.556-1.787 1.032.916 1.683 1.157 3 1-1.297-1.036-1.758-2.03-2-3-.5-2-4-4-8-4-.74 0-1.461.068-2.15.192" }], ["line", { x1: "2", x2: "22", y1: "2", y2: "22" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/notepad-text.js var NotepadText; var init_notepad_text = __esmMin((() => { NotepadText = [ ["path", { d: "M8 2v4" }], ["path", { d: "M12 2v4" }], ["path", { d: "M16 2v4" }], ["rect", { width: "16", height: "18", x: "4", y: "4", rx: "2" }], ["path", { d: "M8 10h6" }], ["path", { d: "M8 14h8" }], ["path", { d: "M8 18h5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/nut.js var Nut; var init_nut = __esmMin((() => { Nut = [ ["path", { d: "M12 4V2" }], ["path", { d: "M5 10v4a7.004 7.004 0 0 0 5.277 6.787c.412.104.802.292 1.102.592L12 22l.621-.621c.3-.3.69-.488 1.102-.592A7.003 7.003 0 0 0 19 14v-4" }], ["path", { d: "M12 4C8 4 4.5 6 4 8c-.243.97-.919 1.952-2 3 1.31-.082 1.972-.29 3-1 .54.92.982 1.356 2 2 1.452-.647 1.954-1.098 2.5-2 .595.995 1.151 1.427 2.5 2 1.31-.621 1.862-1.058 2.5-2 .629.977 1.162 1.423 2.5 2 1.209-.548 1.68-.967 2-2 1.032.916 1.683 1.157 3 1-1.297-1.036-1.758-2.03-2-3-.5-2-4-4-8-4Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/octagon-alert.js var OctagonAlert; var init_octagon_alert = __esmMin((() => { OctagonAlert = [ ["path", { d: "M12 16h.01" }], ["path", { d: "M12 8v4" }], ["path", { d: "M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/octagon-minus.js var OctagonMinus; var init_octagon_minus = __esmMin((() => { OctagonMinus = [["path", { d: "M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z" }], ["path", { d: "M8 12h8" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/octagon-pause.js var OctagonPause; var init_octagon_pause = __esmMin((() => { OctagonPause = [ ["path", { d: "M10 15V9" }], ["path", { d: "M14 15V9" }], ["path", { d: "M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/octagon-x.js var OctagonX; var init_octagon_x = __esmMin((() => { OctagonX = [ ["path", { d: "m15 9-6 6" }], ["path", { d: "M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z" }], ["path", { d: "m9 9 6 6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/octagon.js var Octagon; var init_octagon = __esmMin((() => { Octagon = [["path", { d: "M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/omega.js var Omega; var init_omega = __esmMin((() => { Omega = [["path", { d: "M3 20h4.5a.5.5 0 0 0 .5-.5v-.282a.52.52 0 0 0-.247-.437 8 8 0 1 1 8.494-.001.52.52 0 0 0-.247.438v.282a.5.5 0 0 0 .5.5H21" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/option.js var Option; var init_option = __esmMin((() => { Option = [["path", { d: "M3 3h6l6 18h6" }], ["path", { d: "M14 3h7" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/orbit.js var Orbit; var init_orbit = __esmMin((() => { Orbit = [ ["path", { d: "M20.341 6.484A10 10 0 0 1 10.266 21.85" }], ["path", { d: "M3.659 17.516A10 10 0 0 1 13.74 2.152" }], ["circle", { cx: "12", cy: "12", r: "3" }], ["circle", { cx: "19", cy: "5", r: "2" }], ["circle", { cx: "5", cy: "19", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/origami.js var Origami; var init_origami = __esmMin((() => { Origami = [ ["path", { d: "M12 12V4a1 1 0 0 1 1-1h6.297a1 1 0 0 1 .651 1.759l-4.696 4.025" }], ["path", { d: "m12 21-7.414-7.414A2 2 0 0 1 4 12.172V6.415a1.002 1.002 0 0 1 1.707-.707L20 20.009" }], ["path", { d: "m12.214 3.381 8.414 14.966a1 1 0 0 1-.167 1.199l-1.168 1.163a1 1 0 0 1-.706.291H6.351a1 1 0 0 1-.625-.219L3.25 18.8a1 1 0 0 1 .631-1.781l4.165.027" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/package-2.js var Package2; var init_package_2 = __esmMin((() => { Package2 = [ ["path", { d: "M12 3v6" }], ["path", { d: "M16.76 3a2 2 0 0 1 1.8 1.1l2.23 4.479a2 2 0 0 1 .21.891V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9.472a2 2 0 0 1 .211-.894L5.45 4.1A2 2 0 0 1 7.24 3z" }], ["path", { d: "M3.054 9.013h17.893" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/package-check.js var PackageCheck; var init_package_check = __esmMin((() => { PackageCheck = [ ["path", { d: "m16 16 2 2 4-4" }], ["path", { d: "M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14" }], ["path", { d: "m7.5 4.27 9 5.15" }], ["polyline", { points: "3.29 7 12 12 20.71 7" }], ["line", { x1: "12", x2: "12", y1: "22", y2: "12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/package-minus.js var PackageMinus; var init_package_minus = __esmMin((() => { PackageMinus = [ ["path", { d: "M16 16h6" }], ["path", { d: "M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14" }], ["path", { d: "m7.5 4.27 9 5.15" }], ["polyline", { points: "3.29 7 12 12 20.71 7" }], ["line", { x1: "12", x2: "12", y1: "22", y2: "12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/package-open.js var PackageOpen; var init_package_open = __esmMin((() => { PackageOpen = [ ["path", { d: "M12 22v-9" }], ["path", { d: "M15.17 2.21a1.67 1.67 0 0 1 1.63 0L21 4.57a1.93 1.93 0 0 1 0 3.36L8.82 14.79a1.655 1.655 0 0 1-1.64 0L3 12.43a1.93 1.93 0 0 1 0-3.36z" }], ["path", { d: "M20 13v3.87a2.06 2.06 0 0 1-1.11 1.83l-6 3.08a1.93 1.93 0 0 1-1.78 0l-6-3.08A2.06 2.06 0 0 1 4 16.87V13" }], ["path", { d: "M21 12.43a1.93 1.93 0 0 0 0-3.36L8.83 2.2a1.64 1.64 0 0 0-1.63 0L3 4.57a1.93 1.93 0 0 0 0 3.36l12.18 6.86a1.636 1.636 0 0 0 1.63 0z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/package-plus.js var PackagePlus; var init_package_plus = __esmMin((() => { PackagePlus = [ ["path", { d: "M16 16h6" }], ["path", { d: "M19 13v6" }], ["path", { d: "M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14" }], ["path", { d: "m7.5 4.27 9 5.15" }], ["polyline", { points: "3.29 7 12 12 20.71 7" }], ["line", { x1: "12", x2: "12", y1: "22", y2: "12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/package-search.js var PackageSearch; var init_package_search = __esmMin((() => { PackageSearch = [ ["path", { d: "M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14" }], ["path", { d: "m7.5 4.27 9 5.15" }], ["polyline", { points: "3.29 7 12 12 20.71 7" }], ["line", { x1: "12", x2: "12", y1: "22", y2: "12" }], ["circle", { cx: "18.5", cy: "15.5", r: "2.5" }], ["path", { d: "M20.27 17.27 22 19" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/package-x.js var PackageX; var init_package_x = __esmMin((() => { PackageX = [ ["path", { d: "M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14" }], ["path", { d: "m7.5 4.27 9 5.15" }], ["polyline", { points: "3.29 7 12 12 20.71 7" }], ["line", { x1: "12", x2: "12", y1: "22", y2: "12" }], ["path", { d: "m17 13 5 5m-5 0 5-5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/package.js var Package; var init_package = __esmMin((() => { Package = [ ["path", { d: "M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z" }], ["path", { d: "M12 22V12" }], ["polyline", { points: "3.29 7 12 12 20.71 7" }], ["path", { d: "m7.5 4.27 9 5.15" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/paint-bucket.js var PaintBucket; var init_paint_bucket = __esmMin((() => { PaintBucket = [ ["path", { d: "m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z" }], ["path", { d: "m5 2 5 5" }], ["path", { d: "M2 13h15" }], ["path", { d: "M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/paint-roller.js var PaintRoller; var init_paint_roller = __esmMin((() => { PaintRoller = [ ["rect", { width: "16", height: "6", x: "2", y: "2", rx: "2" }], ["path", { d: "M10 16v-2a2 2 0 0 1 2-2h8a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2" }], ["rect", { width: "4", height: "6", x: "8", y: "16", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/paintbrush-vertical.js var PaintbrushVertical; var init_paintbrush_vertical = __esmMin((() => { PaintbrushVertical = [ ["path", { d: "M10 2v2" }], ["path", { d: "M14 2v4" }], ["path", { d: "M17 2a1 1 0 0 1 1 1v9H6V3a1 1 0 0 1 1-1z" }], ["path", { d: "M6 12a1 1 0 0 0-1 1v1a2 2 0 0 0 2 2h2a1 1 0 0 1 1 1v2.9a2 2 0 1 0 4 0V17a1 1 0 0 1 1-1h2a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/paintbrush.js var Paintbrush; var init_paintbrush = __esmMin((() => { Paintbrush = [ ["path", { d: "m14.622 17.897-10.68-2.913" }], ["path", { d: "M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z" }], ["path", { d: "M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/palette.js var Palette; var init_palette = __esmMin((() => { Palette = [ ["path", { d: "M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z" }], ["circle", { cx: "13.5", cy: "6.5", r: ".5", fill: "currentColor" }], ["circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor" }], ["circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor" }], ["circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panda.js var Panda; var init_panda = __esmMin((() => { Panda = [ ["path", { d: "M11.25 17.25h1.5L12 18z" }], ["path", { d: "m15 12 2 2" }], ["path", { d: "M18 6.5a.5.5 0 0 0-.5-.5" }], ["path", { d: "M20.69 9.67a4.5 4.5 0 1 0-7.04-5.5 8.35 8.35 0 0 0-3.3 0 4.5 4.5 0 1 0-7.04 5.5C2.49 11.2 2 12.88 2 14.5 2 19.47 6.48 22 12 22s10-2.53 10-7.5c0-1.62-.48-3.3-1.3-4.83" }], ["path", { d: "M6 6.5a.495.495 0 0 1 .5-.5" }], ["path", { d: "m9 12-2 2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panel-bottom-close.js var PanelBottomClose; var init_panel_bottom_close = __esmMin((() => { PanelBottomClose = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M3 15h18" }], ["path", { d: "m15 8-3 3-3-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panel-bottom-dashed.js var PanelBottomDashed; var init_panel_bottom_dashed = __esmMin((() => { PanelBottomDashed = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M14 15h1" }], ["path", { d: "M19 15h2" }], ["path", { d: "M3 15h2" }], ["path", { d: "M9 15h1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panel-bottom.js var PanelBottom; var init_panel_bottom = __esmMin((() => { PanelBottom = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M3 15h18" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panel-bottom-open.js var PanelBottomOpen; var init_panel_bottom_open = __esmMin((() => { PanelBottomOpen = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M3 15h18" }], ["path", { d: "m9 10 3-3 3 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panel-left-close.js var PanelLeftClose; var init_panel_left_close = __esmMin((() => { PanelLeftClose = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M9 3v18" }], ["path", { d: "m16 15-3-3 3-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panel-left-dashed.js var PanelLeftDashed; var init_panel_left_dashed = __esmMin((() => { PanelLeftDashed = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M9 14v1" }], ["path", { d: "M9 19v2" }], ["path", { d: "M9 3v2" }], ["path", { d: "M9 9v1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panel-left-open.js var PanelLeftOpen; var init_panel_left_open = __esmMin((() => { PanelLeftOpen = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M9 3v18" }], ["path", { d: "m14 9 3 3-3 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panel-left-right-dashed.js var PanelLeftRightDashed; var init_panel_left_right_dashed = __esmMin((() => { PanelLeftRightDashed = [ ["path", { d: "M15 10V9" }], ["path", { d: "M15 15v-1" }], ["path", { d: "M15 21v-2" }], ["path", { d: "M15 5V3" }], ["path", { d: "M9 10V9" }], ["path", { d: "M9 15v-1" }], ["path", { d: "M9 21v-2" }], ["path", { d: "M9 5V3" }], ["rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panel-left.js var PanelLeft; var init_panel_left = __esmMin((() => { PanelLeft = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M9 3v18" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panel-right-close.js var PanelRightClose; var init_panel_right_close = __esmMin((() => { PanelRightClose = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M15 3v18" }], ["path", { d: "m8 9 3 3-3 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panel-right-open.js var PanelRightOpen; var init_panel_right_open = __esmMin((() => { PanelRightOpen = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M15 3v18" }], ["path", { d: "m10 15-3-3 3-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panel-right-dashed.js var PanelRightDashed; var init_panel_right_dashed = __esmMin((() => { PanelRightDashed = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M15 14v1" }], ["path", { d: "M15 19v2" }], ["path", { d: "M15 3v2" }], ["path", { d: "M15 9v1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panel-top-bottom-dashed.js var PanelTopBottomDashed; var init_panel_top_bottom_dashed = __esmMin((() => { PanelTopBottomDashed = [ ["path", { d: "M14 15h1" }], ["path", { d: "M14 9h1" }], ["path", { d: "M19 15h2" }], ["path", { d: "M19 9h2" }], ["path", { d: "M3 15h2" }], ["path", { d: "M3 9h2" }], ["path", { d: "M9 15h1" }], ["path", { d: "M9 9h1" }], ["rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panel-right.js var PanelRight; var init_panel_right = __esmMin((() => { PanelRight = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M15 3v18" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panel-top-close.js var PanelTopClose; var init_panel_top_close = __esmMin((() => { PanelTopClose = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M3 9h18" }], ["path", { d: "m9 16 3-3 3 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panel-top-dashed.js var PanelTopDashed; var init_panel_top_dashed = __esmMin((() => { PanelTopDashed = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M14 9h1" }], ["path", { d: "M19 9h2" }], ["path", { d: "M3 9h2" }], ["path", { d: "M9 9h1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panel-top-open.js var PanelTopOpen; var init_panel_top_open = __esmMin((() => { PanelTopOpen = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M3 9h18" }], ["path", { d: "m15 14-3 3-3-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panel-top.js var PanelTop; var init_panel_top = __esmMin((() => { PanelTop = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M3 9h18" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panels-left-bottom.js var PanelsLeftBottom; var init_panels_left_bottom = __esmMin((() => { PanelsLeftBottom = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M9 3v18" }], ["path", { d: "M9 15h12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panels-right-bottom.js var PanelsRightBottom; var init_panels_right_bottom = __esmMin((() => { PanelsRightBottom = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M3 15h12" }], ["path", { d: "M15 3v18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/panels-top-left.js var PanelsTopLeft; var init_panels_top_left = __esmMin((() => { PanelsTopLeft = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M3 9h18" }], ["path", { d: "M9 21V9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/paperclip.js var Paperclip; var init_paperclip = __esmMin((() => { Paperclip = [["path", { d: "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/parentheses.js var Parentheses; var init_parentheses = __esmMin((() => { Parentheses = [["path", { d: "M8 21s-4-3-4-9 4-9 4-9" }], ["path", { d: "M16 3s4 3 4 9-4 9-4 9" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/parking-meter.js var ParkingMeter; var init_parking_meter = __esmMin((() => { ParkingMeter = [ ["path", { d: "M11 15h2" }], ["path", { d: "M12 12v3" }], ["path", { d: "M12 19v3" }], ["path", { d: "M15.282 19a1 1 0 0 0 .948-.68l2.37-6.988a7 7 0 1 0-13.2 0l2.37 6.988a1 1 0 0 0 .948.68z" }], ["path", { d: "M9 9a3 3 0 1 1 6 0" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/party-popper.js var PartyPopper; var init_party_popper = __esmMin((() => { PartyPopper = [ ["path", { d: "M5.8 11.3 2 22l10.7-3.79" }], ["path", { d: "M4 3h.01" }], ["path", { d: "M22 8h.01" }], ["path", { d: "M15 2h.01" }], ["path", { d: "M22 20h.01" }], ["path", { d: "m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10" }], ["path", { d: "m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17" }], ["path", { d: "m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7" }], ["path", { d: "M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pause.js var Pause; var init_pause = __esmMin((() => { Pause = [["rect", { x: "14", y: "3", width: "5", height: "18", rx: "1" }], ["rect", { x: "5", y: "3", width: "5", height: "18", rx: "1" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/paw-print.js var PawPrint; var init_paw_print = __esmMin((() => { PawPrint = [ ["circle", { cx: "11", cy: "4", r: "2" }], ["circle", { cx: "18", cy: "8", r: "2" }], ["circle", { cx: "20", cy: "16", r: "2" }], ["path", { d: "M9 10a5 5 0 0 1 5 5v3.5a3.5 3.5 0 0 1-6.84 1.045Q6.52 17.48 4.46 16.84A3.5 3.5 0 0 1 5.5 10Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pc-case.js var PcCase; var init_pc_case = __esmMin((() => { PcCase = [ ["rect", { width: "14", height: "20", x: "5", y: "2", rx: "2" }], ["path", { d: "M15 14h.01" }], ["path", { d: "M9 6h6" }], ["path", { d: "M9 10h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pen-line.js var PenLine; var init_pen_line = __esmMin((() => { PenLine = [["path", { d: "M13 21h8" }], ["path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pen-off.js var PenOff; var init_pen_off = __esmMin((() => { PenOff = [ ["path", { d: "m10 10-6.157 6.162a2 2 0 0 0-.5.833l-1.322 4.36a.5.5 0 0 0 .622.624l4.358-1.323a2 2 0 0 0 .83-.5L14 13.982" }], ["path", { d: "m12.829 7.172 4.359-4.346a1 1 0 1 1 3.986 3.986l-4.353 4.353" }], ["path", { d: "m2 2 20 20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pen-tool.js var PenTool; var init_pen_tool = __esmMin((() => { PenTool = [ ["path", { d: "M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z" }], ["path", { d: "m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18" }], ["path", { d: "m2.3 2.3 7.286 7.286" }], ["circle", { cx: "11", cy: "11", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pen.js var Pen; var init_pen = __esmMin((() => { Pen = [["path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pencil-line.js var PencilLine; var init_pencil_line = __esmMin((() => { PencilLine = [ ["path", { d: "M13 21h8" }], ["path", { d: "m15 5 4 4" }], ["path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pencil-off.js var PencilOff; var init_pencil_off = __esmMin((() => { PencilOff = [ ["path", { d: "m10 10-6.157 6.162a2 2 0 0 0-.5.833l-1.322 4.36a.5.5 0 0 0 .622.624l4.358-1.323a2 2 0 0 0 .83-.5L14 13.982" }], ["path", { d: "m12.829 7.172 4.359-4.346a1 1 0 1 1 3.986 3.986l-4.353 4.353" }], ["path", { d: "m15 5 4 4" }], ["path", { d: "m2 2 20 20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pencil-ruler.js var PencilRuler; var init_pencil_ruler = __esmMin((() => { PencilRuler = [ ["path", { d: "M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13" }], ["path", { d: "m8 6 2-2" }], ["path", { d: "m18 16 2-2" }], ["path", { d: "m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17" }], ["path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }], ["path", { d: "m15 5 4 4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pencil.js var Pencil; var init_pencil = __esmMin((() => { Pencil = [["path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }], ["path", { d: "m15 5 4 4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pentagon.js var Pentagon; var init_pentagon = __esmMin((() => { Pentagon = [["path", { d: "M10.83 2.38a2 2 0 0 1 2.34 0l8 5.74a2 2 0 0 1 .73 2.25l-3.04 9.26a2 2 0 0 1-1.9 1.37H7.04a2 2 0 0 1-1.9-1.37L2.1 10.37a2 2 0 0 1 .73-2.25z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/percent.js var Percent; var init_percent = __esmMin((() => { Percent = [ ["line", { x1: "19", x2: "5", y1: "5", y2: "19" }], ["circle", { cx: "6.5", cy: "6.5", r: "2.5" }], ["circle", { cx: "17.5", cy: "17.5", r: "2.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/person-standing.js var PersonStanding; var init_person_standing = __esmMin((() => { PersonStanding = [ ["circle", { cx: "12", cy: "5", r: "1" }], ["path", { d: "m9 20 3-6 3 6" }], ["path", { d: "m6 8 6 2 6-2" }], ["path", { d: "M12 10v4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/philippine-peso.js var PhilippinePeso; var init_philippine_peso = __esmMin((() => { PhilippinePeso = [ ["path", { d: "M20 11H4" }], ["path", { d: "M20 7H4" }], ["path", { d: "M7 21V4a1 1 0 0 1 1-1h4a1 1 0 0 1 0 12H7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/phone-call.js var PhoneCall; var init_phone_call = __esmMin((() => { PhoneCall = [ ["path", { d: "M13 2a9 9 0 0 1 9 9" }], ["path", { d: "M13 6a5 5 0 0 1 5 5" }], ["path", { d: "M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/phone-forwarded.js var PhoneForwarded; var init_phone_forwarded = __esmMin((() => { PhoneForwarded = [ ["path", { d: "M14 6h8" }], ["path", { d: "m18 2 4 4-4 4" }], ["path", { d: "M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/phone-incoming.js var PhoneIncoming; var init_phone_incoming = __esmMin((() => { PhoneIncoming = [ ["path", { d: "M16 2v6h6" }], ["path", { d: "m22 2-6 6" }], ["path", { d: "M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/phone-missed.js var PhoneMissed; var init_phone_missed = __esmMin((() => { PhoneMissed = [ ["path", { d: "m16 2 6 6" }], ["path", { d: "m22 2-6 6" }], ["path", { d: "M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/phone-off.js var PhoneOff; var init_phone_off = __esmMin((() => { PhoneOff = [ ["path", { d: "M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272" }], ["path", { d: "M22 2 2 22" }], ["path", { d: "M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/phone-outgoing.js var PhoneOutgoing; var init_phone_outgoing = __esmMin((() => { PhoneOutgoing = [ ["path", { d: "m16 8 6-6" }], ["path", { d: "M22 8V2h-6" }], ["path", { d: "M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/phone.js var Phone; var init_phone = __esmMin((() => { Phone = [["path", { d: "M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pi.js var Pi; var init_pi = __esmMin((() => { Pi = [ ["line", { x1: "9", x2: "9", y1: "4", y2: "20" }], ["path", { d: "M4 7c0-1.7 1.3-3 3-3h13" }], ["path", { d: "M18 20c-1.7 0-3-1.3-3-3V4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/piano.js var Piano; var init_piano = __esmMin((() => { Piano = [ ["path", { d: "M18.5 8c-1.4 0-2.6-.8-3.2-2A6.87 6.87 0 0 0 2 9v11a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-8.5C22 9.6 20.4 8 18.5 8" }], ["path", { d: "M2 14h20" }], ["path", { d: "M6 14v4" }], ["path", { d: "M10 14v4" }], ["path", { d: "M14 14v4" }], ["path", { d: "M18 14v4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pickaxe.js var Pickaxe; var init_pickaxe = __esmMin((() => { Pickaxe = [ ["path", { d: "m14 13-8.381 8.38a1 1 0 0 1-3.001-3L11 9.999" }], ["path", { d: "M15.973 4.027A13 13 0 0 0 5.902 2.373c-1.398.342-1.092 2.158.277 2.601a19.9 19.9 0 0 1 5.822 3.024" }], ["path", { d: "M16.001 11.999a19.9 19.9 0 0 1 3.024 5.824c.444 1.369 2.26 1.676 2.603.278A13 13 0 0 0 20 8.069" }], ["path", { d: "M18.352 3.352a1.205 1.205 0 0 0-1.704 0l-5.296 5.296a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l5.296-5.296a1.205 1.205 0 0 0 0-1.704z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/picture-in-picture-2.js var PictureInPicture2; var init_picture_in_picture_2 = __esmMin((() => { PictureInPicture2 = [["path", { d: "M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4" }], ["rect", { width: "10", height: "7", x: "12", y: "13", rx: "2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/picture-in-picture.js var PictureInPicture; var init_picture_in_picture = __esmMin((() => { PictureInPicture = [ ["path", { d: "M2 10h6V4" }], ["path", { d: "m2 4 6 6" }], ["path", { d: "M21 10V7a2 2 0 0 0-2-2h-7" }], ["path", { d: "M3 14v2a2 2 0 0 0 2 2h3" }], ["rect", { x: "12", y: "14", width: "10", height: "7", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/piggy-bank.js var PiggyBank; var init_piggy_bank = __esmMin((() => { PiggyBank = [ ["path", { d: "M11 17h3v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a3.16 3.16 0 0 0 2-2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-1a5 5 0 0 0-2-4V3a4 4 0 0 0-3.2 1.6l-.3.4H11a6 6 0 0 0-6 6v1a5 5 0 0 0 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z" }], ["path", { d: "M16 10h.01" }], ["path", { d: "M2 8v1a2 2 0 0 0 2 2h1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pilcrow-left.js var PilcrowLeft; var init_pilcrow_left = __esmMin((() => { PilcrowLeft = [ ["path", { d: "M14 3v11" }], ["path", { d: "M14 9h-3a3 3 0 0 1 0-6h9" }], ["path", { d: "M18 3v11" }], ["path", { d: "M22 18H2l4-4" }], ["path", { d: "m6 22-4-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pilcrow.js var Pilcrow; var init_pilcrow = __esmMin((() => { Pilcrow = [ ["path", { d: "M13 4v16" }], ["path", { d: "M17 4v16" }], ["path", { d: "M19 4H9.5a4.5 4.5 0 0 0 0 9H13" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pilcrow-right.js var PilcrowRight; var init_pilcrow_right = __esmMin((() => { PilcrowRight = [ ["path", { d: "M10 3v11" }], ["path", { d: "M10 9H7a1 1 0 0 1 0-6h8" }], ["path", { d: "M14 3v11" }], ["path", { d: "m18 14 4 4H2" }], ["path", { d: "m22 18-4 4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pill-bottle.js var PillBottle; var init_pill_bottle = __esmMin((() => { PillBottle = [ ["path", { d: "M18 11h-4a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h4" }], ["path", { d: "M6 7v13a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7" }], ["rect", { width: "16", height: "5", x: "4", y: "2", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pill.js var Pill; var init_pill = __esmMin((() => { Pill = [["path", { d: "m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z" }], ["path", { d: "m8.5 8.5 7 7" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pin-off.js var PinOff; var init_pin_off = __esmMin((() => { PinOff = [ ["path", { d: "M12 17v5" }], ["path", { d: "M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pin.js var Pin; var init_pin = __esmMin((() => { Pin = [["path", { d: "M12 17v5" }], ["path", { d: "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pipette.js var Pipette; var init_pipette = __esmMin((() => { Pipette = [ ["path", { d: "m12 9-8.414 8.414A2 2 0 0 0 3 18.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 3.828 21h1.344a2 2 0 0 0 1.414-.586L15 12" }], ["path", { d: "m18 9 .4.4a1 1 0 1 1-3 3l-3.8-3.8a1 1 0 1 1 3-3l.4.4 3.4-3.4a1 1 0 1 1 3 3z" }], ["path", { d: "m2 22 .414-.414" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pizza.js var Pizza; var init_pizza = __esmMin((() => { Pizza = [ ["path", { d: "m12 14-1 1" }], ["path", { d: "m13.75 18.25-1.25 1.42" }], ["path", { d: "M17.775 5.654a15.68 15.68 0 0 0-12.121 12.12" }], ["path", { d: "M18.8 9.3a1 1 0 0 0 2.1 7.7" }], ["path", { d: "M21.964 20.732a1 1 0 0 1-1.232 1.232l-18-5a1 1 0 0 1-.695-1.232A19.68 19.68 0 0 1 15.732 2.037a1 1 0 0 1 1.232.695z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/plane-landing.js var PlaneLanding; var init_plane_landing = __esmMin((() => { PlaneLanding = [["path", { d: "M2 22h20" }], ["path", { d: "M3.77 10.77 2 9l2-4.5 1.1.55c.55.28.9.84.9 1.45s.35 1.17.9 1.45L8 8.5l3-6 1.05.53a2 2 0 0 1 1.09 1.52l.72 5.4a2 2 0 0 0 1.09 1.52l4.4 2.2c.42.22.78.55 1.01.96l.6 1.03c.49.88-.06 1.98-1.06 2.1l-1.18.15c-.47.06-.95-.02-1.37-.24L4.29 11.15a2 2 0 0 1-.52-.38Z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/plane-takeoff.js var PlaneTakeoff; var init_plane_takeoff = __esmMin((() => { PlaneTakeoff = [["path", { d: "M2 22h20" }], ["path", { d: "M6.36 17.4 4 17l-2-4 1.1-.55a2 2 0 0 1 1.8 0l.17.1a2 2 0 0 0 1.8 0L8 12 5 6l.9-.45a2 2 0 0 1 2.09.2l4.02 3a2 2 0 0 0 2.1.2l4.19-2.06a2.41 2.41 0 0 1 1.73-.17L21 7a1.4 1.4 0 0 1 .87 1.99l-.38.76c-.23.46-.6.84-1.07 1.08L7.58 17.2a2 2 0 0 1-1.22.18Z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/plane.js var Plane; var init_plane = __esmMin((() => { Plane = [["path", { d: "M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/play.js var Play; var init_play = __esmMin((() => { Play = [["path", { d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/plug-2.js var Plug2; var init_plug_2 = __esmMin((() => { Plug2 = [ ["path", { d: "M9 2v6" }], ["path", { d: "M15 2v6" }], ["path", { d: "M12 17v5" }], ["path", { d: "M5 8h14" }], ["path", { d: "M6 11V8h12v3a6 6 0 1 1-12 0Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/plug-zap.js var PlugZap; var init_plug_zap = __esmMin((() => { PlugZap = [ ["path", { d: "M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z" }], ["path", { d: "m2 22 3-3" }], ["path", { d: "M7.5 13.5 10 11" }], ["path", { d: "M10.5 16.5 13 14" }], ["path", { d: "m18 3-4 4h6l-4 4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/plug.js var Plug; var init_plug = __esmMin((() => { Plug = [ ["path", { d: "M12 22v-5" }], ["path", { d: "M15 8V2" }], ["path", { d: "M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z" }], ["path", { d: "M9 8V2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/plus.js var Plus; var init_plus = __esmMin((() => { Plus = [["path", { d: "M5 12h14" }], ["path", { d: "M12 5v14" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pocket-knife.js var PocketKnife; var init_pocket_knife = __esmMin((() => { PocketKnife = [ ["path", { d: "M3 2v1c0 1 2 1 2 2S3 6 3 7s2 1 2 2-2 1-2 2 2 1 2 2" }], ["path", { d: "M18 6h.01" }], ["path", { d: "M6 18h.01" }], ["path", { d: "M20.83 8.83a4 4 0 0 0-5.66-5.66l-12 12a4 4 0 1 0 5.66 5.66Z" }], ["path", { d: "M18 11.66V22a4 4 0 0 0 4-4V6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pocket.js var Pocket; var init_pocket = __esmMin((() => { Pocket = [["path", { d: "M20 3a2 2 0 0 1 2 2v6a1 1 0 0 1-20 0V5a2 2 0 0 1 2-2z" }], ["path", { d: "m8 10 4 4 4-4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/podcast.js var Podcast; var init_podcast = __esmMin((() => { Podcast = [ ["path", { d: "M13 17a1 1 0 1 0-2 0l.5 4.5a0.5 0.5 0 0 0 1 0z", fill: "currentColor" }], ["path", { d: "M16.85 18.58a9 9 0 1 0-9.7 0" }], ["path", { d: "M8 14a5 5 0 1 1 8 0" }], ["circle", { cx: "12", cy: "11", r: "1", fill: "currentColor" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pointer-off.js var PointerOff; var init_pointer_off = __esmMin((() => { PointerOff = [ ["path", { d: "M10 4.5V4a2 2 0 0 0-2.41-1.957" }], ["path", { d: "M13.9 8.4a2 2 0 0 0-1.26-1.295" }], ["path", { d: "M21.7 16.2A8 8 0 0 0 22 14v-3a2 2 0 1 0-4 0v-1a2 2 0 0 0-3.63-1.158" }], ["path", { d: "m7 15-1.8-1.8a2 2 0 0 0-2.79 2.86L6 19.7a7.74 7.74 0 0 0 6 2.3h2a8 8 0 0 0 5.657-2.343" }], ["path", { d: "M6 6v8" }], ["path", { d: "m2 2 20 20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pointer.js var Pointer; var init_pointer = __esmMin((() => { Pointer = [ ["path", { d: "M22 14a8 8 0 0 1-8 8" }], ["path", { d: "M18 11v-1a2 2 0 0 0-2-2a2 2 0 0 0-2 2" }], ["path", { d: "M14 10V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1" }], ["path", { d: "M10 9.5V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v10" }], ["path", { d: "M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/popcorn.js var Popcorn; var init_popcorn = __esmMin((() => { Popcorn = [ ["path", { d: "M18 8a2 2 0 0 0 0-4 2 2 0 0 0-4 0 2 2 0 0 0-4 0 2 2 0 0 0-4 0 2 2 0 0 0 0 4" }], ["path", { d: "M10 22 9 8" }], ["path", { d: "m14 22 1-14" }], ["path", { d: "M20 8c.5 0 .9.4.8 1l-2.6 12c-.1.5-.7 1-1.2 1H7c-.6 0-1.1-.4-1.2-1L3.2 9c-.1-.6.3-1 .8-1Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/popsicle.js var Popsicle; var init_popsicle = __esmMin((() => { Popsicle = [["path", { d: "M18.6 14.4c.8-.8.8-2 0-2.8l-8.1-8.1a4.95 4.95 0 1 0-7.1 7.1l8.1 8.1c.9.7 2.1.7 2.9-.1Z" }], ["path", { d: "m22 22-5.5-5.5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pound-sterling.js var PoundSterling; var init_pound_sterling = __esmMin((() => { PoundSterling = [ ["path", { d: "M18 7c0-5.333-8-5.333-8 0" }], ["path", { d: "M10 7v14" }], ["path", { d: "M6 21h12" }], ["path", { d: "M6 13h10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/power-off.js var PowerOff; var init_power_off = __esmMin((() => { PowerOff = [ ["path", { d: "M18.36 6.64A9 9 0 0 1 20.77 15" }], ["path", { d: "M6.16 6.16a9 9 0 1 0 12.68 12.68" }], ["path", { d: "M12 2v4" }], ["path", { d: "m2 2 20 20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/power.js var Power; var init_power = __esmMin((() => { Power = [["path", { d: "M12 2v10" }], ["path", { d: "M18.4 6.6a9 9 0 1 1-12.77.04" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/presentation.js var Presentation; var init_presentation = __esmMin((() => { Presentation = [ ["path", { d: "M2 3h20" }], ["path", { d: "M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3" }], ["path", { d: "m7 21 5-5 5 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/printer-check.js var PrinterCheck; var init_printer_check = __esmMin((() => { PrinterCheck = [ ["path", { d: "M13.5 22H7a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v.5" }], ["path", { d: "m16 19 2 2 4-4" }], ["path", { d: "M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v2" }], ["path", { d: "M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/projector.js var Projector; var init_projector = __esmMin((() => { Projector = [ ["path", { d: "M5 7 3 5" }], ["path", { d: "M9 6V3" }], ["path", { d: "m13 7 2-2" }], ["circle", { cx: "9", cy: "13", r: "3" }], ["path", { d: "M11.83 12H20a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h2.17" }], ["path", { d: "M16 16h2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/printer.js var Printer; var init_printer = __esmMin((() => { Printer = [ ["path", { d: "M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2" }], ["path", { d: "M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6" }], ["rect", { x: "6", y: "14", width: "12", height: "8", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/proportions.js var Proportions; var init_proportions = __esmMin((() => { Proportions = [ ["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2" }], ["path", { d: "M12 9v11" }], ["path", { d: "M2 9h13a2 2 0 0 1 2 2v9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/puzzle.js var Puzzle; var init_puzzle = __esmMin((() => { Puzzle = [["path", { d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/pyramid.js var Pyramid; var init_pyramid = __esmMin((() => { Pyramid = [["path", { d: "M2.5 16.88a1 1 0 0 1-.32-1.43l9-13.02a1 1 0 0 1 1.64 0l9 13.01a1 1 0 0 1-.32 1.44l-8.51 4.86a2 2 0 0 1-1.98 0Z" }], ["path", { d: "M12 2v20" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/qr-code.js var QrCode; var init_qr_code = __esmMin((() => { QrCode = [ ["rect", { width: "5", height: "5", x: "3", y: "3", rx: "1" }], ["rect", { width: "5", height: "5", x: "16", y: "3", rx: "1" }], ["rect", { width: "5", height: "5", x: "3", y: "16", rx: "1" }], ["path", { d: "M21 16h-3a2 2 0 0 0-2 2v3" }], ["path", { d: "M21 21v.01" }], ["path", { d: "M12 7v3a2 2 0 0 1-2 2H7" }], ["path", { d: "M3 12h.01" }], ["path", { d: "M12 3h.01" }], ["path", { d: "M12 16v.01" }], ["path", { d: "M16 12h1" }], ["path", { d: "M21 12v.01" }], ["path", { d: "M12 21v-1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/quote.js var Quote; var init_quote = __esmMin((() => { Quote = [["path", { d: "M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z" }], ["path", { d: "M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rabbit.js var Rabbit; var init_rabbit = __esmMin((() => { Rabbit = [ ["path", { d: "M13 16a3 3 0 0 1 2.24 5" }], ["path", { d: "M18 12h.01" }], ["path", { d: "M18 21h-8a4 4 0 0 1-4-4 7 7 0 0 1 7-7h.2L9.6 6.4a1 1 0 1 1 2.8-2.8L15.8 7h.2c3.3 0 6 2.7 6 6v1a2 2 0 0 1-2 2h-1a3 3 0 0 0-3 3" }], ["path", { d: "M20 8.54V4a2 2 0 1 0-4 0v3" }], ["path", { d: "M7.612 12.524a3 3 0 1 0-1.6 4.3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/radar.js var Radar; var init_radar = __esmMin((() => { Radar = [ ["path", { d: "M19.07 4.93A10 10 0 0 0 6.99 3.34" }], ["path", { d: "M4 6h.01" }], ["path", { d: "M2.29 9.62A10 10 0 1 0 21.31 8.35" }], ["path", { d: "M16.24 7.76A6 6 0 1 0 8.23 16.67" }], ["path", { d: "M12 18h.01" }], ["path", { d: "M17.99 11.66A6 6 0 0 1 15.77 16.67" }], ["circle", { cx: "12", cy: "12", r: "2" }], ["path", { d: "m13.41 10.59 5.66-5.66" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/radiation.js var Radiation; var init_radiation = __esmMin((() => { Radiation = [ ["path", { d: "M12 12h.01" }], ["path", { d: "M14 15.4641a4 4 0 0 1-4 0L7.52786 19.74597 A 1 1 0 0 0 7.99303 21.16211 10 10 0 0 0 16.00697 21.16211 1 1 0 0 0 16.47214 19.74597z" }], ["path", { d: "M16 12a4 4 0 0 0-2-3.464l2.472-4.282a1 1 0 0 1 1.46-.305 10 10 0 0 1 4.006 6.94A1 1 0 0 1 21 12z" }], ["path", { d: "M8 12a4 4 0 0 1 2-3.464L7.528 4.254a1 1 0 0 0-1.46-.305 10 10 0 0 0-4.006 6.94A1 1 0 0 0 3 12z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/radical.js var Radical; var init_radical = __esmMin((() => { Radical = [["path", { d: "M3 12h3.28a1 1 0 0 1 .948.684l2.298 7.934a.5.5 0 0 0 .96-.044L13.82 4.771A1 1 0 0 1 14.792 4H21" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/radio-receiver.js var RadioReceiver; var init_radio_receiver = __esmMin((() => { RadioReceiver = [ ["path", { d: "M5 16v2" }], ["path", { d: "M19 16v2" }], ["rect", { width: "20", height: "8", x: "2", y: "8", rx: "2" }], ["path", { d: "M18 12h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/radio.js var Radio; var init_radio = __esmMin((() => { Radio = [ ["path", { d: "M16.247 7.761a6 6 0 0 1 0 8.478" }], ["path", { d: "M19.075 4.933a10 10 0 0 1 0 14.134" }], ["path", { d: "M4.925 19.067a10 10 0 0 1 0-14.134" }], ["path", { d: "M7.753 16.239a6 6 0 0 1 0-8.478" }], ["circle", { cx: "12", cy: "12", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/radius.js var Radius; var init_radius = __esmMin((() => { Radius = [ ["path", { d: "M20.34 17.52a10 10 0 1 0-2.82 2.82" }], ["circle", { cx: "19", cy: "19", r: "2" }], ["path", { d: "m13.41 13.41 4.18 4.18" }], ["circle", { cx: "12", cy: "12", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/radio-tower.js var RadioTower; var init_radio_tower = __esmMin((() => { RadioTower = [ ["path", { d: "M4.9 16.1C1 12.2 1 5.8 4.9 1.9" }], ["path", { d: "M7.8 4.7a6.14 6.14 0 0 0-.8 7.5" }], ["circle", { cx: "12", cy: "9", r: "2" }], ["path", { d: "M16.2 4.8c2 2 2.26 5.11.8 7.47" }], ["path", { d: "M19.1 1.9a9.96 9.96 0 0 1 0 14.1" }], ["path", { d: "M9.5 18h5" }], ["path", { d: "m8 22 4-11 4 11" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rail-symbol.js var RailSymbol; var init_rail_symbol = __esmMin((() => { RailSymbol = [ ["path", { d: "M5 15h14" }], ["path", { d: "M5 9h14" }], ["path", { d: "m14 20-5-5 6-6-5-5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rainbow.js var Rainbow; var init_rainbow = __esmMin((() => { Rainbow = [ ["path", { d: "M22 17a10 10 0 0 0-20 0" }], ["path", { d: "M6 17a6 6 0 0 1 12 0" }], ["path", { d: "M10 17a2 2 0 0 1 4 0" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rat.js var Rat; var init_rat = __esmMin((() => { Rat = [ ["path", { d: "M13 22H4a2 2 0 0 1 0-4h12" }], ["path", { d: "M13.236 18a3 3 0 0 0-2.2-5" }], ["path", { d: "M16 9h.01" }], ["path", { d: "M16.82 3.94a3 3 0 1 1 3.237 4.868l1.815 2.587a1.5 1.5 0 0 1-1.5 2.1l-2.872-.453a3 3 0 0 0-3.5 3" }], ["path", { d: "M17 4.988a3 3 0 1 0-5.2 2.052A7 7 0 0 0 4 14.015 4 4 0 0 0 8 18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ratio.js var Ratio; var init_ratio = __esmMin((() => { Ratio = [["rect", { width: "12", height: "20", x: "6", y: "2", rx: "2" }], ["rect", { width: "20", height: "12", x: "2", y: "6", rx: "2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/receipt-cent.js var ReceiptCent; var init_receipt_cent = __esmMin((() => { ReceiptCent = [ ["path", { d: "M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z" }], ["path", { d: "M12 6.5v11" }], ["path", { d: "M15 9.4a4 4 0 1 0 0 5.2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/receipt-euro.js var ReceiptEuro; var init_receipt_euro = __esmMin((() => { ReceiptEuro = [ ["path", { d: "M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z" }], ["path", { d: "M8 12h5" }], ["path", { d: "M16 9.5a4 4 0 1 0 0 5.2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/receipt-indian-rupee.js var ReceiptIndianRupee; var init_receipt_indian_rupee = __esmMin((() => { ReceiptIndianRupee = [ ["path", { d: "M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z" }], ["path", { d: "M8 7h8" }], ["path", { d: "M12 17.5 8 15h1a4 4 0 0 0 0-8" }], ["path", { d: "M8 11h8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/receipt-japanese-yen.js var ReceiptJapaneseYen; var init_receipt_japanese_yen = __esmMin((() => { ReceiptJapaneseYen = [ ["path", { d: "M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z" }], ["path", { d: "m12 10 3-3" }], ["path", { d: "m9 7 3 3v7.5" }], ["path", { d: "M9 11h6" }], ["path", { d: "M9 15h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/receipt-pound-sterling.js var ReceiptPoundSterling; var init_receipt_pound_sterling = __esmMin((() => { ReceiptPoundSterling = [ ["path", { d: "M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z" }], ["path", { d: "M8 13h5" }], ["path", { d: "M10 17V9.5a2.5 2.5 0 0 1 5 0" }], ["path", { d: "M8 17h7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/receipt-russian-ruble.js var ReceiptRussianRuble; var init_receipt_russian_ruble = __esmMin((() => { ReceiptRussianRuble = [ ["path", { d: "M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z" }], ["path", { d: "M8 15h5" }], ["path", { d: "M8 11h5a2 2 0 1 0 0-4h-3v10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/receipt-swiss-franc.js var ReceiptSwissFranc; var init_receipt_swiss_franc = __esmMin((() => { ReceiptSwissFranc = [ ["path", { d: "M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z" }], ["path", { d: "M10 17V7h5" }], ["path", { d: "M10 11h4" }], ["path", { d: "M8 15h5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/receipt-text.js var ReceiptText; var init_receipt_text = __esmMin((() => { ReceiptText = [ ["path", { d: "M13 16H8" }], ["path", { d: "M14 8H8" }], ["path", { d: "M16 12H8" }], ["path", { d: "M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/receipt-turkish-lira.js var ReceiptTurkishLira; var init_receipt_turkish_lira = __esmMin((() => { ReceiptTurkishLira = [ ["path", { d: "M10 6.5v11a5.5 5.5 0 0 0 5.5-5.5" }], ["path", { d: "m14 8-6 3" }], ["path", { d: "M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/receipt.js var Receipt; var init_receipt = __esmMin((() => { Receipt = [ ["path", { d: "M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z" }], ["path", { d: "M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8" }], ["path", { d: "M12 17.5v-11" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rectangle-circle.js var RectangleCircle; var init_rectangle_circle = __esmMin((() => { RectangleCircle = [["path", { d: "M14 4v16H3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1z" }], ["circle", { cx: "14", cy: "12", r: "8" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rectangle-ellipsis.js var RectangleEllipsis; var init_rectangle_ellipsis = __esmMin((() => { RectangleEllipsis = [ ["rect", { width: "20", height: "12", x: "2", y: "6", rx: "2" }], ["path", { d: "M12 12h.01" }], ["path", { d: "M17 12h.01" }], ["path", { d: "M7 12h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rectangle-goggles.js var RectangleGoggles; var init_rectangle_goggles = __esmMin((() => { RectangleGoggles = [["path", { d: "M20 6a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-4a2 2 0 0 1-1.6-.8l-1.6-2.13a1 1 0 0 0-1.6 0L9.6 17.2A2 2 0 0 1 8 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rectangle-horizontal.js var RectangleHorizontal; var init_rectangle_horizontal = __esmMin((() => { RectangleHorizontal = [["rect", { width: "20", height: "12", x: "2", y: "6", rx: "2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rectangle-vertical.js var RectangleVertical; var init_rectangle_vertical = __esmMin((() => { RectangleVertical = [["rect", { width: "12", height: "20", x: "6", y: "2", rx: "2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/recycle.js var Recycle; var init_recycle = __esmMin((() => { Recycle = [ ["path", { d: "M7 19H4.815a1.83 1.83 0 0 1-1.57-.881 1.785 1.785 0 0 1-.004-1.784L7.196 9.5" }], ["path", { d: "M11 19h8.203a1.83 1.83 0 0 0 1.556-.89 1.784 1.784 0 0 0 0-1.775l-1.226-2.12" }], ["path", { d: "m14 16-3 3 3 3" }], ["path", { d: "M8.293 13.596 7.196 9.5 3.1 10.598" }], ["path", { d: "m9.344 5.811 1.093-1.892A1.83 1.83 0 0 1 11.985 3a1.784 1.784 0 0 1 1.546.888l3.943 6.843" }], ["path", { d: "m13.378 9.633 4.096 1.098 1.097-4.096" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/redo-2.js var Redo2; var init_redo_2 = __esmMin((() => { Redo2 = [["path", { d: "m15 14 5-5-5-5" }], ["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/redo-dot.js var RedoDot; var init_redo_dot = __esmMin((() => { RedoDot = [ ["circle", { cx: "12", cy: "17", r: "1" }], ["path", { d: "M21 7v6h-6" }], ["path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/redo.js var Redo; var init_redo = __esmMin((() => { Redo = [["path", { d: "M21 7v6h-6" }], ["path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/refresh-ccw-dot.js var RefreshCcwDot; var init_refresh_ccw_dot = __esmMin((() => { RefreshCcwDot = [ ["path", { d: "M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }], ["path", { d: "M3 3v5h5" }], ["path", { d: "M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16" }], ["path", { d: "M16 16h5v5" }], ["circle", { cx: "12", cy: "12", r: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/refresh-ccw.js var RefreshCcw; var init_refresh_ccw = __esmMin((() => { RefreshCcw = [ ["path", { d: "M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }], ["path", { d: "M3 3v5h5" }], ["path", { d: "M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16" }], ["path", { d: "M16 16h5v5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/refresh-cw-off.js var RefreshCwOff; var init_refresh_cw_off = __esmMin((() => { RefreshCwOff = [ ["path", { d: "M21 8L18.74 5.74A9.75 9.75 0 0 0 12 3C11 3 10.03 3.16 9.13 3.47" }], ["path", { d: "M8 16H3v5" }], ["path", { d: "M3 12C3 9.51 4 7.26 5.64 5.64" }], ["path", { d: "m3 16 2.26 2.26A9.75 9.75 0 0 0 12 21c2.49 0 4.74-1 6.36-2.64" }], ["path", { d: "M21 12c0 1-.16 1.97-.47 2.87" }], ["path", { d: "M21 3v5h-5" }], ["path", { d: "M22 22 2 2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/refresh-cw.js var RefreshCw; var init_refresh_cw = __esmMin((() => { RefreshCw = [ ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }], ["path", { d: "M21 3v5h-5" }], ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }], ["path", { d: "M8 16H3v5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/refrigerator.js var Refrigerator; var init_refrigerator = __esmMin((() => { Refrigerator = [ ["path", { d: "M5 6a4 4 0 0 1 4-4h6a4 4 0 0 1 4 4v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6Z" }], ["path", { d: "M5 10h14" }], ["path", { d: "M15 7v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/regex.js var Regex; var init_regex = __esmMin((() => { Regex = [ ["path", { d: "M17 3v10" }], ["path", { d: "m12.67 5.5 8.66 5" }], ["path", { d: "m12.67 10.5 8.66-5" }], ["path", { d: "M9 17a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/remove-formatting.js var RemoveFormatting; var init_remove_formatting = __esmMin((() => { RemoveFormatting = [ ["path", { d: "M4 7V4h16v3" }], ["path", { d: "M5 20h6" }], ["path", { d: "M13 4 8 20" }], ["path", { d: "m15 15 5 5" }], ["path", { d: "m20 15-5 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/repeat-1.js var Repeat1; var init_repeat_1 = __esmMin((() => { Repeat1 = [ ["path", { d: "m17 2 4 4-4 4" }], ["path", { d: "M3 11v-1a4 4 0 0 1 4-4h14" }], ["path", { d: "m7 22-4-4 4-4" }], ["path", { d: "M21 13v1a4 4 0 0 1-4 4H3" }], ["path", { d: "M11 10h1v4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/repeat-2.js var Repeat2; var init_repeat_2 = __esmMin((() => { Repeat2 = [ ["path", { d: "m2 9 3-3 3 3" }], ["path", { d: "M13 18H7a2 2 0 0 1-2-2V6" }], ["path", { d: "m22 15-3 3-3-3" }], ["path", { d: "M11 6h6a2 2 0 0 1 2 2v10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/repeat.js var Repeat; var init_repeat$2 = __esmMin((() => { Repeat = [ ["path", { d: "m17 2 4 4-4 4" }], ["path", { d: "M3 11v-1a4 4 0 0 1 4-4h14" }], ["path", { d: "m7 22-4-4 4-4" }], ["path", { d: "M21 13v1a4 4 0 0 1-4 4H3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/replace-all.js var ReplaceAll; var init_replace_all = __esmMin((() => { ReplaceAll = [ ["path", { d: "M14 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1" }], ["path", { d: "M14 4a1 1 0 0 1 1-1" }], ["path", { d: "M15 10a1 1 0 0 1-1-1" }], ["path", { d: "M19 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1" }], ["path", { d: "M21 4a1 1 0 0 0-1-1" }], ["path", { d: "M21 9a1 1 0 0 1-1 1" }], ["path", { d: "m3 7 3 3 3-3" }], ["path", { d: "M6 10V5a2 2 0 0 1 2-2h2" }], ["rect", { x: "3", y: "14", width: "7", height: "7", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/replace.js var Replace; var init_replace = __esmMin((() => { Replace = [ ["path", { d: "M14 4a1 1 0 0 1 1-1" }], ["path", { d: "M15 10a1 1 0 0 1-1-1" }], ["path", { d: "M21 4a1 1 0 0 0-1-1" }], ["path", { d: "M21 9a1 1 0 0 1-1 1" }], ["path", { d: "m3 7 3 3 3-3" }], ["path", { d: "M6 10V5a2 2 0 0 1 2-2h2" }], ["rect", { x: "3", y: "14", width: "7", height: "7", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/reply-all.js var ReplyAll; var init_reply_all = __esmMin((() => { ReplyAll = [ ["path", { d: "m12 17-5-5 5-5" }], ["path", { d: "M22 18v-2a4 4 0 0 0-4-4H7" }], ["path", { d: "m7 17-5-5 5-5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/reply.js var Reply; var init_reply = __esmMin((() => { Reply = [["path", { d: "M20 18v-2a4 4 0 0 0-4-4H4" }], ["path", { d: "m9 17-5-5 5-5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rewind.js var Rewind; var init_rewind = __esmMin((() => { Rewind = [["path", { d: "M12 6a2 2 0 0 0-3.414-1.414l-6 6a2 2 0 0 0 0 2.828l6 6A2 2 0 0 0 12 18z" }], ["path", { d: "M22 6a2 2 0 0 0-3.414-1.414l-6 6a2 2 0 0 0 0 2.828l6 6A2 2 0 0 0 22 18z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ribbon.js var Ribbon; var init_ribbon = __esmMin((() => { Ribbon = [ ["path", { d: "M12 11.22C11 9.997 10 9 10 8a2 2 0 0 1 4 0c0 1-.998 2.002-2.01 3.22" }], ["path", { d: "m12 18 2.57-3.5" }], ["path", { d: "M6.243 9.016a7 7 0 0 1 11.507-.009" }], ["path", { d: "M9.35 14.53 12 11.22" }], ["path", { d: "M9.35 14.53C7.728 12.246 6 10.221 6 7a6 5 0 0 1 12 0c-.005 3.22-1.778 5.235-3.43 7.5l3.557 4.527a1 1 0 0 1-.203 1.43l-1.894 1.36a1 1 0 0 1-1.384-.215L12 18l-2.679 3.593a1 1 0 0 1-1.39.213l-1.865-1.353a1 1 0 0 1-.203-1.422z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rocket.js var Rocket; var init_rocket = __esmMin((() => { Rocket = [ ["path", { d: "M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z" }], ["path", { d: "m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z" }], ["path", { d: "M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0" }], ["path", { d: "M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rocking-chair.js var RockingChair; var init_rocking_chair = __esmMin((() => { RockingChair = [ ["polyline", { points: "3.5 2 6.5 12.5 18 12.5" }], ["line", { x1: "9.5", x2: "5.5", y1: "12.5", y2: "20" }], ["line", { x1: "15", x2: "18.5", y1: "12.5", y2: "20" }], ["path", { d: "M2.75 18a13 13 0 0 0 18.5 0" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/roller-coaster.js var RollerCoaster; var init_roller_coaster = __esmMin((() => { RollerCoaster = [ ["path", { d: "M6 19V5" }], ["path", { d: "M10 19V6.8" }], ["path", { d: "M14 19v-7.8" }], ["path", { d: "M18 5v4" }], ["path", { d: "M18 19v-6" }], ["path", { d: "M22 19V9" }], ["path", { d: "M2 19V9a4 4 0 0 1 4-4c2 0 4 1.33 6 4s4 4 6 4a4 4 0 1 0-3-6.65" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rose.js var Rose; var init_rose = __esmMin((() => { Rose = [ ["path", { d: "M17 10h-1a4 4 0 1 1 4-4v.534" }], ["path", { d: "M17 6h1a4 4 0 0 1 1.42 7.74l-2.29.87a6 6 0 0 1-5.339-10.68l2.069-1.31" }], ["path", { d: "M4.5 17c2.8-.5 4.4 0 5.5.8s1.8 2.2 2.3 3.7c-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2" }], ["path", { d: "M9.77 12C4 15 2 22 2 22" }], ["circle", { cx: "17", cy: "8", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rotate-3d.js var Rotate3d; var init_rotate_3d = __esmMin((() => { Rotate3d = [ ["path", { d: "M16.466 7.5C15.643 4.237 13.952 2 12 2 9.239 2 7 6.477 7 12s2.239 10 5 10c.342 0 .677-.069 1-.2" }], ["path", { d: "m15.194 13.707 3.814 1.86-1.86 3.814" }], ["path", { d: "M19 15.57c-1.804.885-4.274 1.43-7 1.43-5.523 0-10-2.239-10-5s4.477-5 10-5c4.838 0 8.873 1.718 9.8 4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rotate-ccw-square.js var RotateCcwSquare; var init_rotate_ccw_square = __esmMin((() => { RotateCcwSquare = [ ["path", { d: "M20 9V7a2 2 0 0 0-2-2h-6" }], ["path", { d: "m15 2-3 3 3 3" }], ["path", { d: "M20 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rotate-ccw-key.js var RotateCcwKey; var init_rotate_ccw_key = __esmMin((() => { RotateCcwKey = [ ["path", { d: "m14.5 9.5 1 1" }], ["path", { d: "m15.5 8.5-4 4" }], ["path", { d: "M3 12a9 9 0 1 0 9-9 9.74 9.74 0 0 0-6.74 2.74L3 8" }], ["path", { d: "M3 3v5h5" }], ["circle", { cx: "10", cy: "14", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rotate-ccw.js var RotateCcw; var init_rotate_ccw = __esmMin((() => { RotateCcw = [["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }], ["path", { d: "M3 3v5h5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rotate-cw-square.js var RotateCwSquare; var init_rotate_cw_square = __esmMin((() => { RotateCwSquare = [ ["path", { d: "M12 5H6a2 2 0 0 0-2 2v3" }], ["path", { d: "m9 8 3-3-3-3" }], ["path", { d: "M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rotate-cw.js var RotateCw; var init_rotate_cw = __esmMin((() => { RotateCw = [["path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8" }], ["path", { d: "M21 3v5h-5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/route-off.js var RouteOff; var init_route_off = __esmMin((() => { RouteOff = [ ["circle", { cx: "6", cy: "19", r: "3" }], ["path", { d: "M9 19h8.5c.4 0 .9-.1 1.3-.2" }], ["path", { d: "M5.2 5.2A3.5 3.53 0 0 0 6.5 12H12" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M21 15.3a3.5 3.5 0 0 0-3.3-3.3" }], ["path", { d: "M15 5h-4.3" }], ["circle", { cx: "18", cy: "5", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/route.js var Route; var init_route = __esmMin((() => { Route = [ ["circle", { cx: "6", cy: "19", r: "3" }], ["path", { d: "M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15" }], ["circle", { cx: "18", cy: "5", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rows-2.js var Rows2; var init_rows_2 = __esmMin((() => { Rows2 = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M3 12h18" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/router.js var Router; var init_router = __esmMin((() => { Router = [ ["rect", { width: "20", height: "8", x: "2", y: "14", rx: "2" }], ["path", { d: "M6.01 18H6" }], ["path", { d: "M10.01 18H10" }], ["path", { d: "M15 10v4" }], ["path", { d: "M17.84 7.17a4 4 0 0 0-5.66 0" }], ["path", { d: "M20.66 4.34a8 8 0 0 0-11.31 0" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rows-3.js var Rows3; var init_rows_3 = __esmMin((() => { Rows3 = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M21 9H3" }], ["path", { d: "M21 15H3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rows-4.js var Rows4; var init_rows_4 = __esmMin((() => { Rows4 = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M21 7.5H3" }], ["path", { d: "M21 12H3" }], ["path", { d: "M21 16.5H3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/rss.js var Rss; var init_rss = __esmMin((() => { Rss = [ ["path", { d: "M4 11a9 9 0 0 1 9 9" }], ["path", { d: "M4 4a16 16 0 0 1 16 16" }], ["circle", { cx: "5", cy: "19", r: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ruler-dimension-line.js var RulerDimensionLine; var init_ruler_dimension_line = __esmMin((() => { RulerDimensionLine = [ ["path", { d: "M10 15v-3" }], ["path", { d: "M14 15v-3" }], ["path", { d: "M18 15v-3" }], ["path", { d: "M2 8V4" }], ["path", { d: "M22 6H2" }], ["path", { d: "M22 8V4" }], ["path", { d: "M6 15v-3" }], ["rect", { x: "2", y: "12", width: "20", height: "8", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ruler.js var Ruler; var init_ruler = __esmMin((() => { Ruler = [ ["path", { d: "M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z" }], ["path", { d: "m14.5 12.5 2-2" }], ["path", { d: "m11.5 9.5 2-2" }], ["path", { d: "m8.5 6.5 2-2" }], ["path", { d: "m17.5 15.5 2-2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/russian-ruble.js var RussianRuble; var init_russian_ruble = __esmMin((() => { RussianRuble = [["path", { d: "M6 11h8a4 4 0 0 0 0-8H9v18" }], ["path", { d: "M6 15h8" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sailboat.js var Sailboat; var init_sailboat = __esmMin((() => { Sailboat = [ ["path", { d: "M10 2v15" }], ["path", { d: "M7 22a4 4 0 0 1-4-4 1 1 0 0 1 1-1h16a1 1 0 0 1 1 1 4 4 0 0 1-4 4z" }], ["path", { d: "M9.159 2.46a1 1 0 0 1 1.521-.193l9.977 8.98A1 1 0 0 1 20 13H4a1 1 0 0 1-.824-1.567z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/salad.js var Salad; var init_salad = __esmMin((() => { Salad = [ ["path", { d: "M7 21h10" }], ["path", { d: "M12 21a9 9 0 0 0 9-9H3a9 9 0 0 0 9 9Z" }], ["path", { d: "M11.38 12a2.4 2.4 0 0 1-.4-4.77 2.4 2.4 0 0 1 3.2-2.77 2.4 2.4 0 0 1 3.47-.63 2.4 2.4 0 0 1 3.37 3.37 2.4 2.4 0 0 1-1.1 3.7 2.51 2.51 0 0 1 .03 1.1" }], ["path", { d: "m13 12 4-4" }], ["path", { d: "M10.9 7.25A3.99 3.99 0 0 0 4 10c0 .73.2 1.41.54 2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sandwich.js var Sandwich; var init_sandwich = __esmMin((() => { Sandwich = [ ["path", { d: "m2.37 11.223 8.372-6.777a2 2 0 0 1 2.516 0l8.371 6.777" }], ["path", { d: "M21 15a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-5.25" }], ["path", { d: "M3 15a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h9" }], ["path", { d: "m6.67 15 6.13 4.6a2 2 0 0 0 2.8-.4l3.15-4.2" }], ["rect", { width: "20", height: "4", x: "2", y: "11", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/satellite-dish.js var SatelliteDish; var init_satellite_dish = __esmMin((() => { SatelliteDish = [ ["path", { d: "M4 10a7.31 7.31 0 0 0 10 10Z" }], ["path", { d: "m9 15 3-3" }], ["path", { d: "M17 13a6 6 0 0 0-6-6" }], ["path", { d: "M21 13A10 10 0 0 0 11 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/satellite.js var Satellite; var init_satellite = __esmMin((() => { Satellite = [ ["path", { d: "m13.5 6.5-3.148-3.148a1.205 1.205 0 0 0-1.704 0L6.352 5.648a1.205 1.205 0 0 0 0 1.704L9.5 10.5" }], ["path", { d: "M16.5 7.5 19 5" }], ["path", { d: "m17.5 10.5 3.148 3.148a1.205 1.205 0 0 1 0 1.704l-2.296 2.296a1.205 1.205 0 0 1-1.704 0L13.5 14.5" }], ["path", { d: "M9 21a6 6 0 0 0-6-6" }], ["path", { d: "M9.352 10.648a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l4.296-4.296a1.205 1.205 0 0 0 0-1.704l-2.296-2.296a1.205 1.205 0 0 0-1.704 0z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/saudi-riyal.js var SaudiRiyal; var init_saudi_riyal = __esmMin((() => { SaudiRiyal = [ ["path", { d: "m20 19.5-5.5 1.2" }], ["path", { d: "M14.5 4v11.22a1 1 0 0 0 1.242.97L20 15.2" }], ["path", { d: "m2.978 19.351 5.549-1.363A2 2 0 0 0 10 16V2" }], ["path", { d: "M20 10 4 13.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/save-all.js var SaveAll; var init_save_all = __esmMin((() => { SaveAll = [ ["path", { d: "M10 2v3a1 1 0 0 0 1 1h5" }], ["path", { d: "M18 18v-6a1 1 0 0 0-1-1h-6a1 1 0 0 0-1 1v6" }], ["path", { d: "M18 22H4a2 2 0 0 1-2-2V6" }], ["path", { d: "M8 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9.172a2 2 0 0 1 1.414.586l2.828 2.828A2 2 0 0 1 22 6.828V16a2 2 0 0 1-2.01 2z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/save-off.js var SaveOff; var init_save_off = __esmMin((() => { SaveOff = [ ["path", { d: "M13 13H8a1 1 0 0 0-1 1v7" }], ["path", { d: "M14 8h1" }], ["path", { d: "M17 21v-4" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M20.41 20.41A2 2 0 0 1 19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 .59-1.41" }], ["path", { d: "M29.5 11.5s5 5 4 5" }], ["path", { d: "M9 3h6.2a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V15" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/save.js var Save; var init_save = __esmMin((() => { Save = [ ["path", { d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" }], ["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" }], ["path", { d: "M7 3v4a1 1 0 0 0 1 1h7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/scale-3d.js var Scale3d; var init_scale_3d = __esmMin((() => { Scale3d = [ ["path", { d: "M5 7v11a1 1 0 0 0 1 1h11" }], ["path", { d: "M5.293 18.707 11 13" }], ["circle", { cx: "19", cy: "19", r: "2" }], ["circle", { cx: "5", cy: "5", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/scale.js var Scale; var init_scale = __esmMin((() => { Scale = [ ["path", { d: "M12 3v18" }], ["path", { d: "m19 8 3 8a5 5 0 0 1-6 0zV7" }], ["path", { d: "M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1" }], ["path", { d: "m5 8 3 8a5 5 0 0 1-6 0zV7" }], ["path", { d: "M7 21h10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/scaling.js var Scaling; var init_scaling = __esmMin((() => { Scaling = [ ["path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }], ["path", { d: "M14 15H9v-5" }], ["path", { d: "M16 3h5v5" }], ["path", { d: "M21 3 9 15" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/scan-barcode.js var ScanBarcode; var init_scan_barcode = __esmMin((() => { ScanBarcode = [ ["path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }], ["path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }], ["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }], ["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" }], ["path", { d: "M8 7v10" }], ["path", { d: "M12 7v10" }], ["path", { d: "M17 7v10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/scan-eye.js var ScanEye; var init_scan_eye = __esmMin((() => { ScanEye = [ ["path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }], ["path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }], ["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }], ["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" }], ["circle", { cx: "12", cy: "12", r: "1" }], ["path", { d: "M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/scan-heart.js var ScanHeart; var init_scan_heart = __esmMin((() => { ScanHeart = [ ["path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }], ["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }], ["path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }], ["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" }], ["path", { d: "M7.828 13.07A3 3 0 0 1 12 8.764a3 3 0 0 1 4.172 4.306l-3.447 3.62a1 1 0 0 1-1.449 0z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/scan-face.js var ScanFace; var init_scan_face = __esmMin((() => { ScanFace = [ ["path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }], ["path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }], ["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }], ["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" }], ["path", { d: "M8 14s1.5 2 4 2 4-2 4-2" }], ["path", { d: "M9 9h.01" }], ["path", { d: "M15 9h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/scan-qr-code.js var ScanQrCode; var init_scan_qr_code = __esmMin((() => { ScanQrCode = [ ["path", { d: "M17 12v4a1 1 0 0 1-1 1h-4" }], ["path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }], ["path", { d: "M17 8V7" }], ["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }], ["path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }], ["path", { d: "M7 17h.01" }], ["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" }], ["rect", { x: "7", y: "7", width: "5", height: "5", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/scan-line.js var ScanLine; var init_scan_line = __esmMin((() => { ScanLine = [ ["path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }], ["path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }], ["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }], ["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" }], ["path", { d: "M7 12h10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/scan-search.js var ScanSearch; var init_scan_search = __esmMin((() => { ScanSearch = [ ["path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }], ["path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }], ["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }], ["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" }], ["circle", { cx: "12", cy: "12", r: "3" }], ["path", { d: "m16 16-1.9-1.9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/scan-text.js var ScanText; var init_scan_text = __esmMin((() => { ScanText = [ ["path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }], ["path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }], ["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }], ["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" }], ["path", { d: "M7 8h8" }], ["path", { d: "M7 12h10" }], ["path", { d: "M7 16h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/scan.js var Scan; var init_scan = __esmMin((() => { Scan = [ ["path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }], ["path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }], ["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }], ["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/school.js var School; var init_school = __esmMin((() => { School = [ ["path", { d: "M14 21v-3a2 2 0 0 0-4 0v3" }], ["path", { d: "M18 5v16" }], ["path", { d: "m4 6 7.106-3.79a2 2 0 0 1 1.788 0L20 6" }], ["path", { d: "m6 11-3.52 2.147a1 1 0 0 0-.48.854V19a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5a1 1 0 0 0-.48-.853L18 11" }], ["path", { d: "M6 5v16" }], ["circle", { cx: "12", cy: "9", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/scissors-line-dashed.js var ScissorsLineDashed; var init_scissors_line_dashed = __esmMin((() => { ScissorsLineDashed = [ ["path", { d: "M5.42 9.42 8 12" }], ["circle", { cx: "4", cy: "8", r: "2" }], ["path", { d: "m14 6-8.58 8.58" }], ["circle", { cx: "4", cy: "16", r: "2" }], ["path", { d: "M10.8 14.8 14 18" }], ["path", { d: "M16 12h-2" }], ["path", { d: "M22 12h-2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/scissors.js var Scissors; var init_scissors = __esmMin((() => { Scissors = [ ["circle", { cx: "6", cy: "6", r: "3" }], ["path", { d: "M8.12 8.12 12 12" }], ["path", { d: "M20 4 8.12 15.88" }], ["circle", { cx: "6", cy: "18", r: "3" }], ["path", { d: "M14.8 14.8 20 20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/scooter.js var Scooter; var init_scooter = __esmMin((() => { Scooter = [ ["path", { d: "M21 4h-3.5l2 11.05" }], ["path", { d: "M6.95 17h5.142c.523 0 .95-.406 1.063-.916a6.5 6.5 0 0 1 5.345-5.009" }], ["circle", { cx: "19.5", cy: "17.5", r: "2.5" }], ["circle", { cx: "4.5", cy: "17.5", r: "2.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/screen-share-off.js var ScreenShareOff; var init_screen_share_off = __esmMin((() => { ScreenShareOff = [ ["path", { d: "M13 3H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-3" }], ["path", { d: "M8 21h8" }], ["path", { d: "M12 17v4" }], ["path", { d: "m22 3-5 5" }], ["path", { d: "m17 3 5 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/screen-share.js var ScreenShare; var init_screen_share = __esmMin((() => { ScreenShare = [ ["path", { d: "M13 3H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-3" }], ["path", { d: "M8 21h8" }], ["path", { d: "M12 17v4" }], ["path", { d: "m17 8 5-5" }], ["path", { d: "M17 3h5v5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/scroll-text.js var ScrollText; var init_scroll_text = __esmMin((() => { ScrollText = [ ["path", { d: "M15 12h-5" }], ["path", { d: "M15 8h-5" }], ["path", { d: "M19 17V5a2 2 0 0 0-2-2H4" }], ["path", { d: "M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/scroll.js var Scroll; var init_scroll = __esmMin((() => { Scroll = [["path", { d: "M19 17V5a2 2 0 0 0-2-2H4" }], ["path", { d: "M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/search-check.js var SearchCheck; var init_search_check = __esmMin((() => { SearchCheck = [ ["path", { d: "m8 11 2 2 4-4" }], ["circle", { cx: "11", cy: "11", r: "8" }], ["path", { d: "m21 21-4.3-4.3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/search-code.js var SearchCode; var init_search_code = __esmMin((() => { SearchCode = [ ["path", { d: "m13 13.5 2-2.5-2-2.5" }], ["path", { d: "m21 21-4.3-4.3" }], ["path", { d: "M9 8.5 7 11l2 2.5" }], ["circle", { cx: "11", cy: "11", r: "8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/search-slash.js var SearchSlash; var init_search_slash = __esmMin((() => { SearchSlash = [ ["path", { d: "m13.5 8.5-5 5" }], ["circle", { cx: "11", cy: "11", r: "8" }], ["path", { d: "m21 21-4.3-4.3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/search-x.js var SearchX; var init_search_x = __esmMin((() => { SearchX = [ ["path", { d: "m13.5 8.5-5 5" }], ["path", { d: "m8.5 8.5 5 5" }], ["circle", { cx: "11", cy: "11", r: "8" }], ["path", { d: "m21 21-4.3-4.3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/search.js var Search; var init_search = __esmMin((() => { Search = [["path", { d: "m21 21-4.34-4.34" }], ["circle", { cx: "11", cy: "11", r: "8" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/section.js var Section; var init_section = __esmMin((() => { Section = [["path", { d: "M16 5a4 3 0 0 0-8 0c0 4 8 3 8 7a4 3 0 0 1-8 0" }], ["path", { d: "M8 19a4 3 0 0 0 8 0c0-4-8-3-8-7a4 3 0 0 1 8 0" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/send-horizontal.js var SendHorizontal; var init_send_horizontal = __esmMin((() => { SendHorizontal = [["path", { d: "M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z" }], ["path", { d: "M6 12h16" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/send-to-back.js var SendToBack; var init_send_to_back = __esmMin((() => { SendToBack = [ ["rect", { x: "14", y: "14", width: "8", height: "8", rx: "2" }], ["rect", { x: "2", y: "2", width: "8", height: "8", rx: "2" }], ["path", { d: "M7 14v1a2 2 0 0 0 2 2h1" }], ["path", { d: "M14 7h1a2 2 0 0 1 2 2v1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/send.js var Send; var init_send = __esmMin((() => { Send = [["path", { d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z" }], ["path", { d: "m21.854 2.147-10.94 10.939" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/separator-horizontal.js var SeparatorHorizontal; var init_separator_horizontal = __esmMin((() => { SeparatorHorizontal = [ ["path", { d: "m16 16-4 4-4-4" }], ["path", { d: "M3 12h18" }], ["path", { d: "m8 8 4-4 4 4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/separator-vertical.js var SeparatorVertical; var init_separator_vertical = __esmMin((() => { SeparatorVertical = [ ["path", { d: "M12 3v18" }], ["path", { d: "m16 16 4-4-4-4" }], ["path", { d: "m8 8-4 4 4 4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/server-cog.js var ServerCog; var init_server_cog = __esmMin((() => { ServerCog = [ ["path", { d: "m10.852 14.772-.383.923" }], ["path", { d: "M13.148 14.772a3 3 0 1 0-2.296-5.544l-.383-.923" }], ["path", { d: "m13.148 9.228.383-.923" }], ["path", { d: "m13.53 15.696-.382-.924a3 3 0 1 1-2.296-5.544" }], ["path", { d: "m14.772 10.852.923-.383" }], ["path", { d: "m14.772 13.148.923.383" }], ["path", { d: "M4.5 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-.5" }], ["path", { d: "M4.5 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-.5" }], ["path", { d: "M6 18h.01" }], ["path", { d: "M6 6h.01" }], ["path", { d: "m9.228 10.852-.923-.383" }], ["path", { d: "m9.228 13.148-.923.383" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/server-crash.js var ServerCrash; var init_server_crash = __esmMin((() => { ServerCrash = [ ["path", { d: "M6 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-2" }], ["path", { d: "M6 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2" }], ["path", { d: "M6 6h.01" }], ["path", { d: "M6 18h.01" }], ["path", { d: "m13 6-4 6h6l-4 6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/server-off.js var ServerOff; var init_server_off = __esmMin((() => { ServerOff = [ ["path", { d: "M7 2h13a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-5" }], ["path", { d: "M10 10 2.5 2.5C2 2 2 2.5 2 5v3a2 2 0 0 0 2 2h6z" }], ["path", { d: "M22 17v-1a2 2 0 0 0-2-2h-1" }], ["path", { d: "M4 14a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16.5l1-.5.5.5-8-8H4z" }], ["path", { d: "M6 18h.01" }], ["path", { d: "m2 2 20 20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/server.js var Server; var init_server = __esmMin((() => { Server = [ ["rect", { width: "20", height: "8", x: "2", y: "2", rx: "2", ry: "2" }], ["rect", { width: "20", height: "8", x: "2", y: "14", rx: "2", ry: "2" }], ["line", { x1: "6", x2: "6.01", y1: "6", y2: "6" }], ["line", { x1: "6", x2: "6.01", y1: "18", y2: "18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/settings-2.js var Settings2; var init_settings_2 = __esmMin((() => { Settings2 = [ ["path", { d: "M14 17H5" }], ["path", { d: "M19 7h-9" }], ["circle", { cx: "17", cy: "17", r: "3" }], ["circle", { cx: "7", cy: "7", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/settings.js var Settings$1; var init_settings = __esmMin((() => { Settings$1 = [["path", { d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" }], ["circle", { cx: "12", cy: "12", r: "3" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shapes.js var Shapes; var init_shapes = __esmMin((() => { Shapes = [ ["path", { d: "M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z" }], ["rect", { x: "3", y: "14", width: "7", height: "7", rx: "1" }], ["circle", { cx: "17.5", cy: "17.5", r: "3.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/share-2.js var Share2; var init_share_2 = __esmMin((() => { Share2 = [ ["circle", { cx: "18", cy: "5", r: "3" }], ["circle", { cx: "6", cy: "12", r: "3" }], ["circle", { cx: "18", cy: "19", r: "3" }], ["line", { x1: "8.59", x2: "15.42", y1: "13.51", y2: "17.49" }], ["line", { x1: "15.41", x2: "8.59", y1: "6.51", y2: "10.49" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/share.js var Share; var init_share = __esmMin((() => { Share = [ ["path", { d: "M12 2v13" }], ["path", { d: "m16 6-4-4-4 4" }], ["path", { d: "M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sheet.js var Sheet; var init_sheet = __esmMin((() => { Sheet = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }], ["line", { x1: "3", x2: "21", y1: "9", y2: "9" }], ["line", { x1: "3", x2: "21", y1: "15", y2: "15" }], ["line", { x1: "9", x2: "9", y1: "9", y2: "21" }], ["line", { x1: "15", x2: "15", y1: "9", y2: "21" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shell.js var Shell; var init_shell = __esmMin((() => { Shell = [["path", { d: "M14 11a2 2 0 1 1-4 0 4 4 0 0 1 8 0 6 6 0 0 1-12 0 8 8 0 0 1 16 0 10 10 0 1 1-20 0 11.93 11.93 0 0 1 2.42-7.22 2 2 0 1 1 3.16 2.44" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shield-ban.js var ShieldBan; var init_shield_ban = __esmMin((() => { ShieldBan = [["path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }], ["path", { d: "m4.243 5.21 14.39 12.472" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shield-alert.js var ShieldAlert; var init_shield_alert = __esmMin((() => { ShieldAlert = [ ["path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }], ["path", { d: "M12 8v4" }], ["path", { d: "M12 16h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shield-check.js var ShieldCheck; var init_shield_check = __esmMin((() => { ShieldCheck = [["path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }], ["path", { d: "m9 12 2 2 4-4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shield-ellipsis.js var ShieldEllipsis; var init_shield_ellipsis = __esmMin((() => { ShieldEllipsis = [ ["path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }], ["path", { d: "M8 12h.01" }], ["path", { d: "M12 12h.01" }], ["path", { d: "M16 12h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shield-half.js var ShieldHalf; var init_shield_half = __esmMin((() => { ShieldHalf = [["path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }], ["path", { d: "M12 22V2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shield-minus.js var ShieldMinus; var init_shield_minus = __esmMin((() => { ShieldMinus = [["path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }], ["path", { d: "M9 12h6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shield-off.js var ShieldOff; var init_shield_off = __esmMin((() => { ShieldOff = [ ["path", { d: "m2 2 20 20" }], ["path", { d: "M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71" }], ["path", { d: "M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shield-plus.js var ShieldPlus; var init_shield_plus = __esmMin((() => { ShieldPlus = [ ["path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }], ["path", { d: "M9 12h6" }], ["path", { d: "M12 9v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shield-question-mark.js var ShieldQuestionMark; var init_shield_question_mark = __esmMin((() => { ShieldQuestionMark = [ ["path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }], ["path", { d: "M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3" }], ["path", { d: "M12 17h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shield-user.js var ShieldUser; var init_shield_user = __esmMin((() => { ShieldUser = [ ["path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }], ["path", { d: "M6.376 18.91a6 6 0 0 1 11.249.003" }], ["circle", { cx: "12", cy: "11", r: "4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shield-x.js var ShieldX; var init_shield_x = __esmMin((() => { ShieldX = [ ["path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }], ["path", { d: "m14.5 9.5-5 5" }], ["path", { d: "m9.5 9.5 5 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shield.js var Shield; var init_shield = __esmMin((() => { Shield = [["path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ship-wheel.js var ShipWheel; var init_ship_wheel = __esmMin((() => { ShipWheel = [ ["circle", { cx: "12", cy: "12", r: "8" }], ["path", { d: "M12 2v7.5" }], ["path", { d: "m19 5-5.23 5.23" }], ["path", { d: "M22 12h-7.5" }], ["path", { d: "m19 19-5.23-5.23" }], ["path", { d: "M12 14.5V22" }], ["path", { d: "M10.23 13.77 5 19" }], ["path", { d: "M9.5 12H2" }], ["path", { d: "M10.23 10.23 5 5" }], ["circle", { cx: "12", cy: "12", r: "2.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ship.js var Ship; var init_ship = __esmMin((() => { Ship = [ ["path", { d: "M12 10.189V14" }], ["path", { d: "M12 2v3" }], ["path", { d: "M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6" }], ["path", { d: "M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76" }], ["path", { d: "M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shirt.js var Shirt; var init_shirt = __esmMin((() => { Shirt = [["path", { d: "M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shopping-bag.js var ShoppingBag; var init_shopping_bag = __esmMin((() => { ShoppingBag = [ ["path", { d: "M16 10a4 4 0 0 1-8 0" }], ["path", { d: "M3.103 6.034h17.794" }], ["path", { d: "M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shopping-basket.js var ShoppingBasket; var init_shopping_basket = __esmMin((() => { ShoppingBasket = [ ["path", { d: "m15 11-1 9" }], ["path", { d: "m19 11-4-7" }], ["path", { d: "M2 11h20" }], ["path", { d: "m3.5 11 1.6 7.4a2 2 0 0 0 2 1.6h9.8a2 2 0 0 0 2-1.6l1.7-7.4" }], ["path", { d: "M4.5 15.5h15" }], ["path", { d: "m5 11 4-7" }], ["path", { d: "m9 11 1 9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shopping-cart.js var ShoppingCart; var init_shopping_cart = __esmMin((() => { ShoppingCart = [ ["circle", { cx: "8", cy: "21", r: "1" }], ["circle", { cx: "19", cy: "21", r: "1" }], ["path", { d: "M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shovel.js var Shovel; var init_shovel = __esmMin((() => { Shovel = [ ["path", { d: "M21.56 4.56a1.5 1.5 0 0 1 0 2.122l-.47.47a3 3 0 0 1-4.212-.03 3 3 0 0 1 0-4.243l.44-.44a1.5 1.5 0 0 1 2.121 0z" }], ["path", { d: "M3 22a1 1 0 0 1-1-1v-3.586a1 1 0 0 1 .293-.707l3.355-3.355a1.205 1.205 0 0 1 1.704 0l3.296 3.296a1.205 1.205 0 0 1 0 1.704l-3.355 3.355a1 1 0 0 1-.707.293z" }], ["path", { d: "m9 15 7.879-7.878" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shower-head.js var ShowerHead; var init_shower_head = __esmMin((() => { ShowerHead = [ ["path", { d: "m4 4 2.5 2.5" }], ["path", { d: "M13.5 6.5a4.95 4.95 0 0 0-7 7" }], ["path", { d: "M15 5 5 15" }], ["path", { d: "M14 17v.01" }], ["path", { d: "M10 16v.01" }], ["path", { d: "M13 13v.01" }], ["path", { d: "M16 10v.01" }], ["path", { d: "M11 20v.01" }], ["path", { d: "M17 14v.01" }], ["path", { d: "M20 11v.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shredder.js var Shredder; var init_shredder = __esmMin((() => { Shredder = [ ["path", { d: "M4 13V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5" }], ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M10 22v-5" }], ["path", { d: "M14 19v-2" }], ["path", { d: "M18 20v-3" }], ["path", { d: "M2 13h20" }], ["path", { d: "M6 20v-3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shrimp.js var Shrimp; var init_shrimp = __esmMin((() => { Shrimp = [ ["path", { d: "M11 12h.01" }], ["path", { d: "M13 22c.5-.5 1.12-1 2.5-1-1.38 0-2-.5-2.5-1" }], ["path", { d: "M14 2a3.28 3.28 0 0 1-3.227 1.798l-6.17-.561A2.387 2.387 0 1 0 4.387 8H15.5a1 1 0 0 1 0 13 1 1 0 0 0 0-5H12a7 7 0 0 1-7-7V8" }], ["path", { d: "M14 8a8.5 8.5 0 0 1 0 8" }], ["path", { d: "M16 16c2 0 4.5-4 4-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shrink.js var Shrink; var init_shrink = __esmMin((() => { Shrink = [ ["path", { d: "m15 15 6 6m-6-6v4.8m0-4.8h4.8" }], ["path", { d: "M9 19.8V15m0 0H4.2M9 15l-6 6" }], ["path", { d: "M15 4.2V9m0 0h4.8M15 9l6-6" }], ["path", { d: "M9 4.2V9m0 0H4.2M9 9 3 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shrub.js var Shrub; var init_shrub = __esmMin((() => { Shrub = [ ["path", { d: "M12 22v-5.172a2 2 0 0 0-.586-1.414L9.5 13.5" }], ["path", { d: "M14.5 14.5 12 17" }], ["path", { d: "M17 8.8A6 6 0 0 1 13.8 20H10A6.5 6.5 0 0 1 7 8a5 5 0 0 1 10 0z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/shuffle.js var Shuffle; var init_shuffle = __esmMin((() => { Shuffle = [ ["path", { d: "m18 14 4 4-4 4" }], ["path", { d: "m18 2 4 4-4 4" }], ["path", { d: "M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22" }], ["path", { d: "M2 6h1.972a4 4 0 0 1 3.6 2.2" }], ["path", { d: "M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sigma.js var Sigma; var init_sigma = __esmMin((() => { Sigma = [["path", { d: "M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/signal-high.js var SignalHigh; var init_signal_high = __esmMin((() => { SignalHigh = [ ["path", { d: "M2 20h.01" }], ["path", { d: "M7 20v-4" }], ["path", { d: "M12 20v-8" }], ["path", { d: "M17 20V8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/signal-low.js var SignalLow; var init_signal_low = __esmMin((() => { SignalLow = [["path", { d: "M2 20h.01" }], ["path", { d: "M7 20v-4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/signal-medium.js var SignalMedium; var init_signal_medium = __esmMin((() => { SignalMedium = [ ["path", { d: "M2 20h.01" }], ["path", { d: "M7 20v-4" }], ["path", { d: "M12 20v-8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/signal-zero.js var SignalZero; var init_signal_zero = __esmMin((() => { SignalZero = [["path", { d: "M2 20h.01" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/signal.js var Signal; var init_signal = __esmMin((() => { Signal = [ ["path", { d: "M2 20h.01" }], ["path", { d: "M7 20v-4" }], ["path", { d: "M12 20v-8" }], ["path", { d: "M17 20V8" }], ["path", { d: "M22 4v16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/signature.js var Signature; var init_signature = __esmMin((() => { Signature = [["path", { d: "m21 17-2.156-1.868A.5.5 0 0 0 18 15.5v.5a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1c0-2.545-3.991-3.97-8.5-4a1 1 0 0 0 0 5c4.153 0 4.745-11.295 5.708-13.5a2.5 2.5 0 1 1 3.31 3.284" }], ["path", { d: "M3 21h18" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/signpost-big.js var SignpostBig; var init_signpost_big = __esmMin((() => { SignpostBig = [ ["path", { d: "M10 9H4L2 7l2-2h6" }], ["path", { d: "M14 5h6l2 2-2 2h-6" }], ["path", { d: "M10 22V4a2 2 0 1 1 4 0v18" }], ["path", { d: "M8 22h8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/siren.js var Siren; var init_siren = __esmMin((() => { Siren = [ ["path", { d: "M7 18v-6a5 5 0 1 1 10 0v6" }], ["path", { d: "M5 21a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2z" }], ["path", { d: "M21 12h1" }], ["path", { d: "M18.5 4.5 18 5" }], ["path", { d: "M2 12h1" }], ["path", { d: "M12 2v1" }], ["path", { d: "m4.929 4.929.707.707" }], ["path", { d: "M12 12v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/skip-back.js var SkipBack; var init_skip_back = __esmMin((() => { SkipBack = [["path", { d: "M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z" }], ["path", { d: "M3 20V4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/signpost.js var Signpost; var init_signpost = __esmMin((() => { Signpost = [ ["path", { d: "M12 13v8" }], ["path", { d: "M12 3v3" }], ["path", { d: "M18 6a2 2 0 0 1 1.387.56l2.307 2.22a1 1 0 0 1 0 1.44l-2.307 2.22A2 2 0 0 1 18 13H6a2 2 0 0 1-1.387-.56l-2.306-2.22a1 1 0 0 1 0-1.44l2.306-2.22A2 2 0 0 1 6 6z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/skip-forward.js var SkipForward; var init_skip_forward = __esmMin((() => { SkipForward = [["path", { d: "M21 4v16" }], ["path", { d: "M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/skull.js var Skull; var init_skull = __esmMin((() => { Skull = [ ["path", { d: "m12.5 17-.5-1-.5 1h1z" }], ["path", { d: "M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z" }], ["circle", { cx: "15", cy: "12", r: "1" }], ["circle", { cx: "9", cy: "12", r: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/slack.js var Slack; var init_slack = __esmMin((() => { Slack = [ ["rect", { width: "3", height: "8", x: "13", y: "2", rx: "1.5" }], ["path", { d: "M19 8.5V10h1.5A1.5 1.5 0 1 0 19 8.5" }], ["rect", { width: "3", height: "8", x: "8", y: "14", rx: "1.5" }], ["path", { d: "M5 15.5V14H3.5A1.5 1.5 0 1 0 5 15.5" }], ["rect", { width: "8", height: "3", x: "14", y: "13", rx: "1.5" }], ["path", { d: "M15.5 19H14v1.5a1.5 1.5 0 1 0 1.5-1.5" }], ["rect", { width: "8", height: "3", x: "2", y: "8", rx: "1.5" }], ["path", { d: "M8.5 5H10V3.5A1.5 1.5 0 1 0 8.5 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/slash.js var Slash; var init_slash = __esmMin((() => { Slash = [["path", { d: "M22 2 2 22" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/slice.js var Slice; var init_slice = __esmMin((() => { Slice = [["path", { d: "M11 16.586V19a1 1 0 0 1-1 1H2L18.37 3.63a1 1 0 1 1 3 3l-9.663 9.663a1 1 0 0 1-1.414 0L8 14" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sliders-horizontal.js var SlidersHorizontal; var init_sliders_horizontal = __esmMin((() => { SlidersHorizontal = [ ["path", { d: "M10 5H3" }], ["path", { d: "M12 19H3" }], ["path", { d: "M14 3v4" }], ["path", { d: "M16 17v4" }], ["path", { d: "M21 12h-9" }], ["path", { d: "M21 19h-5" }], ["path", { d: "M21 5h-7" }], ["path", { d: "M8 10v4" }], ["path", { d: "M8 12H3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sliders-vertical.js var SlidersVertical; var init_sliders_vertical = __esmMin((() => { SlidersVertical = [ ["path", { d: "M10 8h4" }], ["path", { d: "M12 21v-9" }], ["path", { d: "M12 8V3" }], ["path", { d: "M17 16h4" }], ["path", { d: "M19 12V3" }], ["path", { d: "M19 21v-5" }], ["path", { d: "M3 14h4" }], ["path", { d: "M5 10V3" }], ["path", { d: "M5 21v-7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/smartphone-charging.js var SmartphoneCharging; var init_smartphone_charging = __esmMin((() => { SmartphoneCharging = [["rect", { width: "14", height: "20", x: "5", y: "2", rx: "2", ry: "2" }], ["path", { d: "M12.667 8 10 12h4l-2.667 4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/smartphone-nfc.js var SmartphoneNfc; var init_smartphone_nfc = __esmMin((() => { SmartphoneNfc = [ ["rect", { width: "7", height: "12", x: "2", y: "6", rx: "1" }], ["path", { d: "M13 8.32a7.43 7.43 0 0 1 0 7.36" }], ["path", { d: "M16.46 6.21a11.76 11.76 0 0 1 0 11.58" }], ["path", { d: "M19.91 4.1a15.91 15.91 0 0 1 .01 15.8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/smartphone.js var Smartphone; var init_smartphone = __esmMin((() => { Smartphone = [["rect", { width: "14", height: "20", x: "5", y: "2", rx: "2", ry: "2" }], ["path", { d: "M12 18h.01" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/smile-plus.js var SmilePlus; var init_smile_plus = __esmMin((() => { SmilePlus = [ ["path", { d: "M22 11v1a10 10 0 1 1-9-10" }], ["path", { d: "M8 14s1.5 2 4 2 4-2 4-2" }], ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9" }], ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9" }], ["path", { d: "M16 5h6" }], ["path", { d: "M19 2v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/smile.js var Smile; var init_smile = __esmMin((() => { Smile = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["path", { d: "M8 14s1.5 2 4 2 4-2 4-2" }], ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9" }], ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/snail.js var Snail; var init_snail = __esmMin((() => { Snail = [ ["path", { d: "M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0" }], ["circle", { cx: "10", cy: "13", r: "8" }], ["path", { d: "M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6" }], ["path", { d: "M18 3 19.1 5.2" }], ["path", { d: "M22 3 20.9 5.2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/snowflake.js var Snowflake; var init_snowflake = __esmMin((() => { Snowflake = [ ["path", { d: "m10 20-1.25-2.5L6 18" }], ["path", { d: "M10 4 8.75 6.5 6 6" }], ["path", { d: "m14 20 1.25-2.5L18 18" }], ["path", { d: "m14 4 1.25 2.5L18 6" }], ["path", { d: "m17 21-3-6h-4" }], ["path", { d: "m17 3-3 6 1.5 3" }], ["path", { d: "M2 12h6.5L10 9" }], ["path", { d: "m20 10-1.5 2 1.5 2" }], ["path", { d: "M22 12h-6.5L14 15" }], ["path", { d: "m4 10 1.5 2L4 14" }], ["path", { d: "m7 21 3-6-1.5-3" }], ["path", { d: "m7 3 3 6h4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/soap-dispenser-droplet.js var SoapDispenserDroplet; var init_soap_dispenser_droplet = __esmMin((() => { SoapDispenserDroplet = [ ["path", { d: "M10.5 2v4" }], ["path", { d: "M14 2H7a2 2 0 0 0-2 2" }], ["path", { d: "M19.29 14.76A6.67 6.67 0 0 1 17 11a6.6 6.6 0 0 1-2.29 3.76c-1.15.92-1.71 2.04-1.71 3.19 0 2.22 1.8 4.05 4 4.05s4-1.83 4-4.05c0-1.16-.57-2.26-1.71-3.19" }], ["path", { d: "M9.607 21H6a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h7V7a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sofa.js var Sofa; var init_sofa = __esmMin((() => { Sofa = [ ["path", { d: "M20 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v3" }], ["path", { d: "M2 16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5a2 2 0 0 0-4 0v1.5a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5V11a2 2 0 0 0-4 0z" }], ["path", { d: "M4 18v2" }], ["path", { d: "M20 18v2" }], ["path", { d: "M12 4v9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/solar-panel.js var SolarPanel; var init_solar_panel = __esmMin((() => { SolarPanel = [ ["path", { d: "M11 2h2" }], ["path", { d: "m14.28 14-4.56 8" }], ["path", { d: "m21 22-1.558-4H4.558" }], ["path", { d: "M3 10v2" }], ["path", { d: "M6.245 15.04A2 2 0 0 1 8 14h12a1 1 0 0 1 .864 1.505l-3.11 5.457A2 2 0 0 1 16 22H4a1 1 0 0 1-.863-1.506z" }], ["path", { d: "M7 2a4 4 0 0 1-4 4" }], ["path", { d: "m8.66 7.66 1.41 1.41" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/soup.js var Soup; var init_soup = __esmMin((() => { Soup = [ ["path", { d: "M12 21a9 9 0 0 0 9-9H3a9 9 0 0 0 9 9Z" }], ["path", { d: "M7 21h10" }], ["path", { d: "M19.5 12 22 6" }], ["path", { d: "M16.25 3c.27.1.8.53.75 1.36-.06.83-.93 1.2-1 2.02-.05.78.34 1.24.73 1.62" }], ["path", { d: "M11.25 3c.27.1.8.53.74 1.36-.05.83-.93 1.2-.98 2.02-.06.78.33 1.24.72 1.62" }], ["path", { d: "M6.25 3c.27.1.8.53.75 1.36-.06.83-.93 1.2-1 2.02-.05.78.34 1.24.74 1.62" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/space.js var Space; var init_space = __esmMin((() => { Space = [["path", { d: "M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/spade.js var Spade; var init_spade = __esmMin((() => { Spade = [["path", { d: "M12 18v4" }], ["path", { d: "M2 14.499a5.5 5.5 0 0 0 9.591 3.675.6.6 0 0 1 .818.001A5.5 5.5 0 0 0 22 14.5c0-2.29-1.5-4-3-5.5l-5.492-5.312a2 2 0 0 0-3-.02L5 8.999c-1.5 1.5-3 3.2-3 5.5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sparkles.js var Sparkles; var init_sparkles = __esmMin((() => { Sparkles = [ ["path", { d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z" }], ["path", { d: "M20 2v4" }], ["path", { d: "M22 4h-4" }], ["circle", { cx: "4", cy: "20", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/speaker.js var Speaker; var init_speaker = __esmMin((() => { Speaker = [ ["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2" }], ["path", { d: "M12 6h.01" }], ["circle", { cx: "12", cy: "14", r: "4" }], ["path", { d: "M12 14h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sparkle.js var Sparkle; var init_sparkle = __esmMin((() => { Sparkle = [["path", { d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/speech.js var Speech; var init_speech = __esmMin((() => { Speech = [ ["path", { d: "M8.8 20v-4.1l1.9.2a2.3 2.3 0 0 0 2.164-2.1V8.3A5.37 5.37 0 0 0 2 8.25c0 2.8.656 3.054 1 4.55a5.77 5.77 0 0 1 .029 2.758L2 20" }], ["path", { d: "M19.8 17.8a7.5 7.5 0 0 0 .003-10.603" }], ["path", { d: "M17 15a3.5 3.5 0 0 0-.025-4.975" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/spell-check-2.js var SpellCheck2; var init_spell_check_2 = __esmMin((() => { SpellCheck2 = [ ["path", { d: "m6 16 6-12 6 12" }], ["path", { d: "M8 12h8" }], ["path", { d: "M4 21c1.1 0 1.1-1 2.3-1s1.1 1 2.3 1c1.1 0 1.1-1 2.3-1 1.1 0 1.1 1 2.3 1 1.1 0 1.1-1 2.3-1 1.1 0 1.1 1 2.3 1 1.1 0 1.1-1 2.3-1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/spell-check.js var SpellCheck; var init_spell_check = __esmMin((() => { SpellCheck = [ ["path", { d: "m6 16 6-12 6 12" }], ["path", { d: "M8 12h8" }], ["path", { d: "m16 20 2 2 4-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/spline-pointer.js var SplinePointer; var init_spline_pointer = __esmMin((() => { SplinePointer = [ ["path", { d: "M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z" }], ["path", { d: "M5 17A12 12 0 0 1 17 5" }], ["circle", { cx: "19", cy: "5", r: "2" }], ["circle", { cx: "5", cy: "19", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/spline.js var Spline; var init_spline = __esmMin((() => { Spline = [ ["circle", { cx: "19", cy: "5", r: "2" }], ["circle", { cx: "5", cy: "19", r: "2" }], ["path", { d: "M5 17A12 12 0 0 1 17 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/spool.js var Spool; var init_spool = __esmMin((() => { Spool = [["path", { d: "M17 13.44 4.442 17.082A2 2 0 0 0 4.982 21H19a2 2 0 0 0 .558-3.921l-1.115-.32A2 2 0 0 1 17 14.837V7.66" }], ["path", { d: "m7 10.56 12.558-3.642A2 2 0 0 0 19.018 3H5a2 2 0 0 0-.558 3.921l1.115.32A2 2 0 0 1 7 9.163v7.178" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/split.js var Split; var init_split = __esmMin((() => { Split = [ ["path", { d: "M16 3h5v5" }], ["path", { d: "M8 3H3v5" }], ["path", { d: "M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3" }], ["path", { d: "m15 9 6-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/spotlight.js var Spotlight; var init_spotlight = __esmMin((() => { Spotlight = [ ["path", { d: "M15.295 19.562 16 22" }], ["path", { d: "m17 16 3.758 2.098" }], ["path", { d: "m19 12.5 3.026-.598" }], ["path", { d: "M7.61 6.3a3 3 0 0 0-3.92 1.3l-1.38 2.79a3 3 0 0 0 1.3 3.91l6.89 3.597a1 1 0 0 0 1.342-.447l3.106-6.211a1 1 0 0 0-.447-1.341z" }], ["path", { d: "M8 9V2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/spray-can.js var SprayCan; var init_spray_can = __esmMin((() => { SprayCan = [ ["path", { d: "M3 3h.01" }], ["path", { d: "M7 5h.01" }], ["path", { d: "M11 7h.01" }], ["path", { d: "M3 7h.01" }], ["path", { d: "M7 9h.01" }], ["path", { d: "M3 11h.01" }], ["rect", { width: "4", height: "4", x: "15", y: "5" }], ["path", { d: "m19 9 2 2v10c0 .6-.4 1-1 1h-6c-.6 0-1-.4-1-1V11l2-2" }], ["path", { d: "m13 14 8-2" }], ["path", { d: "m13 19 8-2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sprout.js var Sprout; var init_sprout = __esmMin((() => { Sprout = [ ["path", { d: "M14 9.536V7a4 4 0 0 1 4-4h1.5a.5.5 0 0 1 .5.5V5a4 4 0 0 1-4 4 4 4 0 0 0-4 4c0 2 1 3 1 5a5 5 0 0 1-1 3" }], ["path", { d: "M4 9a5 5 0 0 1 8 4 5 5 0 0 1-8-4" }], ["path", { d: "M5 21h14" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-activity.js var SquareActivity; var init_square_activity = __esmMin((() => { SquareActivity = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M17 12h-2l-2 5-2-10-2 5H7" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-arrow-down-left.js var SquareArrowDownLeft; var init_square_arrow_down_left = __esmMin((() => { SquareArrowDownLeft = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "m16 8-8 8" }], ["path", { d: "M16 16H8V8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-arrow-down-right.js var SquareArrowDownRight; var init_square_arrow_down_right = __esmMin((() => { SquareArrowDownRight = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "m8 8 8 8" }], ["path", { d: "M16 8v8H8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-arrow-down.js var SquareArrowDown; var init_square_arrow_down = __esmMin((() => { SquareArrowDown = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M12 8v8" }], ["path", { d: "m8 12 4 4 4-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-arrow-left.js var SquareArrowLeft; var init_square_arrow_left = __esmMin((() => { SquareArrowLeft = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "m12 8-4 4 4 4" }], ["path", { d: "M16 12H8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-arrow-out-down-left.js var SquareArrowOutDownLeft; var init_square_arrow_out_down_left = __esmMin((() => { SquareArrowOutDownLeft = [ ["path", { d: "M13 21h6a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v6" }], ["path", { d: "m3 21 9-9" }], ["path", { d: "M9 21H3v-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-arrow-out-down-right.js var SquareArrowOutDownRight; var init_square_arrow_out_down_right = __esmMin((() => { SquareArrowOutDownRight = [ ["path", { d: "M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6" }], ["path", { d: "m21 21-9-9" }], ["path", { d: "M21 15v6h-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-arrow-out-up-left.js var SquareArrowOutUpLeft; var init_square_arrow_out_up_left = __esmMin((() => { SquareArrowOutUpLeft = [ ["path", { d: "M13 3h6a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6" }], ["path", { d: "m3 3 9 9" }], ["path", { d: "M3 9V3h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-arrow-out-up-right.js var SquareArrowOutUpRight; var init_square_arrow_out_up_right = __esmMin((() => { SquareArrowOutUpRight = [ ["path", { d: "M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6" }], ["path", { d: "m21 3-9 9" }], ["path", { d: "M15 3h6v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-arrow-right.js var SquareArrowRight; var init_square_arrow_right = __esmMin((() => { SquareArrowRight = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M8 12h8" }], ["path", { d: "m12 16 4-4-4-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-arrow-up-left.js var SquareArrowUpLeft; var init_square_arrow_up_left = __esmMin((() => { SquareArrowUpLeft = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M8 16V8h8" }], ["path", { d: "M16 16 8 8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-arrow-up-right.js var SquareArrowUpRight; var init_square_arrow_up_right = __esmMin((() => { SquareArrowUpRight = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M8 8h8v8" }], ["path", { d: "m8 16 8-8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-arrow-up.js var SquareArrowUp; var init_square_arrow_up = __esmMin((() => { SquareArrowUp = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "m16 12-4-4-4 4" }], ["path", { d: "M12 16V8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-asterisk.js var SquareAsterisk; var init_square_asterisk = __esmMin((() => { SquareAsterisk = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M12 8v8" }], ["path", { d: "m8.5 14 7-4" }], ["path", { d: "m8.5 10 7 4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-bottom-dashed-scissors.js var SquareBottomDashedScissors; var init_square_bottom_dashed_scissors = __esmMin((() => { SquareBottomDashedScissors = [ ["line", { x1: "5", y1: "3", x2: "19", y2: "3" }], ["line", { x1: "3", y1: "5", x2: "3", y2: "19" }], ["line", { x1: "21", y1: "5", x2: "21", y2: "19" }], ["line", { x1: "9", y1: "21", x2: "10", y2: "21" }], ["line", { x1: "14", y1: "21", x2: "15", y2: "21" }], ["path", { d: "M 3 5 A2 2 0 0 1 5 3" }], ["path", { d: "M 19 3 A2 2 0 0 1 21 5" }], ["path", { d: "M 5 21 A2 2 0 0 1 3 19" }], ["path", { d: "M 21 19 A2 2 0 0 1 19 21" }], ["circle", { cx: "8.5", cy: "8.5", r: "1.5" }], ["line", { x1: "9.56066", y1: "9.56066", x2: "12", y2: "12" }], ["line", { x1: "17", y1: "17", x2: "14.82", y2: "14.82" }], ["circle", { cx: "8.5", cy: "15.5", r: "1.5" }], ["line", { x1: "9.56066", y1: "14.43934", x2: "17", y2: "7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-check-big.js var SquareCheckBig; var init_square_check_big = __esmMin((() => { SquareCheckBig = [["path", { d: "M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344" }], ["path", { d: "m9 11 3 3L22 4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-chart-gantt.js var SquareChartGantt; var init_square_chart_gantt = __esmMin((() => { SquareChartGantt = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M9 8h7" }], ["path", { d: "M8 12h6" }], ["path", { d: "M11 16h5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-check.js var SquareCheck; var init_square_check = __esmMin((() => { SquareCheck = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "m9 12 2 2 4-4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-chevron-down.js var SquareChevronDown; var init_square_chevron_down = __esmMin((() => { SquareChevronDown = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "m16 10-4 4-4-4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-chevron-left.js var SquareChevronLeft; var init_square_chevron_left = __esmMin((() => { SquareChevronLeft = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "m14 16-4-4 4-4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-chevron-right.js var SquareChevronRight; var init_square_chevron_right = __esmMin((() => { SquareChevronRight = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "m10 8 4 4-4 4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-chevron-up.js var SquareChevronUp; var init_square_chevron_up = __esmMin((() => { SquareChevronUp = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "m8 14 4-4 4 4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-code.js var SquareCode; var init_square_code = __esmMin((() => { SquareCode = [ ["path", { d: "m10 9-3 3 3 3" }], ["path", { d: "m14 15 3-3-3-3" }], ["rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-dashed-bottom-code.js var SquareDashedBottomCode; var init_square_dashed_bottom_code = __esmMin((() => { SquareDashedBottomCode = [ ["path", { d: "M10 9.5 8 12l2 2.5" }], ["path", { d: "M14 21h1" }], ["path", { d: "m14 9.5 2 2.5-2 2.5" }], ["path", { d: "M5 21a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2" }], ["path", { d: "M9 21h1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-dashed-kanban.js var SquareDashedKanban; var init_square_dashed_kanban = __esmMin((() => { SquareDashedKanban = [ ["path", { d: "M8 7v7" }], ["path", { d: "M12 7v4" }], ["path", { d: "M16 7v9" }], ["path", { d: "M5 3a2 2 0 0 0-2 2" }], ["path", { d: "M9 3h1" }], ["path", { d: "M14 3h1" }], ["path", { d: "M19 3a2 2 0 0 1 2 2" }], ["path", { d: "M21 9v1" }], ["path", { d: "M21 14v1" }], ["path", { d: "M21 19a2 2 0 0 1-2 2" }], ["path", { d: "M14 21h1" }], ["path", { d: "M9 21h1" }], ["path", { d: "M5 21a2 2 0 0 1-2-2" }], ["path", { d: "M3 14v1" }], ["path", { d: "M3 9v1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-dashed-mouse-pointer.js var SquareDashedMousePointer; var init_square_dashed_mouse_pointer = __esmMin((() => { SquareDashedMousePointer = [ ["path", { d: "M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z" }], ["path", { d: "M5 3a2 2 0 0 0-2 2" }], ["path", { d: "M19 3a2 2 0 0 1 2 2" }], ["path", { d: "M5 21a2 2 0 0 1-2-2" }], ["path", { d: "M9 3h1" }], ["path", { d: "M9 21h2" }], ["path", { d: "M14 3h1" }], ["path", { d: "M3 9v1" }], ["path", { d: "M21 9v2" }], ["path", { d: "M3 14v1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-dashed-bottom.js var SquareDashedBottom; var init_square_dashed_bottom = __esmMin((() => { SquareDashedBottom = [ ["path", { d: "M5 21a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2" }], ["path", { d: "M9 21h1" }], ["path", { d: "M14 21h1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-dashed-top-solid.js var SquareDashedTopSolid; var init_square_dashed_top_solid = __esmMin((() => { SquareDashedTopSolid = [ ["path", { d: "M14 21h1" }], ["path", { d: "M21 14v1" }], ["path", { d: "M21 19a2 2 0 0 1-2 2" }], ["path", { d: "M21 9v1" }], ["path", { d: "M3 14v1" }], ["path", { d: "M3 5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2" }], ["path", { d: "M3 9v1" }], ["path", { d: "M5 21a2 2 0 0 1-2-2" }], ["path", { d: "M9 21h1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-dashed.js var SquareDashed; var init_square_dashed = __esmMin((() => { SquareDashed = [ ["path", { d: "M5 3a2 2 0 0 0-2 2" }], ["path", { d: "M19 3a2 2 0 0 1 2 2" }], ["path", { d: "M21 19a2 2 0 0 1-2 2" }], ["path", { d: "M5 21a2 2 0 0 1-2-2" }], ["path", { d: "M9 3h1" }], ["path", { d: "M9 21h1" }], ["path", { d: "M14 3h1" }], ["path", { d: "M14 21h1" }], ["path", { d: "M3 9v1" }], ["path", { d: "M21 9v1" }], ["path", { d: "M3 14v1" }], ["path", { d: "M21 14v1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-divide.js var SquareDivide; var init_square_divide = __esmMin((() => { SquareDivide = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }], ["line", { x1: "8", x2: "16", y1: "12", y2: "12" }], ["line", { x1: "12", x2: "12", y1: "16", y2: "16" }], ["line", { x1: "12", x2: "12", y1: "8", y2: "8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-dot.js var SquareDot; var init_square_dot = __esmMin((() => { SquareDot = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["circle", { cx: "12", cy: "12", r: "1" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-function.js var SquareFunction; var init_square_function = __esmMin((() => { SquareFunction = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }], ["path", { d: "M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3" }], ["path", { d: "M9 11.2h5.7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-equal.js var SquareEqual; var init_square_equal = __esmMin((() => { SquareEqual = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M7 10h10" }], ["path", { d: "M7 14h10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-kanban.js var SquareKanban; var init_square_kanban = __esmMin((() => { SquareKanban = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M8 7v7" }], ["path", { d: "M12 7v4" }], ["path", { d: "M16 7v9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-library.js var SquareLibrary; var init_square_library = __esmMin((() => { SquareLibrary = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M7 7v10" }], ["path", { d: "M11 7v10" }], ["path", { d: "m15 7 2 10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-m.js var SquareM; var init_square_m = __esmMin((() => { SquareM = [["path", { d: "M8 16V8.5a.5.5 0 0 1 .9-.3l2.7 3.599a.5.5 0 0 0 .8 0l2.7-3.6a.5.5 0 0 1 .9.3V16" }], ["rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-menu.js var SquareMenu; var init_square_menu = __esmMin((() => { SquareMenu = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M7 8h10" }], ["path", { d: "M7 12h10" }], ["path", { d: "M7 16h10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-minus.js var SquareMinus; var init_square_minus = __esmMin((() => { SquareMinus = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M8 12h8" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-mouse-pointer.js var SquareMousePointer; var init_square_mouse_pointer = __esmMin((() => { SquareMousePointer = [["path", { d: "M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z" }], ["path", { d: "M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-parking-off.js var SquareParkingOff; var init_square_parking_off = __esmMin((() => { SquareParkingOff = [ ["path", { d: "M3.6 3.6A2 2 0 0 1 5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-.59 1.41" }], ["path", { d: "M3 8.7V19a2 2 0 0 0 2 2h10.3" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M13 13a3 3 0 1 0 0-6H9v2" }], ["path", { d: "M9 17v-2.3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-parking.js var SquareParking; var init_square_parking = __esmMin((() => { SquareParking = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M9 17V7h4a3 3 0 0 1 0 6H9" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-pause.js var SquarePause; var init_square_pause = __esmMin((() => { SquarePause = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["line", { x1: "10", x2: "10", y1: "15", y2: "9" }], ["line", { x1: "14", x2: "14", y1: "15", y2: "9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-pen.js var SquarePen; var init_square_pen = __esmMin((() => { SquarePen = [["path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }], ["path", { d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-percent.js var SquarePercent; var init_square_percent = __esmMin((() => { SquarePercent = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "m15 9-6 6" }], ["path", { d: "M9 9h.01" }], ["path", { d: "M15 15h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-pi.js var SquarePi; var init_square_pi = __esmMin((() => { SquarePi = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M7 7h10" }], ["path", { d: "M10 7v10" }], ["path", { d: "M16 17a2 2 0 0 1-2-2V7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-pilcrow.js var SquarePilcrow; var init_square_pilcrow = __esmMin((() => { SquarePilcrow = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M12 12H9.5a2.5 2.5 0 0 1 0-5H17" }], ["path", { d: "M12 7v10" }], ["path", { d: "M16 7v10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-play.js var SquarePlay; var init_square_play = __esmMin((() => { SquarePlay = [["rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }], ["path", { d: "M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-plus.js var SquarePlus; var init_square_plus = __esmMin((() => { SquarePlus = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M8 12h8" }], ["path", { d: "M12 8v8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-power.js var SquarePower; var init_square_power = __esmMin((() => { SquarePower = [ ["path", { d: "M12 7v4" }], ["path", { d: "M7.998 9.003a5 5 0 1 0 8-.005" }], ["rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-radical.js var SquareRadical; var init_square_radical = __esmMin((() => { SquareRadical = [["path", { d: "M7 12h2l2 5 2-10h4" }], ["rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-round-corner.js var SquareRoundCorner; var init_square_round_corner = __esmMin((() => { SquareRoundCorner = [["path", { d: "M21 11a8 8 0 0 0-8-8" }], ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-scissors.js var SquareScissors; var init_square_scissors = __esmMin((() => { SquareScissors = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["circle", { cx: "8.5", cy: "8.5", r: "1.5" }], ["line", { x1: "9.56066", y1: "9.56066", x2: "12", y2: "12" }], ["line", { x1: "17", y1: "17", x2: "14.82", y2: "14.82" }], ["circle", { cx: "8.5", cy: "15.5", r: "1.5" }], ["line", { x1: "9.56066", y1: "14.43934", x2: "17", y2: "7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-sigma.js var SquareSigma; var init_square_sigma = __esmMin((() => { SquareSigma = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M16 8.9V7H8l4 5-4 5h8v-1.9" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-slash.js var SquareSlash; var init_square_slash = __esmMin((() => { SquareSlash = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["line", { x1: "9", x2: "15", y1: "15", y2: "9" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-split-horizontal.js var SquareSplitHorizontal; var init_square_split_horizontal = __esmMin((() => { SquareSplitHorizontal = [ ["path", { d: "M8 19H5c-1 0-2-1-2-2V7c0-1 1-2 2-2h3" }], ["path", { d: "M16 5h3c1 0 2 1 2 2v10c0 1-1 2-2 2h-3" }], ["line", { x1: "12", x2: "12", y1: "4", y2: "20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-split-vertical.js var SquareSplitVertical; var init_square_split_vertical = __esmMin((() => { SquareSplitVertical = [ ["path", { d: "M5 8V5c0-1 1-2 2-2h10c1 0 2 1 2 2v3" }], ["path", { d: "M19 16v3c0 1-1 2-2 2H7c-1 0-2-1-2-2v-3" }], ["line", { x1: "4", x2: "20", y1: "12", y2: "12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-square.js var SquareSquare; var init_square_square = __esmMin((() => { SquareSquare = [["rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }], ["rect", { x: "8", y: "8", width: "8", height: "8", rx: "1" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-stack.js var SquareStack; var init_square_stack = __esmMin((() => { SquareStack = [ ["path", { d: "M4 10c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h4c1.1 0 2 .9 2 2" }], ["path", { d: "M10 16c-1.1 0-2-.9-2-2v-4c0-1.1.9-2 2-2h4c1.1 0 2 .9 2 2" }], ["rect", { width: "8", height: "8", x: "14", y: "14", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-star.js var SquareStar; var init_square_star = __esmMin((() => { SquareStar = [["path", { d: "M11.035 7.69a1 1 0 0 1 1.909.024l.737 1.452a1 1 0 0 0 .737.535l1.634.256a1 1 0 0 1 .588 1.806l-1.172 1.168a1 1 0 0 0-.282.866l.259 1.613a1 1 0 0 1-1.541 1.134l-1.465-.75a1 1 0 0 0-.912 0l-1.465.75a1 1 0 0 1-1.539-1.133l.258-1.613a1 1 0 0 0-.282-.866l-1.156-1.153a1 1 0 0 1 .572-1.822l1.633-.256a1 1 0 0 0 .737-.535z" }], ["rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-stop.js var SquareStop; var init_square_stop = __esmMin((() => { SquareStop = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["rect", { x: "9", y: "9", width: "6", height: "6", rx: "1" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-terminal.js var SquareTerminal; var init_square_terminal = __esmMin((() => { SquareTerminal = [ ["path", { d: "m7 11 2-2-2-2" }], ["path", { d: "M11 13h4" }], ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-user-round.js var SquareUserRound; var init_square_user_round = __esmMin((() => { SquareUserRound = [ ["path", { d: "M18 21a6 6 0 0 0-12 0" }], ["circle", { cx: "12", cy: "11", r: "4" }], ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-user.js var SquareUser; var init_square_user = __esmMin((() => { SquareUser = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["circle", { cx: "12", cy: "10", r: "3" }], ["path", { d: "M7 21v-2a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square-x.js var SquareX; var init_square_x = __esmMin((() => { SquareX = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }], ["path", { d: "m15 9-6 6" }], ["path", { d: "m9 9 6 6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/square.js var Square; var init_square = __esmMin((() => { Square = [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/squares-exclude.js var SquaresExclude; var init_squares_exclude = __esmMin((() => { SquaresExclude = [["path", { d: "M16 12v2a2 2 0 0 1-2 2H9a1 1 0 0 0-1 1v3a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2h0" }], ["path", { d: "M4 16a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v3a1 1 0 0 1-1 1h-5a2 2 0 0 0-2 2v2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/squares-subtract.js var SquaresSubtract; var init_squares_subtract = __esmMin((() => { SquaresSubtract = [ ["path", { d: "M10 22a2 2 0 0 1-2-2" }], ["path", { d: "M16 22h-2" }], ["path", { d: "M16 4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h3a1 1 0 0 0 1-1v-5a2 2 0 0 1 2-2h5a1 1 0 0 0 1-1z" }], ["path", { d: "M20 8a2 2 0 0 1 2 2" }], ["path", { d: "M22 14v2" }], ["path", { d: "M22 20a2 2 0 0 1-2 2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/squares-intersect.js var SquaresIntersect; var init_squares_intersect = __esmMin((() => { SquaresIntersect = [ ["path", { d: "M10 22a2 2 0 0 1-2-2" }], ["path", { d: "M14 2a2 2 0 0 1 2 2" }], ["path", { d: "M16 22h-2" }], ["path", { d: "M2 10V8" }], ["path", { d: "M2 4a2 2 0 0 1 2-2" }], ["path", { d: "M20 8a2 2 0 0 1 2 2" }], ["path", { d: "M22 14v2" }], ["path", { d: "M22 20a2 2 0 0 1-2 2" }], ["path", { d: "M4 16a2 2 0 0 1-2-2" }], ["path", { d: "M8 10a2 2 0 0 1 2-2h5a1 1 0 0 1 1 1v5a2 2 0 0 1-2 2H9a1 1 0 0 1-1-1z" }], ["path", { d: "M8 2h2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/squares-unite.js var SquaresUnite; var init_squares_unite = __esmMin((() => { SquaresUnite = [["path", { d: "M4 16a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v3a1 1 0 0 0 1 1h3a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2v-3a1 1 0 0 0-1-1z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/squircle-dashed.js var SquircleDashed; var init_squircle_dashed = __esmMin((() => { SquircleDashed = [ ["path", { d: "M13.77 3.043a34 34 0 0 0-3.54 0" }], ["path", { d: "M13.771 20.956a33 33 0 0 1-3.541.001" }], ["path", { d: "M20.18 17.74c-.51 1.15-1.29 1.93-2.439 2.44" }], ["path", { d: "M20.18 6.259c-.51-1.148-1.291-1.929-2.44-2.438" }], ["path", { d: "M20.957 10.23a33 33 0 0 1 0 3.54" }], ["path", { d: "M3.043 10.23a34 34 0 0 0 .001 3.541" }], ["path", { d: "M6.26 20.179c-1.15-.508-1.93-1.29-2.44-2.438" }], ["path", { d: "M6.26 3.82c-1.149.51-1.93 1.291-2.44 2.44" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/squirrel.js var Squirrel; var init_squirrel = __esmMin((() => { Squirrel = [ ["path", { d: "M15.236 22a3 3 0 0 0-2.2-5" }], ["path", { d: "M16 20a3 3 0 0 1 3-3h1a2 2 0 0 0 2-2v-2a4 4 0 0 0-4-4V4" }], ["path", { d: "M18 13h.01" }], ["path", { d: "M18 6a4 4 0 0 0-4 4 7 7 0 0 0-7 7c0-5 4-5 4-10.5a4.5 4.5 0 1 0-9 0 2.5 2.5 0 0 0 5 0C7 10 3 11 3 17c0 2.8 2.2 5 5 5h10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/squircle.js var Squircle; var init_squircle = __esmMin((() => { Squircle = [["path", { d: "M12 3c7.2 0 9 1.8 9 9s-1.8 9-9 9-9-1.8-9-9 1.8-9 9-9" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/stamp.js var Stamp; var init_stamp = __esmMin((() => { Stamp = [ ["path", { d: "M14 13V8.5C14 7 15 7 15 5a3 3 0 0 0-6 0c0 2 1 2 1 3.5V13" }], ["path", { d: "M20 15.5a2.5 2.5 0 0 0-2.5-2.5h-11A2.5 2.5 0 0 0 4 15.5V17a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1z" }], ["path", { d: "M5 22h14" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/star-half.js var StarHalf; var init_star_half = __esmMin((() => { StarHalf = [["path", { d: "M12 18.338a2.1 2.1 0 0 0-.987.244L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.12 2.12 0 0 0 1.597-1.16l2.309-4.679A.53.53 0 0 1 12 2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/star-off.js var StarOff; var init_star_off = __esmMin((() => { StarOff = [ ["path", { d: "M8.34 8.34 2 9.27l5 4.87L5.82 21 12 17.77 18.18 21l-.59-3.43" }], ["path", { d: "M18.42 12.76 22 9.27l-6.91-1L12 2l-1.44 2.91" }], ["line", { x1: "2", x2: "22", y1: "2", y2: "22" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/star.js var Star; var init_star = __esmMin((() => { Star = [["path", { d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/step-back.js var StepBack; var init_step_back = __esmMin((() => { StepBack = [["path", { d: "M13.971 4.285A2 2 0 0 1 17 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z" }], ["path", { d: "M21 20V4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/step-forward.js var StepForward; var init_step_forward = __esmMin((() => { StepForward = [["path", { d: "M10.029 4.285A2 2 0 0 0 7 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z" }], ["path", { d: "M3 4v16" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/stethoscope.js var Stethoscope; var init_stethoscope = __esmMin((() => { Stethoscope = [ ["path", { d: "M11 2v2" }], ["path", { d: "M5 2v2" }], ["path", { d: "M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1" }], ["path", { d: "M8 15a6 6 0 0 0 12 0v-3" }], ["circle", { cx: "20", cy: "10", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sticker.js var Sticker; var init_sticker = __esmMin((() => { Sticker = [ ["path", { d: "M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z" }], ["path", { d: "M15 3v5a1 1 0 0 0 1 1h5" }], ["path", { d: "M8 13h.01" }], ["path", { d: "M16 13h.01" }], ["path", { d: "M10 16s.8 1 2 1c1.3 0 2-1 2-1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sticky-note.js var StickyNote; var init_sticky_note = __esmMin((() => { StickyNote = [["path", { d: "M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z" }], ["path", { d: "M15 3v5a1 1 0 0 0 1 1h5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/stretch-horizontal.js var StretchHorizontal; var init_stretch_horizontal = __esmMin((() => { StretchHorizontal = [["rect", { width: "20", height: "6", x: "2", y: "4", rx: "2" }], ["rect", { width: "20", height: "6", x: "2", y: "14", rx: "2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/store.js var Store$1; var init_store$1 = __esmMin((() => { Store$1 = [ ["path", { d: "M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5" }], ["path", { d: "M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244" }], ["path", { d: "M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/stretch-vertical.js var StretchVertical; var init_stretch_vertical = __esmMin((() => { StretchVertical = [["rect", { width: "6", height: "20", x: "4", y: "2", rx: "2" }], ["rect", { width: "6", height: "20", x: "14", y: "2", rx: "2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/strikethrough.js var Strikethrough; var init_strikethrough = __esmMin((() => { Strikethrough = [ ["path", { d: "M16 4H9a3 3 0 0 0-2.83 4" }], ["path", { d: "M14 12a4 4 0 0 1 0 8H6" }], ["line", { x1: "4", x2: "20", y1: "12", y2: "12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/subscript.js var Subscript; var init_subscript = __esmMin((() => { Subscript = [ ["path", { d: "m4 5 8 8" }], ["path", { d: "m12 5-8 8" }], ["path", { d: "M20 19h-4c0-1.5.44-2 1.5-2.5S20 15.33 20 14c0-.47-.17-.93-.48-1.29a2.11 2.11 0 0 0-2.62-.44c-.42.24-.74.62-.9 1.07" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sun-medium.js var SunMedium; var init_sun_medium = __esmMin((() => { SunMedium = [ ["circle", { cx: "12", cy: "12", r: "4" }], ["path", { d: "M12 3v1" }], ["path", { d: "M12 20v1" }], ["path", { d: "M3 12h1" }], ["path", { d: "M20 12h1" }], ["path", { d: "m18.364 5.636-.707.707" }], ["path", { d: "m6.343 17.657-.707.707" }], ["path", { d: "m5.636 5.636.707.707" }], ["path", { d: "m17.657 17.657.707.707" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sun-dim.js var SunDim; var init_sun_dim = __esmMin((() => { SunDim = [ ["circle", { cx: "12", cy: "12", r: "4" }], ["path", { d: "M12 4h.01" }], ["path", { d: "M20 12h.01" }], ["path", { d: "M12 20h.01" }], ["path", { d: "M4 12h.01" }], ["path", { d: "M17.657 6.343h.01" }], ["path", { d: "M17.657 17.657h.01" }], ["path", { d: "M6.343 17.657h.01" }], ["path", { d: "M6.343 6.343h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sun-snow.js var SunSnow; var init_sun_snow = __esmMin((() => { SunSnow = [ ["path", { d: "M10 21v-1" }], ["path", { d: "M10 4V3" }], ["path", { d: "M10 9a3 3 0 0 0 0 6" }], ["path", { d: "m14 20 1.25-2.5L18 18" }], ["path", { d: "m14 4 1.25 2.5L18 6" }], ["path", { d: "m17 21-3-6 1.5-3H22" }], ["path", { d: "m17 3-3 6 1.5 3" }], ["path", { d: "M2 12h1" }], ["path", { d: "m20 10-1.5 2 1.5 2" }], ["path", { d: "m3.64 18.36.7-.7" }], ["path", { d: "m4.34 6.34-.7-.7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sun-moon.js var SunMoon; var init_sun_moon = __esmMin((() => { SunMoon = [ ["path", { d: "M12 2v2" }], ["path", { d: "M14.837 16.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715" }], ["path", { d: "M16 12a4 4 0 0 0-4-4" }], ["path", { d: "m19 5-1.256 1.256" }], ["path", { d: "M20 12h2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sun.js var Sun; var init_sun = __esmMin((() => { Sun = [ ["circle", { cx: "12", cy: "12", r: "4" }], ["path", { d: "M12 2v2" }], ["path", { d: "M12 20v2" }], ["path", { d: "m4.93 4.93 1.41 1.41" }], ["path", { d: "m17.66 17.66 1.41 1.41" }], ["path", { d: "M2 12h2" }], ["path", { d: "M20 12h2" }], ["path", { d: "m6.34 17.66-1.41 1.41" }], ["path", { d: "m19.07 4.93-1.41 1.41" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sunrise.js var Sunrise; var init_sunrise = __esmMin((() => { Sunrise = [ ["path", { d: "M12 2v8" }], ["path", { d: "m4.93 10.93 1.41 1.41" }], ["path", { d: "M2 18h2" }], ["path", { d: "M20 18h2" }], ["path", { d: "m19.07 10.93-1.41 1.41" }], ["path", { d: "M22 22H2" }], ["path", { d: "m8 6 4-4 4 4" }], ["path", { d: "M16 18a4 4 0 0 0-8 0" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sunset.js var Sunset; var init_sunset = __esmMin((() => { Sunset = [ ["path", { d: "M12 10V2" }], ["path", { d: "m4.93 10.93 1.41 1.41" }], ["path", { d: "M2 18h2" }], ["path", { d: "M20 18h2" }], ["path", { d: "m19.07 10.93-1.41 1.41" }], ["path", { d: "M22 22H2" }], ["path", { d: "m16 6-4 4-4-4" }], ["path", { d: "M16 18a4 4 0 0 0-8 0" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/superscript.js var Superscript; var init_superscript = __esmMin((() => { Superscript = [ ["path", { d: "m4 19 8-8" }], ["path", { d: "m12 19-8-8" }], ["path", { d: "M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/swatch-book.js var SwatchBook; var init_swatch_book = __esmMin((() => { SwatchBook = [ ["path", { d: "M11 17a4 4 0 0 1-8 0V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2Z" }], ["path", { d: "M16.7 13H19a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H7" }], ["path", { d: "M 7 17h.01" }], ["path", { d: "m11 8 2.3-2.3a2.4 2.4 0 0 1 3.404.004L18.6 7.6a2.4 2.4 0 0 1 .026 3.434L9.9 19.8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/swiss-franc.js var SwissFranc; var init_swiss_franc = __esmMin((() => { SwissFranc = [ ["path", { d: "M10 21V3h8" }], ["path", { d: "M6 16h9" }], ["path", { d: "M10 9.5h7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/switch-camera.js var SwitchCamera; var init_switch_camera = __esmMin((() => { SwitchCamera = [ ["path", { d: "M11 19H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h5" }], ["path", { d: "M13 5h7a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-5" }], ["circle", { cx: "12", cy: "12", r: "3" }], ["path", { d: "m18 22-3-3 3-3" }], ["path", { d: "m6 2 3 3-3 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/sword.js var Sword; var init_sword = __esmMin((() => { Sword = [ ["path", { d: "m11 19-6-6" }], ["path", { d: "m5 21-2-2" }], ["path", { d: "m8 16-4 4" }], ["path", { d: "M9.5 17.5 21 6V3h-3L6.5 14.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/swords.js var Swords; var init_swords = __esmMin((() => { Swords = [ ["polyline", { points: "14.5 17.5 3 6 3 3 6 3 17.5 14.5" }], ["line", { x1: "13", x2: "19", y1: "19", y2: "13" }], ["line", { x1: "16", x2: "20", y1: "16", y2: "20" }], ["line", { x1: "19", x2: "21", y1: "21", y2: "19" }], ["polyline", { points: "14.5 6.5 18 3 21 3 21 6 17.5 9.5" }], ["line", { x1: "5", x2: "9", y1: "14", y2: "18" }], ["line", { x1: "7", x2: "4", y1: "17", y2: "20" }], ["line", { x1: "3", x2: "5", y1: "19", y2: "21" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/syringe.js var Syringe; var init_syringe = __esmMin((() => { Syringe = [ ["path", { d: "m18 2 4 4" }], ["path", { d: "m17 7 3-3" }], ["path", { d: "M19 9 8.7 19.3c-1 1-2.5 1-3.4 0l-.6-.6c-1-1-1-2.5 0-3.4L15 5" }], ["path", { d: "m9 11 4 4" }], ["path", { d: "m5 19-3 3" }], ["path", { d: "m14 4 6 6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/table-2.js var Table2; var init_table_2 = __esmMin((() => { Table2 = [["path", { d: "M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/table-cells-merge.js var TableCellsMerge; var init_table_cells_merge = __esmMin((() => { TableCellsMerge = [ ["path", { d: "M12 21v-6" }], ["path", { d: "M12 9V3" }], ["path", { d: "M3 15h18" }], ["path", { d: "M3 9h18" }], ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/table-cells-split.js var TableCellsSplit; var init_table_cells_split = __esmMin((() => { TableCellsSplit = [ ["path", { d: "M12 15V9" }], ["path", { d: "M3 15h18" }], ["path", { d: "M3 9h18" }], ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/table-columns-split.js var TableColumnsSplit; var init_table_columns_split = __esmMin((() => { TableColumnsSplit = [ ["path", { d: "M14 14v2" }], ["path", { d: "M14 20v2" }], ["path", { d: "M14 2v2" }], ["path", { d: "M14 8v2" }], ["path", { d: "M2 15h8" }], ["path", { d: "M2 3h6a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H2" }], ["path", { d: "M2 9h8" }], ["path", { d: "M22 15h-4" }], ["path", { d: "M22 3h-2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h2" }], ["path", { d: "M22 9h-4" }], ["path", { d: "M5 3v18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/table-of-contents.js var TableOfContents; var init_table_of_contents = __esmMin((() => { TableOfContents = [ ["path", { d: "M16 5H3" }], ["path", { d: "M16 12H3" }], ["path", { d: "M16 19H3" }], ["path", { d: "M21 5h.01" }], ["path", { d: "M21 12h.01" }], ["path", { d: "M21 19h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/table-properties.js var TableProperties; var init_table_properties = __esmMin((() => { TableProperties = [ ["path", { d: "M15 3v18" }], ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M21 9H3" }], ["path", { d: "M21 15H3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/table-rows-split.js var TableRowsSplit; var init_table_rows_split = __esmMin((() => { TableRowsSplit = [ ["path", { d: "M14 10h2" }], ["path", { d: "M15 22v-8" }], ["path", { d: "M15 2v4" }], ["path", { d: "M2 10h2" }], ["path", { d: "M20 10h2" }], ["path", { d: "M3 19h18" }], ["path", { d: "M3 22v-6a2 2 135 0 1 2-2h14a2 2 45 0 1 2 2v6" }], ["path", { d: "M3 2v2a2 2 45 0 0 2 2h14a2 2 135 0 0 2-2V2" }], ["path", { d: "M8 10h2" }], ["path", { d: "M9 22v-8" }], ["path", { d: "M9 2v4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/table.js var Table; var init_table = __esmMin((() => { Table = [ ["path", { d: "M12 3v18" }], ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M3 9h18" }], ["path", { d: "M3 15h18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tablet-smartphone.js var TabletSmartphone; var init_tablet_smartphone = __esmMin((() => { TabletSmartphone = [ ["rect", { width: "10", height: "14", x: "3", y: "8", rx: "2" }], ["path", { d: "M5 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2h-2.4" }], ["path", { d: "M8 18h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tablet.js var Tablet; var init_tablet = __esmMin((() => { Tablet = [["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", ry: "2" }], ["line", { x1: "12", x2: "12.01", y1: "18", y2: "18" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tablets.js var Tablets; var init_tablets = __esmMin((() => { Tablets = [ ["circle", { cx: "7", cy: "7", r: "5" }], ["circle", { cx: "17", cy: "17", r: "5" }], ["path", { d: "M12 17h10" }], ["path", { d: "m3.46 10.54 7.08-7.08" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tag.js var Tag; var init_tag = __esmMin((() => { Tag = [["path", { d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z" }], ["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tags.js var Tags; var init_tags = __esmMin((() => { Tags = [ ["path", { d: "M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z" }], ["path", { d: "M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193" }], ["circle", { cx: "10.5", cy: "6.5", r: ".5", fill: "currentColor" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tally-1.js var Tally1; var init_tally_1 = __esmMin((() => { Tally1 = [["path", { d: "M4 4v16" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tally-2.js var Tally2; var init_tally_2 = __esmMin((() => { Tally2 = [["path", { d: "M4 4v16" }], ["path", { d: "M9 4v16" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tally-3.js var Tally3; var init_tally_3 = __esmMin((() => { Tally3 = [ ["path", { d: "M4 4v16" }], ["path", { d: "M9 4v16" }], ["path", { d: "M14 4v16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tally-4.js var Tally4; var init_tally_4 = __esmMin((() => { Tally4 = [ ["path", { d: "M4 4v16" }], ["path", { d: "M9 4v16" }], ["path", { d: "M14 4v16" }], ["path", { d: "M19 4v16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tally-5.js var Tally5; var init_tally_5 = __esmMin((() => { Tally5 = [ ["path", { d: "M4 4v16" }], ["path", { d: "M9 4v16" }], ["path", { d: "M14 4v16" }], ["path", { d: "M19 4v16" }], ["path", { d: "M22 6 2 18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tangent.js var Tangent; var init_tangent = __esmMin((() => { Tangent = [ ["circle", { cx: "17", cy: "4", r: "2" }], ["path", { d: "M15.59 5.41 5.41 15.59" }], ["circle", { cx: "4", cy: "17", r: "2" }], ["path", { d: "M12 22s-4-9-1.5-11.5S22 12 22 12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/target.js var Target; var init_target = __esmMin((() => { Target = [ ["circle", { cx: "12", cy: "12", r: "10" }], ["circle", { cx: "12", cy: "12", r: "6" }], ["circle", { cx: "12", cy: "12", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/telescope.js var Telescope; var init_telescope = __esmMin((() => { Telescope = [ ["path", { d: "m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44" }], ["path", { d: "m13.56 11.747 4.332-.924" }], ["path", { d: "m16 21-3.105-6.21" }], ["path", { d: "M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z" }], ["path", { d: "m6.158 8.633 1.114 4.456" }], ["path", { d: "m8 21 3.105-6.21" }], ["circle", { cx: "12", cy: "13", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tent-tree.js var TentTree; var init_tent_tree = __esmMin((() => { TentTree = [ ["circle", { cx: "4", cy: "4", r: "2" }], ["path", { d: "m14 5 3-3 3 3" }], ["path", { d: "m14 10 3-3 3 3" }], ["path", { d: "M17 14V2" }], ["path", { d: "M17 14H7l-5 8h20Z" }], ["path", { d: "M8 14v8" }], ["path", { d: "m9 14 5 8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tent.js var Tent; var init_tent = __esmMin((() => { Tent = [ ["path", { d: "M3.5 21 14 3" }], ["path", { d: "M20.5 21 10 3" }], ["path", { d: "M15.5 21 12 15l-3.5 6" }], ["path", { d: "M2 21h20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/terminal.js var Terminal; var init_terminal = __esmMin((() => { Terminal = [["path", { d: "M12 19h8" }], ["path", { d: "m4 17 6-6-6-6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/test-tube-diagonal.js var TestTubeDiagonal; var init_test_tube_diagonal = __esmMin((() => { TestTubeDiagonal = [ ["path", { d: "M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3" }], ["path", { d: "m16 2 6 6" }], ["path", { d: "M12 16H4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/test-tube.js var TestTube; var init_test_tube = __esmMin((() => { TestTube = [ ["path", { d: "M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2" }], ["path", { d: "M8.5 2h7" }], ["path", { d: "M14.5 16h-5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/test-tubes.js var TestTubes; var init_test_tubes = __esmMin((() => { TestTubes = [ ["path", { d: "M9 2v17.5A2.5 2.5 0 0 1 6.5 22A2.5 2.5 0 0 1 4 19.5V2" }], ["path", { d: "M20 2v17.5a2.5 2.5 0 0 1-2.5 2.5a2.5 2.5 0 0 1-2.5-2.5V2" }], ["path", { d: "M3 2h7" }], ["path", { d: "M14 2h7" }], ["path", { d: "M9 16H4" }], ["path", { d: "M20 16h-5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/text-align-center.js var TextAlignCenter; var init_text_align_center = __esmMin((() => { TextAlignCenter = [ ["path", { d: "M21 5H3" }], ["path", { d: "M17 12H7" }], ["path", { d: "M19 19H5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/text-align-end.js var TextAlignEnd; var init_text_align_end = __esmMin((() => { TextAlignEnd = [ ["path", { d: "M21 5H3" }], ["path", { d: "M21 12H9" }], ["path", { d: "M21 19H7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/text-align-justify.js var TextAlignJustify; var init_text_align_justify = __esmMin((() => { TextAlignJustify = [ ["path", { d: "M3 5h18" }], ["path", { d: "M3 12h18" }], ["path", { d: "M3 19h18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/text-align-start.js var TextAlignStart; var init_text_align_start = __esmMin((() => { TextAlignStart = [ ["path", { d: "M21 5H3" }], ["path", { d: "M15 12H3" }], ["path", { d: "M17 19H3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/text-cursor-input.js var TextCursorInput; var init_text_cursor_input = __esmMin((() => { TextCursorInput = [ ["path", { d: "M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6" }], ["path", { d: "M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7" }], ["path", { d: "M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1" }], ["path", { d: "M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1" }], ["path", { d: "M9 6v12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/text-cursor.js var TextCursor; var init_text_cursor = __esmMin((() => { TextCursor = [ ["path", { d: "M17 22h-1a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4h1" }], ["path", { d: "M7 22h1a4 4 0 0 0 4-4v-1" }], ["path", { d: "M7 2h1a4 4 0 0 1 4 4v1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/text-initial.js var TextInitial; var init_text_initial = __esmMin((() => { TextInitial = [ ["path", { d: "M15 5h6" }], ["path", { d: "M15 12h6" }], ["path", { d: "M3 19h18" }], ["path", { d: "m3 12 3.553-7.724a.5.5 0 0 1 .894 0L11 12" }], ["path", { d: "M3.92 10h6.16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/text-quote.js var TextQuote; var init_text_quote = __esmMin((() => { TextQuote = [ ["path", { d: "M17 5H3" }], ["path", { d: "M21 12H8" }], ["path", { d: "M21 19H8" }], ["path", { d: "M3 12v7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/text-search.js var TextSearch; var init_text_search = __esmMin((() => { TextSearch = [ ["path", { d: "M21 5H3" }], ["path", { d: "M10 12H3" }], ["path", { d: "M10 19H3" }], ["circle", { cx: "17", cy: "15", r: "3" }], ["path", { d: "m21 19-1.9-1.9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/text-select.js var TextSelect; var init_text_select = __esmMin((() => { TextSelect = [ ["path", { d: "M14 21h1" }], ["path", { d: "M14 3h1" }], ["path", { d: "M19 3a2 2 0 0 1 2 2" }], ["path", { d: "M21 14v1" }], ["path", { d: "M21 19a2 2 0 0 1-2 2" }], ["path", { d: "M21 9v1" }], ["path", { d: "M3 14v1" }], ["path", { d: "M3 9v1" }], ["path", { d: "M5 21a2 2 0 0 1-2-2" }], ["path", { d: "M5 3a2 2 0 0 0-2 2" }], ["path", { d: "M7 12h10" }], ["path", { d: "M7 16h6" }], ["path", { d: "M7 8h8" }], ["path", { d: "M9 21h1" }], ["path", { d: "M9 3h1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/text-wrap.js var TextWrap; var init_text_wrap = __esmMin((() => { TextWrap = [ ["path", { d: "m16 16-3 3 3 3" }], ["path", { d: "M3 12h14.5a1 1 0 0 1 0 7H13" }], ["path", { d: "M3 19h6" }], ["path", { d: "M3 5h18" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/theater.js var Theater; var init_theater = __esmMin((() => { Theater = [ ["path", { d: "M2 10s3-3 3-8" }], ["path", { d: "M22 10s-3-3-3-8" }], ["path", { d: "M10 2c0 4.4-3.6 8-8 8" }], ["path", { d: "M14 2c0 4.4 3.6 8 8 8" }], ["path", { d: "M2 10s2 2 2 5" }], ["path", { d: "M22 10s-2 2-2 5" }], ["path", { d: "M8 15h8" }], ["path", { d: "M2 22v-1a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1" }], ["path", { d: "M14 22v-1a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/thermometer-snowflake.js var ThermometerSnowflake; var init_thermometer_snowflake = __esmMin((() => { ThermometerSnowflake = [ ["path", { d: "m10 20-1.25-2.5L6 18" }], ["path", { d: "M10 4 8.75 6.5 6 6" }], ["path", { d: "M10.585 15H10" }], ["path", { d: "M2 12h6.5L10 9" }], ["path", { d: "M20 14.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0z" }], ["path", { d: "m4 10 1.5 2L4 14" }], ["path", { d: "m7 21 3-6-1.5-3" }], ["path", { d: "m7 3 3 6h2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/thermometer-sun.js var ThermometerSun; var init_thermometer_sun = __esmMin((() => { ThermometerSun = [ ["path", { d: "M12 2v2" }], ["path", { d: "M12 8a4 4 0 0 0-1.645 7.647" }], ["path", { d: "M2 12h2" }], ["path", { d: "M20 14.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0z" }], ["path", { d: "m4.93 4.93 1.41 1.41" }], ["path", { d: "m6.34 17.66-1.41 1.41" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/thermometer.js var Thermometer; var init_thermometer = __esmMin((() => { Thermometer = [["path", { d: "M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/thumbs-down.js var ThumbsDown; var init_thumbs_down = __esmMin((() => { ThumbsDown = [["path", { d: "M17 14V2" }], ["path", { d: "M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/thumbs-up.js var ThumbsUp; var init_thumbs_up = __esmMin((() => { ThumbsUp = [["path", { d: "M7 10v12" }], ["path", { d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ticket-check.js var TicketCheck; var init_ticket_check = __esmMin((() => { TicketCheck = [["path", { d: "M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" }], ["path", { d: "m9 12 2 2 4-4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ticket-minus.js var TicketMinus; var init_ticket_minus = __esmMin((() => { TicketMinus = [["path", { d: "M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" }], ["path", { d: "M9 12h6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ticket-percent.js var TicketPercent; var init_ticket_percent = __esmMin((() => { TicketPercent = [ ["path", { d: "M2 9a3 3 0 1 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 1 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" }], ["path", { d: "M9 9h.01" }], ["path", { d: "m15 9-6 6" }], ["path", { d: "M15 15h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ticket-plus.js var TicketPlus; var init_ticket_plus = __esmMin((() => { TicketPlus = [ ["path", { d: "M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" }], ["path", { d: "M9 12h6" }], ["path", { d: "M12 9v6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ticket-slash.js var TicketSlash; var init_ticket_slash = __esmMin((() => { TicketSlash = [["path", { d: "M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" }], ["path", { d: "m9.5 14.5 5-5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ticket-x.js var TicketX; var init_ticket_x = __esmMin((() => { TicketX = [ ["path", { d: "M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" }], ["path", { d: "m9.5 14.5 5-5" }], ["path", { d: "m9.5 9.5 5 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ticket.js var Ticket; var init_ticket = __esmMin((() => { Ticket = [ ["path", { d: "M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" }], ["path", { d: "M13 5v2" }], ["path", { d: "M13 17v2" }], ["path", { d: "M13 11v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tickets-plane.js var TicketsPlane; var init_tickets_plane = __esmMin((() => { TicketsPlane = [ ["path", { d: "M10.5 17h1.227a2 2 0 0 0 1.345-.52L18 12" }], ["path", { d: "m12 13.5 3.75.5" }], ["path", { d: "m4.5 8 10.58-5.06a1 1 0 0 1 1.342.488L18.5 8" }], ["path", { d: "M6 10V8" }], ["path", { d: "M6 14v1" }], ["path", { d: "M6 19v2" }], ["rect", { x: "2", y: "8", width: "20", height: "13", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tickets.js var Tickets; var init_tickets = __esmMin((() => { Tickets = [ ["path", { d: "m4.5 8 10.58-5.06a1 1 0 0 1 1.342.488L18.5 8" }], ["path", { d: "M6 10V8" }], ["path", { d: "M6 14v1" }], ["path", { d: "M6 19v2" }], ["rect", { x: "2", y: "8", width: "20", height: "13", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/timer-off.js var TimerOff; var init_timer_off = __esmMin((() => { TimerOff = [ ["path", { d: "M10 2h4" }], ["path", { d: "M4.6 11a8 8 0 0 0 1.7 8.7 8 8 0 0 0 8.7 1.7" }], ["path", { d: "M7.4 7.4a8 8 0 0 1 10.3 1 8 8 0 0 1 .9 10.2" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M12 12v-2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/timer-reset.js var TimerReset; var init_timer_reset = __esmMin((() => { TimerReset = [ ["path", { d: "M10 2h4" }], ["path", { d: "M12 14v-4" }], ["path", { d: "M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6" }], ["path", { d: "M9 17H4v5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/timer.js var Timer; var init_timer = __esmMin((() => { Timer = [ ["line", { x1: "10", x2: "14", y1: "2", y2: "2" }], ["line", { x1: "12", x2: "15", y1: "14", y2: "11" }], ["circle", { cx: "12", cy: "14", r: "8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/toggle-left.js var ToggleLeft; var init_toggle_left = __esmMin((() => { ToggleLeft = [["circle", { cx: "9", cy: "12", r: "3" }], ["rect", { width: "20", height: "14", x: "2", y: "5", rx: "7" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/toggle-right.js var ToggleRight; var init_toggle_right = __esmMin((() => { ToggleRight = [["circle", { cx: "15", cy: "12", r: "3" }], ["rect", { width: "20", height: "14", x: "2", y: "5", rx: "7" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/toilet.js var Toilet; var init_toilet = __esmMin((() => { Toilet = [["path", { d: "M7 12h13a1 1 0 0 1 1 1 5 5 0 0 1-5 5h-.598a.5.5 0 0 0-.424.765l1.544 2.47a.5.5 0 0 1-.424.765H5.402a.5.5 0 0 1-.424-.765L7 18" }], ["path", { d: "M8 18a5 5 0 0 1-5-5V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tool-case.js var ToolCase; var init_tool_case = __esmMin((() => { ToolCase = [ ["path", { d: "M10 15h4" }], ["path", { d: "m14.817 10.995-.971-1.45 1.034-1.232a2 2 0 0 0-2.025-3.238l-1.82.364L9.91 3.885a2 2 0 0 0-3.625.748L6.141 6.55l-1.725.426a2 2 0 0 0-.19 3.756l.657.27" }], ["path", { d: "m18.822 10.995 2.26-5.38a1 1 0 0 0-.557-1.318L16.954 2.9a1 1 0 0 0-1.281.533l-.924 2.122" }], ["path", { d: "M4 12.006A1 1 0 0 1 4.994 11H19a1 1 0 0 1 1 1v7a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tornado.js var Tornado; var init_tornado = __esmMin((() => { Tornado = [ ["path", { d: "M21 4H3" }], ["path", { d: "M18 8H6" }], ["path", { d: "M19 12H9" }], ["path", { d: "M16 16h-6" }], ["path", { d: "M11 20H9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/touchpad-off.js var TouchpadOff; var init_touchpad_off = __esmMin((() => { TouchpadOff = [ ["path", { d: "M12 20v-6" }], ["path", { d: "M19.656 14H22" }], ["path", { d: "M2 14h12" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M20 20H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2" }], ["path", { d: "M9.656 4H20a2 2 0 0 1 2 2v10.344" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/torus.js var Torus; var init_torus = __esmMin((() => { Torus = [["ellipse", { cx: "12", cy: "11", rx: "3", ry: "2" }], ["ellipse", { cx: "12", cy: "12.5", rx: "10", ry: "8.5" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/touchpad.js var Touchpad; var init_touchpad = __esmMin((() => { Touchpad = [ ["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2" }], ["path", { d: "M2 14h20" }], ["path", { d: "M12 20v-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tower-control.js var TowerControl; var init_tower_control = __esmMin((() => { TowerControl = [ ["path", { d: "M18.2 12.27 20 6H4l1.8 6.27a1 1 0 0 0 .95.73h10.5a1 1 0 0 0 .96-.73Z" }], ["path", { d: "M8 13v9" }], ["path", { d: "M16 22v-9" }], ["path", { d: "m9 6 1 7" }], ["path", { d: "m15 6-1 7" }], ["path", { d: "M12 6V2" }], ["path", { d: "M13 2h-2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/toy-brick.js var ToyBrick; var init_toy_brick = __esmMin((() => { ToyBrick = [ ["rect", { width: "18", height: "12", x: "3", y: "8", rx: "1" }], ["path", { d: "M10 8V5c0-.6-.4-1-1-1H6a1 1 0 0 0-1 1v3" }], ["path", { d: "M19 8V5c0-.6-.4-1-1-1h-3a1 1 0 0 0-1 1v3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tractor.js var Tractor; var init_tractor = __esmMin((() => { Tractor = [ ["path", { d: "m10 11 11 .9a1 1 0 0 1 .8 1.1l-.665 4.158a1 1 0 0 1-.988.842H20" }], ["path", { d: "M16 18h-5" }], ["path", { d: "M18 5a1 1 0 0 0-1 1v5.573" }], ["path", { d: "M3 4h8.129a1 1 0 0 1 .99.863L13 11.246" }], ["path", { d: "M4 11V4" }], ["path", { d: "M7 15h.01" }], ["path", { d: "M8 10.1V4" }], ["circle", { cx: "18", cy: "18", r: "2" }], ["circle", { cx: "7", cy: "15", r: "5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/traffic-cone.js var TrafficCone; var init_traffic_cone = __esmMin((() => { TrafficCone = [ ["path", { d: "M16.05 10.966a5 2.5 0 0 1-8.1 0" }], ["path", { d: "m16.923 14.049 4.48 2.04a1 1 0 0 1 .001 1.831l-8.574 3.9a2 2 0 0 1-1.66 0l-8.574-3.91a1 1 0 0 1 0-1.83l4.484-2.04" }], ["path", { d: "M16.949 14.14a5 2.5 0 1 1-9.9 0L10.063 3.5a2 2 0 0 1 3.874 0z" }], ["path", { d: "M9.194 6.57a5 2.5 0 0 0 5.61 0" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/train-front-tunnel.js var TrainFrontTunnel; var init_train_front_tunnel = __esmMin((() => { TrainFrontTunnel = [ ["path", { d: "M2 22V12a10 10 0 1 1 20 0v10" }], ["path", { d: "M15 6.8v1.4a3 2.8 0 1 1-6 0V6.8" }], ["path", { d: "M10 15h.01" }], ["path", { d: "M14 15h.01" }], ["path", { d: "M10 19a4 4 0 0 1-4-4v-3a6 6 0 1 1 12 0v3a4 4 0 0 1-4 4Z" }], ["path", { d: "m9 19-2 3" }], ["path", { d: "m15 19 2 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/train-front.js var TrainFront; var init_train_front = __esmMin((() => { TrainFront = [ ["path", { d: "M8 3.1V7a4 4 0 0 0 8 0V3.1" }], ["path", { d: "m9 15-1-1" }], ["path", { d: "m15 15 1-1" }], ["path", { d: "M9 19c-2.8 0-5-2.2-5-5v-4a8 8 0 0 1 16 0v4c0 2.8-2.2 5-5 5Z" }], ["path", { d: "m8 19-2 3" }], ["path", { d: "m16 19 2 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/train-track.js var TrainTrack; var init_train_track = __esmMin((() => { TrainTrack = [ ["path", { d: "M2 17 17 2" }], ["path", { d: "m2 14 8 8" }], ["path", { d: "m5 11 8 8" }], ["path", { d: "m8 8 8 8" }], ["path", { d: "m11 5 8 8" }], ["path", { d: "m14 2 8 8" }], ["path", { d: "M7 22 22 7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tram-front.js var TramFront; var init_tram_front = __esmMin((() => { TramFront = [ ["rect", { width: "16", height: "16", x: "4", y: "3", rx: "2" }], ["path", { d: "M4 11h16" }], ["path", { d: "M12 3v8" }], ["path", { d: "m8 19-2 3" }], ["path", { d: "m18 22-2-3" }], ["path", { d: "M8 15h.01" }], ["path", { d: "M16 15h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/transgender.js var Transgender; var init_transgender = __esmMin((() => { Transgender = [ ["path", { d: "M12 16v6" }], ["path", { d: "M14 20h-4" }], ["path", { d: "M18 2h4v4" }], ["path", { d: "m2 2 7.17 7.17" }], ["path", { d: "M2 5.355V2h3.357" }], ["path", { d: "m22 2-7.17 7.17" }], ["path", { d: "M8 5 5 8" }], ["circle", { cx: "12", cy: "12", r: "4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/trash-2.js var Trash2; var init_trash_2 = __esmMin((() => { Trash2 = [ ["path", { d: "M10 11v6" }], ["path", { d: "M14 11v6" }], ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }], ["path", { d: "M3 6h18" }], ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/trash.js var Trash; var init_trash = __esmMin((() => { Trash = [ ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }], ["path", { d: "M3 6h18" }], ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tree-deciduous.js var TreeDeciduous; var init_tree_deciduous = __esmMin((() => { TreeDeciduous = [["path", { d: "M8 19a4 4 0 0 1-2.24-7.32A3.5 3.5 0 0 1 9 6.03V6a3 3 0 1 1 6 0v.04a3.5 3.5 0 0 1 3.24 5.65A4 4 0 0 1 16 19Z" }], ["path", { d: "M12 19v3" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tree-palm.js var TreePalm; var init_tree_palm = __esmMin((() => { TreePalm = [ ["path", { d: "M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4" }], ["path", { d: "M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3" }], ["path", { d: "M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35" }], ["path", { d: "M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tree-pine.js var TreePine; var init_tree_pine = __esmMin((() => { TreePine = [["path", { d: "m17 14 3 3.3a1 1 0 0 1-.7 1.7H4.7a1 1 0 0 1-.7-1.7L7 14h-.3a1 1 0 0 1-.7-1.7L9 9h-.2A1 1 0 0 1 8 7.3L12 3l4 4.3a1 1 0 0 1-.8 1.7H15l3 3.3a1 1 0 0 1-.7 1.7H17Z" }], ["path", { d: "M12 22v-3" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/trees.js var Trees; var init_trees = __esmMin((() => { Trees = [ ["path", { d: "M10 10v.2A3 3 0 0 1 8.9 16H5a3 3 0 0 1-1-5.8V10a3 3 0 0 1 6 0Z" }], ["path", { d: "M7 16v6" }], ["path", { d: "M13 19v3" }], ["path", { d: "M12 19h8.3a1 1 0 0 0 .7-1.7L18 14h.3a1 1 0 0 0 .7-1.7L16 9h.2a1 1 0 0 0 .8-1.7L13 3l-1.4 1.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/trello.js var Trello; var init_trello = __esmMin((() => { Trello = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }], ["rect", { width: "3", height: "9", x: "7", y: "7" }], ["rect", { width: "3", height: "5", x: "14", y: "7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/trending-down.js var TrendingDown; var init_trending_down = __esmMin((() => { TrendingDown = [["path", { d: "M16 17h6v-6" }], ["path", { d: "m22 17-8.5-8.5-5 5L2 7" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/trending-up-down.js var TrendingUpDown; var init_trending_up_down = __esmMin((() => { TrendingUpDown = [ ["path", { d: "M14.828 14.828 21 21" }], ["path", { d: "M21 16v5h-5" }], ["path", { d: "m21 3-9 9-4-4-6 6" }], ["path", { d: "M21 8V3h-5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/trending-up.js var TrendingUp; var init_trending_up = __esmMin((() => { TrendingUp = [["path", { d: "M16 7h6v6" }], ["path", { d: "m22 7-8.5 8.5-5-5L2 17" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/triangle-alert.js var TriangleAlert; var init_triangle_alert = __esmMin((() => { TriangleAlert = [ ["path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }], ["path", { d: "M12 9v4" }], ["path", { d: "M12 17h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/triangle-dashed.js var TriangleDashed; var init_triangle_dashed = __esmMin((() => { TriangleDashed = [ ["path", { d: "M10.17 4.193a2 2 0 0 1 3.666.013" }], ["path", { d: "M14 21h2" }], ["path", { d: "m15.874 7.743 1 1.732" }], ["path", { d: "m18.849 12.952 1 1.732" }], ["path", { d: "M21.824 18.18a2 2 0 0 1-1.835 2.824" }], ["path", { d: "M4.024 21a2 2 0 0 1-1.839-2.839" }], ["path", { d: "m5.136 12.952-1 1.732" }], ["path", { d: "M8 21h2" }], ["path", { d: "m8.102 7.743-1 1.732" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/triangle-right.js var TriangleRight; var init_triangle_right = __esmMin((() => { TriangleRight = [["path", { d: "M22 18a2 2 0 0 1-2 2H3c-1.1 0-1.3-.6-.4-1.3L20.4 4.3c.9-.7 1.6-.4 1.6.7Z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/trophy.js var Trophy; var init_trophy = __esmMin((() => { Trophy = [ ["path", { d: "M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978" }], ["path", { d: "M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978" }], ["path", { d: "M18 9h1.5a1 1 0 0 0 0-5H18" }], ["path", { d: "M4 22h16" }], ["path", { d: "M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z" }], ["path", { d: "M6 9H4.5a1 1 0 0 1 0-5H6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/triangle.js var Triangle; var init_triangle = __esmMin((() => { Triangle = [["path", { d: "M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/truck-electric.js var TruckElectric; var init_truck_electric = __esmMin((() => { TruckElectric = [ ["path", { d: "M14 19V7a2 2 0 0 0-2-2H9" }], ["path", { d: "M15 19H9" }], ["path", { d: "M19 19h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.62L18.3 9.38a1 1 0 0 0-.78-.38H14" }], ["path", { d: "M2 13v5a1 1 0 0 0 1 1h2" }], ["path", { d: "M4 3 2.15 5.15a.495.495 0 0 0 .35.86h2.15a.47.47 0 0 1 .35.86L3 9.02" }], ["circle", { cx: "17", cy: "19", r: "2" }], ["circle", { cx: "7", cy: "19", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/truck.js var Truck; var init_truck = __esmMin((() => { Truck = [ ["path", { d: "M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2" }], ["path", { d: "M15 18H9" }], ["path", { d: "M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14" }], ["circle", { cx: "17", cy: "18", r: "2" }], ["circle", { cx: "7", cy: "18", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/turkish-lira.js var TurkishLira; var init_turkish_lira = __esmMin((() => { TurkishLira = [ ["path", { d: "M15 4 5 9" }], ["path", { d: "m15 8.5-10 5" }], ["path", { d: "M18 12a9 9 0 0 1-9 9V3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/turntable.js var Turntable; var init_turntable = __esmMin((() => { Turntable = [ ["path", { d: "M10 12.01h.01" }], ["path", { d: "M18 8v4a8 8 0 0 1-1.07 4" }], ["circle", { cx: "10", cy: "12", r: "4" }], ["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/turtle.js var Turtle; var init_turtle = __esmMin((() => { Turtle = [ ["path", { d: "m12 10 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a8 8 0 1 0-16 0v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3l2-4h4Z" }], ["path", { d: "M4.82 7.9 8 10" }], ["path", { d: "M15.18 7.9 12 10" }], ["path", { d: "M16.93 10H20a2 2 0 0 1 0 4H2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tv-minimal-play.js var TvMinimalPlay; var init_tv_minimal_play = __esmMin((() => { TvMinimalPlay = [ ["path", { d: "M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.645.645 0 0 1 .967-.56z" }], ["path", { d: "M7 21h10" }], ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tv-minimal.js var TvMinimal; var init_tv_minimal = __esmMin((() => { TvMinimal = [["path", { d: "M7 21h10" }], ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/tv.js var Tv; var init_tv = __esmMin((() => { Tv = [["path", { d: "m17 2-5 5-5-5" }], ["rect", { width: "20", height: "15", x: "2", y: "7", rx: "2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/twitch.js var Twitch; var init_twitch = __esmMin((() => { Twitch = [["path", { d: "M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/twitter.js var Twitter; var init_twitter = __esmMin((() => { Twitter = [["path", { d: "M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/type-outline.js var TypeOutline; var init_type_outline = __esmMin((() => { TypeOutline = [["path", { d: "M14 16.5a.5.5 0 0 0 .5.5h.5a2 2 0 0 1 0 4H9a2 2 0 0 1 0-4h.5a.5.5 0 0 0 .5-.5v-9a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5V8a2 2 0 0 1-4 0V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v3a2 2 0 0 1-4 0v-.5a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5Z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/type.js var Type$1; var init_type$6 = __esmMin((() => { Type$1 = [ ["path", { d: "M12 4v16" }], ["path", { d: "M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2" }], ["path", { d: "M9 20h6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/umbrella-off.js var UmbrellaOff; var init_umbrella_off = __esmMin((() => { UmbrellaOff = [ ["path", { d: "M12 13v7a2 2 0 0 0 4 0" }], ["path", { d: "M12 2v2" }], ["path", { d: "M18.656 13h2.336a1 1 0 0 0 .97-1.274 10.284 10.284 0 0 0-12.07-7.51" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "M5.961 5.957a10.28 10.28 0 0 0-3.922 5.769A1 1 0 0 0 3 13h10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/umbrella.js var Umbrella; var init_umbrella = __esmMin((() => { Umbrella = [ ["path", { d: "M12 13v7a2 2 0 0 0 4 0" }], ["path", { d: "M12 2v2" }], ["path", { d: "M20.992 13a1 1 0 0 0 .97-1.274 10.284 10.284 0 0 0-19.923 0A1 1 0 0 0 3 13z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/underline.js var Underline; var init_underline = __esmMin((() => { Underline = [["path", { d: "M6 4v6a6 6 0 0 0 12 0V4" }], ["line", { x1: "4", x2: "20", y1: "20", y2: "20" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/undo-2.js var Undo2; var init_undo_2 = __esmMin((() => { Undo2 = [["path", { d: "M9 14 4 9l5-5" }], ["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/undo-dot.js var UndoDot; var init_undo_dot = __esmMin((() => { UndoDot = [ ["path", { d: "M21 17a9 9 0 0 0-15-6.7L3 13" }], ["path", { d: "M3 7v6h6" }], ["circle", { cx: "12", cy: "17", r: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/undo.js var Undo; var init_undo = __esmMin((() => { Undo = [["path", { d: "M3 7v6h6" }], ["path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/unfold-horizontal.js var UnfoldHorizontal; var init_unfold_horizontal = __esmMin((() => { UnfoldHorizontal = [ ["path", { d: "M16 12h6" }], ["path", { d: "M8 12H2" }], ["path", { d: "M12 2v2" }], ["path", { d: "M12 8v2" }], ["path", { d: "M12 14v2" }], ["path", { d: "M12 20v2" }], ["path", { d: "m19 15 3-3-3-3" }], ["path", { d: "m5 9-3 3 3 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/unfold-vertical.js var UnfoldVertical; var init_unfold_vertical = __esmMin((() => { UnfoldVertical = [ ["path", { d: "M12 22v-6" }], ["path", { d: "M12 8V2" }], ["path", { d: "M4 12H2" }], ["path", { d: "M10 12H8" }], ["path", { d: "M16 12h-2" }], ["path", { d: "M22 12h-2" }], ["path", { d: "m15 19-3 3-3-3" }], ["path", { d: "m15 5-3-3-3 3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/ungroup.js var Ungroup; var init_ungroup = __esmMin((() => { Ungroup = [["rect", { width: "8", height: "6", x: "5", y: "4", rx: "1" }], ["rect", { width: "8", height: "6", x: "11", y: "14", rx: "1" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/university.js var University; var init_university = __esmMin((() => { University = [ ["path", { d: "M14 21v-3a2 2 0 0 0-4 0v3" }], ["path", { d: "M18 12h.01" }], ["path", { d: "M18 16h.01" }], ["path", { d: "M22 7a1 1 0 0 0-1-1h-2a2 2 0 0 1-1.143-.359L13.143 2.36a2 2 0 0 0-2.286-.001L6.143 5.64A2 2 0 0 1 5 6H3a1 1 0 0 0-1 1v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2z" }], ["path", { d: "M6 12h.01" }], ["path", { d: "M6 16h.01" }], ["circle", { cx: "12", cy: "10", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/unlink-2.js var Unlink2; var init_unlink_2 = __esmMin((() => { Unlink2 = [["path", { d: "M15 7h2a5 5 0 0 1 0 10h-2m-6 0H7A5 5 0 0 1 7 7h2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/unlink.js var Unlink; var init_unlink = __esmMin((() => { Unlink = [ ["path", { d: "m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71" }], ["path", { d: "m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71" }], ["line", { x1: "8", x2: "8", y1: "2", y2: "5" }], ["line", { x1: "2", x2: "5", y1: "8", y2: "8" }], ["line", { x1: "16", x2: "16", y1: "19", y2: "22" }], ["line", { x1: "19", x2: "22", y1: "16", y2: "16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/upload.js var Upload; var init_upload = __esmMin((() => { Upload = [ ["path", { d: "M12 3v12" }], ["path", { d: "m17 8-5-5-5 5" }], ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/unplug.js var Unplug; var init_unplug = __esmMin((() => { Unplug = [ ["path", { d: "m19 5 3-3" }], ["path", { d: "m2 22 3-3" }], ["path", { d: "M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z" }], ["path", { d: "M7.5 13.5 10 11" }], ["path", { d: "M10.5 16.5 13 14" }], ["path", { d: "m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/usb.js var Usb; var init_usb = __esmMin((() => { Usb = [ ["circle", { cx: "10", cy: "7", r: "1" }], ["circle", { cx: "4", cy: "20", r: "1" }], ["path", { d: "M4.7 19.3 19 5" }], ["path", { d: "m21 3-3 1 2 2Z" }], ["path", { d: "M9.26 7.68 5 12l2 5" }], ["path", { d: "m10 14 5 2 3.5-3.5" }], ["path", { d: "m18 12 1-1 1 1-1 1Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/user-cog.js var UserCog; var init_user_cog = __esmMin((() => { UserCog = [ ["path", { d: "M10 15H6a4 4 0 0 0-4 4v2" }], ["path", { d: "m14.305 16.53.923-.382" }], ["path", { d: "m15.228 13.852-.923-.383" }], ["path", { d: "m16.852 12.228-.383-.923" }], ["path", { d: "m16.852 17.772-.383.924" }], ["path", { d: "m19.148 12.228.383-.923" }], ["path", { d: "m19.53 18.696-.382-.924" }], ["path", { d: "m20.772 13.852.924-.383" }], ["path", { d: "m20.772 16.148.924.383" }], ["circle", { cx: "18", cy: "15", r: "3" }], ["circle", { cx: "9", cy: "7", r: "4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/user-check.js var UserCheck; var init_user_check = __esmMin((() => { UserCheck = [ ["path", { d: "m16 11 2 2 4-4" }], ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }], ["circle", { cx: "9", cy: "7", r: "4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/user-lock.js var UserLock; var init_user_lock = __esmMin((() => { UserLock = [ ["circle", { cx: "10", cy: "7", r: "4" }], ["path", { d: "M10.3 15H7a4 4 0 0 0-4 4v2" }], ["path", { d: "M15 15.5V14a2 2 0 0 1 4 0v1.5" }], ["rect", { width: "8", height: "5", x: "13", y: "16", rx: ".899" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/user-minus.js var UserMinus; var init_user_minus = __esmMin((() => { UserMinus = [ ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }], ["circle", { cx: "9", cy: "7", r: "4" }], ["line", { x1: "22", x2: "16", y1: "11", y2: "11" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/user-pen.js var UserPen; var init_user_pen = __esmMin((() => { UserPen = [ ["path", { d: "M11.5 15H7a4 4 0 0 0-4 4v2" }], ["path", { d: "M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }], ["circle", { cx: "10", cy: "7", r: "4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/user-plus.js var UserPlus; var init_user_plus = __esmMin((() => { UserPlus = [ ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }], ["circle", { cx: "9", cy: "7", r: "4" }], ["line", { x1: "19", x2: "19", y1: "8", y2: "14" }], ["line", { x1: "22", x2: "16", y1: "11", y2: "11" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/user-round-check.js var UserRoundCheck; var init_user_round_check = __esmMin((() => { UserRoundCheck = [ ["path", { d: "M2 21a8 8 0 0 1 13.292-6" }], ["circle", { cx: "10", cy: "8", r: "5" }], ["path", { d: "m16 19 2 2 4-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/user-round-cog.js var UserRoundCog; var init_user_round_cog = __esmMin((() => { UserRoundCog = [ ["path", { d: "m14.305 19.53.923-.382" }], ["path", { d: "m15.228 16.852-.923-.383" }], ["path", { d: "m16.852 15.228-.383-.923" }], ["path", { d: "m16.852 20.772-.383.924" }], ["path", { d: "m19.148 15.228.383-.923" }], ["path", { d: "m19.53 21.696-.382-.924" }], ["path", { d: "M2 21a8 8 0 0 1 10.434-7.62" }], ["path", { d: "m20.772 16.852.924-.383" }], ["path", { d: "m20.772 19.148.924.383" }], ["circle", { cx: "10", cy: "8", r: "5" }], ["circle", { cx: "18", cy: "18", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/user-round-minus.js var UserRoundMinus; var init_user_round_minus = __esmMin((() => { UserRoundMinus = [ ["path", { d: "M2 21a8 8 0 0 1 13.292-6" }], ["circle", { cx: "10", cy: "8", r: "5" }], ["path", { d: "M22 19h-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/user-round-pen.js var UserRoundPen; var init_user_round_pen = __esmMin((() => { UserRoundPen = [ ["path", { d: "M2 21a8 8 0 0 1 10.821-7.487" }], ["path", { d: "M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }], ["circle", { cx: "10", cy: "8", r: "5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/user-round-plus.js var UserRoundPlus; var init_user_round_plus = __esmMin((() => { UserRoundPlus = [ ["path", { d: "M2 21a8 8 0 0 1 13.292-6" }], ["circle", { cx: "10", cy: "8", r: "5" }], ["path", { d: "M19 16v6" }], ["path", { d: "M22 19h-6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/user-round-search.js var UserRoundSearch; var init_user_round_search = __esmMin((() => { UserRoundSearch = [ ["circle", { cx: "10", cy: "8", r: "5" }], ["path", { d: "M2 21a8 8 0 0 1 10.434-7.62" }], ["circle", { cx: "18", cy: "18", r: "3" }], ["path", { d: "m22 22-1.9-1.9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/user-round-x.js var UserRoundX; var init_user_round_x = __esmMin((() => { UserRoundX = [ ["path", { d: "M2 21a8 8 0 0 1 11.873-7" }], ["circle", { cx: "10", cy: "8", r: "5" }], ["path", { d: "m17 17 5 5" }], ["path", { d: "m22 17-5 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/user-round.js var UserRound; var init_user_round = __esmMin((() => { UserRound = [["circle", { cx: "12", cy: "8", r: "5" }], ["path", { d: "M20 21a8 8 0 0 0-16 0" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/user-search.js var UserSearch; var init_user_search = __esmMin((() => { UserSearch = [ ["circle", { cx: "10", cy: "7", r: "4" }], ["path", { d: "M10.3 15H7a4 4 0 0 0-4 4v2" }], ["circle", { cx: "17", cy: "17", r: "3" }], ["path", { d: "m21 21-1.9-1.9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/user-star.js var UserStar; var init_user_star = __esmMin((() => { UserStar = [ ["path", { d: "M16.051 12.616a1 1 0 0 1 1.909.024l.737 1.452a1 1 0 0 0 .737.535l1.634.256a1 1 0 0 1 .588 1.806l-1.172 1.168a1 1 0 0 0-.282.866l.259 1.613a1 1 0 0 1-1.541 1.134l-1.465-.75a1 1 0 0 0-.912 0l-1.465.75a1 1 0 0 1-1.539-1.133l.258-1.613a1 1 0 0 0-.282-.866l-1.156-1.153a1 1 0 0 1 .572-1.822l1.633-.256a1 1 0 0 0 .737-.535z" }], ["path", { d: "M8 15H7a4 4 0 0 0-4 4v2" }], ["circle", { cx: "10", cy: "7", r: "4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/user-x.js var UserX; var init_user_x = __esmMin((() => { UserX = [ ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }], ["circle", { cx: "9", cy: "7", r: "4" }], ["line", { x1: "17", x2: "22", y1: "8", y2: "13" }], ["line", { x1: "22", x2: "17", y1: "8", y2: "13" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/user.js var User; var init_user = __esmMin((() => { User = [["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }], ["circle", { cx: "12", cy: "7", r: "4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/users-round.js var UsersRound; var init_users_round = __esmMin((() => { UsersRound = [ ["path", { d: "M18 21a8 8 0 0 0-16 0" }], ["circle", { cx: "10", cy: "8", r: "5" }], ["path", { d: "M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/users.js var Users; var init_users = __esmMin((() => { Users = [ ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }], ["path", { d: "M16 3.128a4 4 0 0 1 0 7.744" }], ["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87" }], ["circle", { cx: "9", cy: "7", r: "4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/utensils-crossed.js var UtensilsCrossed; var init_utensils_crossed = __esmMin((() => { UtensilsCrossed = [ ["path", { d: "m16 2-2.3 2.3a3 3 0 0 0 0 4.2l1.8 1.8a3 3 0 0 0 4.2 0L22 8" }], ["path", { d: "M15 15 3.3 3.3a4.2 4.2 0 0 0 0 6l7.3 7.3c.7.7 2 .7 2.8 0L15 15Zm0 0 7 7" }], ["path", { d: "m2.1 21.8 6.4-6.3" }], ["path", { d: "m19 5-7 7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/utensils.js var Utensils; var init_utensils = __esmMin((() => { Utensils = [ ["path", { d: "M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2" }], ["path", { d: "M7 2v20" }], ["path", { d: "M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/utility-pole.js var UtilityPole; var init_utility_pole = __esmMin((() => { UtilityPole = [ ["path", { d: "M12 2v20" }], ["path", { d: "M2 5h20" }], ["path", { d: "M3 3v2" }], ["path", { d: "M7 3v2" }], ["path", { d: "M17 3v2" }], ["path", { d: "M21 3v2" }], ["path", { d: "m19 5-7 7-7-7" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/van.js var Van; var init_van = __esmMin((() => { Van = [ ["path", { d: "M13 6v5a1 1 0 0 0 1 1h6.102a1 1 0 0 1 .712.298l.898.91a1 1 0 0 1 .288.702V17a1 1 0 0 1-1 1h-3" }], ["path", { d: "M5 18H3a1 1 0 0 1-1-1V8a2 2 0 0 1 2-2h12c1.1 0 2.1.8 2.4 1.8l1.176 4.2" }], ["path", { d: "M9 18h5" }], ["circle", { cx: "16", cy: "18", r: "2" }], ["circle", { cx: "7", cy: "18", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/vault.js var Vault; var init_vault = __esmMin((() => { Vault = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor" }], ["path", { d: "m7.9 7.9 2.7 2.7" }], ["circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor" }], ["path", { d: "m13.4 10.6 2.7-2.7" }], ["circle", { cx: "7.5", cy: "16.5", r: ".5", fill: "currentColor" }], ["path", { d: "m7.9 16.1 2.7-2.7" }], ["circle", { cx: "16.5", cy: "16.5", r: ".5", fill: "currentColor" }], ["path", { d: "m13.4 13.4 2.7 2.7" }], ["circle", { cx: "12", cy: "12", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/variable.js var Variable; var init_variable = __esmMin((() => { Variable = [ ["path", { d: "M8 21s-4-3-4-9 4-9 4-9" }], ["path", { d: "M16 3s4 3 4 9-4 9-4 9" }], ["line", { x1: "15", x2: "9", y1: "9", y2: "15" }], ["line", { x1: "9", x2: "15", y1: "9", y2: "15" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/vector-square.js var VectorSquare; var init_vector_square = __esmMin((() => { VectorSquare = [ ["path", { d: "M19.5 7a24 24 0 0 1 0 10" }], ["path", { d: "M4.5 7a24 24 0 0 0 0 10" }], ["path", { d: "M7 19.5a24 24 0 0 0 10 0" }], ["path", { d: "M7 4.5a24 24 0 0 1 10 0" }], ["rect", { x: "17", y: "17", width: "5", height: "5", rx: "1" }], ["rect", { x: "17", y: "2", width: "5", height: "5", rx: "1" }], ["rect", { x: "2", y: "17", width: "5", height: "5", rx: "1" }], ["rect", { x: "2", y: "2", width: "5", height: "5", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/vegan.js var Vegan; var init_vegan = __esmMin((() => { Vegan = [ ["path", { d: "M16 8q6 0 6-6-6 0-6 6" }], ["path", { d: "M17.41 3.59a10 10 0 1 0 3 3" }], ["path", { d: "M2 2a26.6 26.6 0 0 1 10 20c.9-6.82 1.5-9.5 4-14" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/venetian-mask.js var VenetianMask; var init_venetian_mask = __esmMin((() => { VenetianMask = [ ["path", { d: "M18 11c-1.5 0-2.5.5-3 2" }], ["path", { d: "M4 6a2 2 0 0 0-2 2v4a5 5 0 0 0 5 5 8 8 0 0 1 5 2 8 8 0 0 1 5-2 5 5 0 0 0 5-5V8a2 2 0 0 0-2-2h-3a8 8 0 0 0-5 2 8 8 0 0 0-5-2z" }], ["path", { d: "M6 11c1.5 0 2.5.5 3 2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/venus-and-mars.js var VenusAndMars; var init_venus_and_mars = __esmMin((() => { VenusAndMars = [ ["path", { d: "M10 20h4" }], ["path", { d: "M12 16v6" }], ["path", { d: "M17 2h4v4" }], ["path", { d: "m21 2-5.46 5.46" }], ["circle", { cx: "12", cy: "11", r: "5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/venus.js var Venus; var init_venus = __esmMin((() => { Venus = [ ["path", { d: "M12 15v7" }], ["path", { d: "M9 19h6" }], ["circle", { cx: "12", cy: "9", r: "6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/vibrate-off.js var VibrateOff; var init_vibrate_off = __esmMin((() => { VibrateOff = [ ["path", { d: "m2 8 2 2-2 2 2 2-2 2" }], ["path", { d: "m22 8-2 2 2 2-2 2 2 2" }], ["path", { d: "M8 8v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2" }], ["path", { d: "M16 10.34V6c0-.55-.45-1-1-1h-4.34" }], ["line", { x1: "2", x2: "22", y1: "2", y2: "22" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/vibrate.js var Vibrate; var init_vibrate = __esmMin((() => { Vibrate = [ ["path", { d: "m2 8 2 2-2 2 2 2-2 2" }], ["path", { d: "m22 8-2 2 2 2-2 2 2 2" }], ["rect", { width: "8", height: "14", x: "8", y: "5", rx: "1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/video-off.js var VideoOff; var init_video_off = __esmMin((() => { VideoOff = [ ["path", { d: "M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196" }], ["path", { d: "M16 16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2" }], ["path", { d: "m2 2 20 20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/video.js var Video; var init_video = __esmMin((() => { Video = [["path", { d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5" }], ["rect", { x: "2", y: "6", width: "14", height: "12", rx: "2" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/videotape.js var Videotape; var init_videotape = __esmMin((() => { Videotape = [ ["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2" }], ["path", { d: "M2 8h20" }], ["circle", { cx: "8", cy: "14", r: "2" }], ["path", { d: "M8 12h8" }], ["circle", { cx: "16", cy: "14", r: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/view.js var View; var init_view = __esmMin((() => { View = [ ["path", { d: "M21 17v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2" }], ["path", { d: "M21 7V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2" }], ["circle", { cx: "12", cy: "12", r: "1" }], ["path", { d: "M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/volleyball.js var Volleyball; var init_volleyball = __esmMin((() => { Volleyball = [ ["path", { d: "M11.1 7.1a16.55 16.55 0 0 1 10.9 4" }], ["path", { d: "M12 12a12.6 12.6 0 0 1-8.7 5" }], ["path", { d: "M16.8 13.6a16.55 16.55 0 0 1-9 7.5" }], ["path", { d: "M20.7 17a12.8 12.8 0 0 0-8.7-5 13.3 13.3 0 0 1 0-10" }], ["path", { d: "M6.3 3.8a16.55 16.55 0 0 0 1.9 11.5" }], ["circle", { cx: "12", cy: "12", r: "10" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/voicemail.js var Voicemail; var init_voicemail = __esmMin((() => { Voicemail = [ ["circle", { cx: "6", cy: "12", r: "4" }], ["circle", { cx: "18", cy: "12", r: "4" }], ["line", { x1: "6", x2: "18", y1: "16", y2: "16" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/volume-1.js var Volume1; var init_volume_1 = __esmMin((() => { Volume1 = [["path", { d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z" }], ["path", { d: "M16 9a5 5 0 0 1 0 6" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/volume-2.js var Volume2; var init_volume_2 = __esmMin((() => { Volume2 = [ ["path", { d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z" }], ["path", { d: "M16 9a5 5 0 0 1 0 6" }], ["path", { d: "M19.364 18.364a9 9 0 0 0 0-12.728" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/volume-off.js var VolumeOff; var init_volume_off = __esmMin((() => { VolumeOff = [ ["path", { d: "M16 9a5 5 0 0 1 .95 2.293" }], ["path", { d: "M19.364 5.636a9 9 0 0 1 1.889 9.96" }], ["path", { d: "m2 2 20 20" }], ["path", { d: "m7 7-.587.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298V11" }], ["path", { d: "M9.828 4.172A.686.686 0 0 1 11 4.657v.686" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/volume-x.js var VolumeX; var init_volume_x = __esmMin((() => { VolumeX = [ ["path", { d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z" }], ["line", { x1: "22", x2: "16", y1: "9", y2: "15" }], ["line", { x1: "16", x2: "22", y1: "9", y2: "15" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/volume.js var Volume; var init_volume = __esmMin((() => { Volume = [["path", { d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/vote.js var Vote; var init_vote = __esmMin((() => { Vote = [ ["path", { d: "m9 12 2 2 4-4" }], ["path", { d: "M5 7c0-1.1.9-2 2-2h10a2 2 0 0 1 2 2v12H5V7Z" }], ["path", { d: "M22 19H2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wallet-cards.js var WalletCards; var init_wallet_cards = __esmMin((() => { WalletCards = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }], ["path", { d: "M3 9a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2" }], ["path", { d: "M3 11h3c.8 0 1.6.3 2.1.9l1.1.9c1.6 1.6 4.1 1.6 5.7 0l1.1-.9c.5-.5 1.3-.9 2.1-.9H21" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wallet-minimal.js var WalletMinimal; var init_wallet_minimal = __esmMin((() => { WalletMinimal = [["path", { d: "M17 14h.01" }], ["path", { d: "M7 7h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wallet.js var Wallet; var init_wallet = __esmMin((() => { Wallet = [["path", { d: "M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1" }], ["path", { d: "M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wallpaper.js var Wallpaper; var init_wallpaper = __esmMin((() => { Wallpaper = [ ["path", { d: "M12 17v4" }], ["path", { d: "M8 21h8" }], ["path", { d: "m9 17 6.1-6.1a2 2 0 0 1 2.81.01L22 15" }], ["circle", { cx: "8", cy: "9", r: "2" }], ["rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wand-sparkles.js var WandSparkles; var init_wand_sparkles = __esmMin((() => { WandSparkles = [ ["path", { d: "m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72" }], ["path", { d: "m14 7 3 3" }], ["path", { d: "M5 6v4" }], ["path", { d: "M19 14v4" }], ["path", { d: "M10 2v2" }], ["path", { d: "M7 8H3" }], ["path", { d: "M21 16h-4" }], ["path", { d: "M11 3H9" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wand.js var Wand; var init_wand = __esmMin((() => { Wand = [ ["path", { d: "M15 4V2" }], ["path", { d: "M15 16v-2" }], ["path", { d: "M8 9h2" }], ["path", { d: "M20 9h2" }], ["path", { d: "M17.8 11.8 19 13" }], ["path", { d: "M15 9h.01" }], ["path", { d: "M17.8 6.2 19 5" }], ["path", { d: "m3 21 9-9" }], ["path", { d: "M12.2 6.2 11 5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/warehouse.js var Warehouse; var init_warehouse = __esmMin((() => { Warehouse = [ ["path", { d: "M18 21V10a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1v11" }], ["path", { d: "M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 1.132-1.803l7.95-3.974a2 2 0 0 1 1.837 0l7.948 3.974A2 2 0 0 1 22 8z" }], ["path", { d: "M6 13h12" }], ["path", { d: "M6 17h12" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/washing-machine.js var WashingMachine; var init_washing_machine = __esmMin((() => { WashingMachine = [ ["path", { d: "M3 6h3" }], ["path", { d: "M17 6h.01" }], ["rect", { width: "18", height: "20", x: "3", y: "2", rx: "2" }], ["circle", { cx: "12", cy: "13", r: "5" }], ["path", { d: "M12 18a2.5 2.5 0 0 0 0-5 2.5 2.5 0 0 1 0-5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/watch.js var Watch; var init_watch = __esmMin((() => { Watch = [ ["path", { d: "M12 10v2.2l1.6 1" }], ["path", { d: "m16.13 7.66-.81-4.05a2 2 0 0 0-2-1.61h-2.68a2 2 0 0 0-2 1.61l-.78 4.05" }], ["path", { d: "m7.88 16.36.8 4a2 2 0 0 0 2 1.61h2.72a2 2 0 0 0 2-1.61l.81-4.05" }], ["circle", { cx: "12", cy: "12", r: "6" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/waves-arrow-down.js var WavesArrowDown; var init_waves_arrow_down = __esmMin((() => { WavesArrowDown = [ ["path", { d: "M12 10L12 2" }], ["path", { d: "M16 6L12 10L8 6" }], ["path", { d: "M2 15C2.6 15.5 3.2 16 4.5 16C7 16 7 14 9.5 14C12.1 14 11.9 16 14.5 16C17 16 17 14 19.5 14C20.8 14 21.4 14.5 22 15" }], ["path", { d: "M2 21C2.6 21.5 3.2 22 4.5 22C7 22 7 20 9.5 20C12.1 20 11.9 22 14.5 22C17 22 17 20 19.5 20C20.8 20 21.4 20.5 22 21" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/waves-arrow-up.js var WavesArrowUp; var init_waves_arrow_up = __esmMin((() => { WavesArrowUp = [ ["path", { d: "M12 2v8" }], ["path", { d: "M2 15c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1" }], ["path", { d: "M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1" }], ["path", { d: "m8 6 4-4 4 4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/waves-ladder.js var WavesLadder; var init_waves_ladder = __esmMin((() => { WavesLadder = [ ["path", { d: "M19 5a2 2 0 0 0-2 2v11" }], ["path", { d: "M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1" }], ["path", { d: "M7 13h10" }], ["path", { d: "M7 9h10" }], ["path", { d: "M9 5a2 2 0 0 0-2 2v11" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/waves.js var Waves; var init_waves = __esmMin((() => { Waves = [ ["path", { d: "M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1" }], ["path", { d: "M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1" }], ["path", { d: "M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/waypoints.js var Waypoints; var init_waypoints = __esmMin((() => { Waypoints = [ ["circle", { cx: "12", cy: "4.5", r: "2.5" }], ["path", { d: "m10.2 6.3-3.9 3.9" }], ["circle", { cx: "4.5", cy: "12", r: "2.5" }], ["path", { d: "M7 12h10" }], ["circle", { cx: "19.5", cy: "12", r: "2.5" }], ["path", { d: "m13.8 17.7 3.9-3.9" }], ["circle", { cx: "12", cy: "19.5", r: "2.5" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/webcam.js var Webcam; var init_webcam = __esmMin((() => { Webcam = [ ["circle", { cx: "12", cy: "10", r: "8" }], ["circle", { cx: "12", cy: "10", r: "3" }], ["path", { d: "M7 22h10" }], ["path", { d: "M12 22v-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/webhook-off.js var WebhookOff; var init_webhook_off = __esmMin((() => { WebhookOff = [ ["path", { d: "M17 17h-5c-1.09-.02-1.94.92-2.5 1.9A3 3 0 1 1 2.57 15" }], ["path", { d: "M9 3.4a4 4 0 0 1 6.52.66" }], ["path", { d: "m6 17 3.1-5.8a2.5 2.5 0 0 0 .057-2.05" }], ["path", { d: "M20.3 20.3a4 4 0 0 1-2.3.7" }], ["path", { d: "M18.6 13a4 4 0 0 1 3.357 3.414" }], ["path", { d: "m12 6 .6 1" }], ["path", { d: "m2 2 20 20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/webhook.js var Webhook; var init_webhook = __esmMin((() => { Webhook = [ ["path", { d: "M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2" }], ["path", { d: "m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06" }], ["path", { d: "m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/weight-tilde.js var WeightTilde; var init_weight_tilde = __esmMin((() => { WeightTilde = [ ["path", { d: "M6.5 8a2 2 0 0 0-1.906 1.46L2.1 18.5A2 2 0 0 0 4 21h16a2 2 0 0 0 1.925-2.54L19.4 9.5A2 2 0 0 0 17.48 8z" }], ["path", { d: "M7.999 15a2.5 2.5 0 0 1 4 0 2.5 2.5 0 0 0 4 0" }], ["circle", { cx: "12", cy: "5", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/weight.js var Weight; var init_weight = __esmMin((() => { Weight = [["circle", { cx: "12", cy: "5", r: "3" }], ["path", { d: "M6.5 8a2 2 0 0 0-1.905 1.46L2.1 18.5A2 2 0 0 0 4 21h16a2 2 0 0 0 1.925-2.54L19.4 9.5A2 2 0 0 0 17.48 8Z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wheat-off.js var WheatOff; var init_wheat_off = __esmMin((() => { WheatOff = [ ["path", { d: "m2 22 10-10" }], ["path", { d: "m16 8-1.17 1.17" }], ["path", { d: "M3.47 12.53 5 11l1.53 1.53a3.5 3.5 0 0 1 0 4.94L5 19l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z" }], ["path", { d: "m8 8-.53.53a3.5 3.5 0 0 0 0 4.94L9 15l1.53-1.53c.55-.55.88-1.25.98-1.97" }], ["path", { d: "M10.91 5.26c.15-.26.34-.51.56-.73L13 3l1.53 1.53a3.5 3.5 0 0 1 .28 4.62" }], ["path", { d: "M20 2h2v2a4 4 0 0 1-4 4h-2V6a4 4 0 0 1 4-4Z" }], ["path", { d: "M11.47 17.47 13 19l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L5 19l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z" }], ["path", { d: "m16 16-.53.53a3.5 3.5 0 0 1-4.94 0L9 15l1.53-1.53a3.49 3.49 0 0 1 1.97-.98" }], ["path", { d: "M18.74 13.09c.26-.15.51-.34.73-.56L21 11l-1.53-1.53a3.5 3.5 0 0 0-4.62-.28" }], ["line", { x1: "2", x2: "22", y1: "2", y2: "22" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wheat.js var Wheat; var init_wheat = __esmMin((() => { Wheat = [ ["path", { d: "M2 22 16 8" }], ["path", { d: "M3.47 12.53 5 11l1.53 1.53a3.5 3.5 0 0 1 0 4.94L5 19l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z" }], ["path", { d: "M7.47 8.53 9 7l1.53 1.53a3.5 3.5 0 0 1 0 4.94L9 15l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z" }], ["path", { d: "M11.47 4.53 13 3l1.53 1.53a3.5 3.5 0 0 1 0 4.94L13 11l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z" }], ["path", { d: "M20 2h2v2a4 4 0 0 1-4 4h-2V6a4 4 0 0 1 4-4Z" }], ["path", { d: "M11.47 17.47 13 19l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L5 19l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z" }], ["path", { d: "M15.47 13.47 17 15l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L9 15l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z" }], ["path", { d: "M19.47 9.47 21 11l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L13 11l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/whole-word.js var WholeWord; var init_whole_word = __esmMin((() => { WholeWord = [ ["circle", { cx: "7", cy: "12", r: "3" }], ["path", { d: "M10 9v6" }], ["circle", { cx: "17", cy: "12", r: "3" }], ["path", { d: "M14 7v8" }], ["path", { d: "M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wifi-cog.js var WifiCog; var init_wifi_cog = __esmMin((() => { WifiCog = [ ["path", { d: "m14.305 19.53.923-.382" }], ["path", { d: "m15.228 16.852-.923-.383" }], ["path", { d: "m16.852 15.228-.383-.923" }], ["path", { d: "m16.852 20.772-.383.924" }], ["path", { d: "m19.148 15.228.383-.923" }], ["path", { d: "m19.53 21.696-.382-.924" }], ["path", { d: "M2 7.82a15 15 0 0 1 20 0" }], ["path", { d: "m20.772 16.852.924-.383" }], ["path", { d: "m20.772 19.148.924.383" }], ["path", { d: "M5 11.858a10 10 0 0 1 11.5-1.785" }], ["path", { d: "M8.5 15.429a5 5 0 0 1 2.413-1.31" }], ["circle", { cx: "18", cy: "18", r: "3" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wifi-high.js var WifiHigh; var init_wifi_high = __esmMin((() => { WifiHigh = [ ["path", { d: "M12 20h.01" }], ["path", { d: "M5 12.859a10 10 0 0 1 14 0" }], ["path", { d: "M8.5 16.429a5 5 0 0 1 7 0" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wifi-low.js var WifiLow; var init_wifi_low = __esmMin((() => { WifiLow = [["path", { d: "M12 20h.01" }], ["path", { d: "M8.5 16.429a5 5 0 0 1 7 0" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wifi-off.js var WifiOff; var init_wifi_off = __esmMin((() => { WifiOff = [ ["path", { d: "M12 20h.01" }], ["path", { d: "M8.5 16.429a5 5 0 0 1 7 0" }], ["path", { d: "M5 12.859a10 10 0 0 1 5.17-2.69" }], ["path", { d: "M19 12.859a10 10 0 0 0-2.007-1.523" }], ["path", { d: "M2 8.82a15 15 0 0 1 4.177-2.643" }], ["path", { d: "M22 8.82a15 15 0 0 0-11.288-3.764" }], ["path", { d: "m2 2 20 20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wifi-pen.js var WifiPen; var init_wifi_pen = __esmMin((() => { WifiPen = [ ["path", { d: "M2 8.82a15 15 0 0 1 20 0" }], ["path", { d: "M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }], ["path", { d: "M5 12.859a10 10 0 0 1 10.5-2.222" }], ["path", { d: "M8.5 16.429a5 5 0 0 1 3-1.406" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wifi-sync.js var WifiSync; var init_wifi_sync = __esmMin((() => { WifiSync = [ ["path", { d: "M11.965 10.105v4L13.5 12.5a5 5 0 0 1 8 1.5" }], ["path", { d: "M11.965 14.105h4" }], ["path", { d: "M17.965 18.105h4L20.43 19.71a5 5 0 0 1-8-1.5" }], ["path", { d: "M2 8.82a15 15 0 0 1 20 0" }], ["path", { d: "M21.965 22.105v-4" }], ["path", { d: "M5 12.86a10 10 0 0 1 3-2.032" }], ["path", { d: "M8.5 16.429h.01" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wifi-zero.js var WifiZero; var init_wifi_zero = __esmMin((() => { WifiZero = [["path", { d: "M12 20h.01" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wifi.js var Wifi; var init_wifi = __esmMin((() => { Wifi = [ ["path", { d: "M12 20h.01" }], ["path", { d: "M2 8.82a15 15 0 0 1 20 0" }], ["path", { d: "M5 12.859a10 10 0 0 1 14 0" }], ["path", { d: "M8.5 16.429a5 5 0 0 1 7 0" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wind-arrow-down.js var WindArrowDown; var init_wind_arrow_down = __esmMin((() => { WindArrowDown = [ ["path", { d: "M10 2v8" }], ["path", { d: "M12.8 21.6A2 2 0 1 0 14 18H2" }], ["path", { d: "M17.5 10a2.5 2.5 0 1 1 2 4H2" }], ["path", { d: "m6 6 4 4 4-4" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wind.js var Wind; var init_wind = __esmMin((() => { Wind = [ ["path", { d: "M12.8 19.6A2 2 0 1 0 14 16H2" }], ["path", { d: "M17.5 8a2.5 2.5 0 1 1 2 4H2" }], ["path", { d: "M9.8 4.4A2 2 0 1 1 11 8H2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wine-off.js var WineOff; var init_wine_off = __esmMin((() => { WineOff = [ ["path", { d: "M8 22h8" }], ["path", { d: "M7 10h3m7 0h-1.343" }], ["path", { d: "M12 15v7" }], ["path", { d: "M7.307 7.307A12.33 12.33 0 0 0 7 10a5 5 0 0 0 7.391 4.391M8.638 2.981C8.75 2.668 8.872 2.34 9 2h6c1.5 4 2 6 2 8 0 .407-.05.809-.145 1.198" }], ["line", { x1: "2", x2: "22", y1: "2", y2: "22" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wine.js var Wine; var init_wine = __esmMin((() => { Wine = [ ["path", { d: "M8 22h8" }], ["path", { d: "M7 10h10" }], ["path", { d: "M12 15v7" }], ["path", { d: "M12 15a5 5 0 0 0 5-5c0-2-.5-4-2-8H9c-1.5 4-2 6-2 8a5 5 0 0 0 5 5Z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/workflow.js var Workflow; var init_workflow = __esmMin((() => { Workflow = [ ["rect", { width: "8", height: "8", x: "3", y: "3", rx: "2" }], ["path", { d: "M7 11v4a2 2 0 0 0 2 2h4" }], ["rect", { width: "8", height: "8", x: "13", y: "13", rx: "2" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/worm.js var Worm; var init_worm = __esmMin((() => { Worm = [ ["path", { d: "m19 12-1.5 3" }], ["path", { d: "M19.63 18.81 22 20" }], ["path", { d: "M6.47 8.23a1.68 1.68 0 0 1 2.44 1.93l-.64 2.08a6.76 6.76 0 0 0 10.16 7.67l.42-.27a1 1 0 1 0-2.73-4.21l-.42.27a1.76 1.76 0 0 1-2.63-1.99l.64-2.08A6.66 6.66 0 0 0 3.94 3.9l-.7.4a1 1 0 1 0 2.55 4.34z" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/wrench.js var Wrench; var init_wrench = __esmMin((() => { Wrench = [["path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/youtube.js var Youtube; var init_youtube = __esmMin((() => { Youtube = [["path", { d: "M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17" }], ["path", { d: "m10 15 5-3-5-3z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/x.js var X; var init_x = __esmMin((() => { X = [["path", { d: "M18 6 6 18" }], ["path", { d: "m6 6 12 12" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/zap-off.js var ZapOff; var init_zap_off = __esmMin((() => { ZapOff = [ ["path", { d: "M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317" }], ["path", { d: "M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773" }], ["path", { d: "M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643" }], ["path", { d: "m2 2 20 20" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/zap.js var Zap; var init_zap = __esmMin((() => { Zap = [["path", { d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z" }]]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/zoom-in.js var ZoomIn; var init_zoom_in = __esmMin((() => { ZoomIn = [ ["circle", { cx: "11", cy: "11", r: "8" }], ["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }], ["line", { x1: "11", x2: "11", y1: "8", y2: "14" }], ["line", { x1: "8", x2: "14", y1: "11", y2: "11" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/icons/zoom-out.js var ZoomOut; var init_zoom_out = __esmMin((() => { ZoomOut = [ ["circle", { cx: "11", cy: "11", r: "8" }], ["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }], ["line", { x1: "8", x2: "14", y1: "11", y2: "11" }] ]; })); //#endregion //#region node_modules/lucide/dist/esm/iconsAndAliases.js var iconsAndAliases_exports = /* @__PURE__ */ __export({ AArrowDown: () => AArrowDown, AArrowUp: () => AArrowUp, ALargeSmall: () => ALargeSmall, Accessibility: () => Accessibility, Activity: () => Activity, ActivitySquare: () => SquareActivity, AirVent: () => AirVent, Airplay: () => Airplay, AlarmCheck: () => AlarmClockCheck, AlarmClock: () => AlarmClock, AlarmClockCheck: () => AlarmClockCheck, AlarmClockMinus: () => AlarmClockMinus, AlarmClockOff: () => AlarmClockOff, AlarmClockPlus: () => AlarmClockPlus, AlarmMinus: () => AlarmClockMinus, AlarmPlus: () => AlarmClockPlus, AlarmSmoke: () => AlarmSmoke, Album: () => Album, AlertCircle: () => CircleAlert, AlertOctagon: () => OctagonAlert, AlertTriangle: () => TriangleAlert, AlignCenter: () => TextAlignCenter, AlignCenterHorizontal: () => AlignCenterHorizontal, AlignCenterVertical: () => AlignCenterVertical, AlignEndHorizontal: () => AlignEndHorizontal, AlignEndVertical: () => AlignEndVertical, AlignHorizontalDistributeCenter: () => AlignHorizontalDistributeCenter, AlignHorizontalDistributeEnd: () => AlignHorizontalDistributeEnd, AlignHorizontalDistributeStart: () => AlignHorizontalDistributeStart, AlignHorizontalJustifyCenter: () => AlignHorizontalJustifyCenter, AlignHorizontalJustifyEnd: () => AlignHorizontalJustifyEnd, AlignHorizontalJustifyStart: () => AlignHorizontalJustifyStart, AlignHorizontalSpaceAround: () => AlignHorizontalSpaceAround, AlignHorizontalSpaceBetween: () => AlignHorizontalSpaceBetween, AlignJustify: () => TextAlignJustify, AlignLeft: () => TextAlignStart, AlignRight: () => TextAlignEnd, AlignStartHorizontal: () => AlignStartHorizontal, AlignStartVertical: () => AlignStartVertical, AlignVerticalDistributeCenter: () => AlignVerticalDistributeCenter, AlignVerticalDistributeEnd: () => AlignVerticalDistributeEnd, AlignVerticalDistributeStart: () => AlignVerticalDistributeStart, AlignVerticalJustifyCenter: () => AlignVerticalJustifyCenter, AlignVerticalJustifyEnd: () => AlignVerticalJustifyEnd, AlignVerticalJustifyStart: () => AlignVerticalJustifyStart, AlignVerticalSpaceAround: () => AlignVerticalSpaceAround, AlignVerticalSpaceBetween: () => AlignVerticalSpaceBetween, Ambulance: () => Ambulance, Ampersand: () => Ampersand, Ampersands: () => Ampersands, Amphora: () => Amphora, Anchor: () => Anchor$1, Angry: () => Angry, Annoyed: () => Annoyed, Antenna: () => Antenna, Anvil: () => Anvil, Aperture: () => Aperture, AppWindow: () => AppWindow, AppWindowMac: () => AppWindowMac, Apple: () => Apple, Archive: () => Archive, ArchiveRestore: () => ArchiveRestore, ArchiveX: () => ArchiveX, AreaChart: () => ChartArea, Armchair: () => Armchair, ArrowBigDown: () => ArrowBigDown, ArrowBigDownDash: () => ArrowBigDownDash, ArrowBigLeft: () => ArrowBigLeft, ArrowBigLeftDash: () => ArrowBigLeftDash, ArrowBigRight: () => ArrowBigRight, ArrowBigRightDash: () => ArrowBigRightDash, ArrowBigUp: () => ArrowBigUp, ArrowBigUpDash: () => ArrowBigUpDash, ArrowDown: () => ArrowDown, ArrowDown01: () => ArrowDown01, ArrowDown10: () => ArrowDown10, ArrowDownAZ: () => ArrowDownAZ, ArrowDownAz: () => ArrowDownAZ, ArrowDownCircle: () => CircleArrowDown, ArrowDownFromLine: () => ArrowDownFromLine, ArrowDownLeft: () => ArrowDownLeft, ArrowDownLeftFromCircle: () => CircleArrowOutDownLeft, ArrowDownLeftFromSquare: () => SquareArrowOutDownLeft, ArrowDownLeftSquare: () => SquareArrowDownLeft, ArrowDownNarrowWide: () => ArrowDownNarrowWide, ArrowDownRight: () => ArrowDownRight, ArrowDownRightFromCircle: () => CircleArrowOutDownRight, ArrowDownRightFromSquare: () => SquareArrowOutDownRight, ArrowDownRightSquare: () => SquareArrowDownRight, ArrowDownSquare: () => SquareArrowDown, ArrowDownToDot: () => ArrowDownToDot, ArrowDownToLine: () => ArrowDownToLine, ArrowDownUp: () => ArrowDownUp, ArrowDownWideNarrow: () => ArrowDownWideNarrow, ArrowDownZA: () => ArrowDownZA, ArrowDownZa: () => ArrowDownZA, ArrowLeft: () => ArrowLeft, ArrowLeftCircle: () => CircleArrowLeft, ArrowLeftFromLine: () => ArrowLeftFromLine, ArrowLeftRight: () => ArrowLeftRight, ArrowLeftSquare: () => SquareArrowLeft, ArrowLeftToLine: () => ArrowLeftToLine, ArrowRight: () => ArrowRight, ArrowRightCircle: () => CircleArrowRight, ArrowRightFromLine: () => ArrowRightFromLine, ArrowRightLeft: () => ArrowRightLeft, ArrowRightSquare: () => SquareArrowRight, ArrowRightToLine: () => ArrowRightToLine, ArrowUp: () => ArrowUp, ArrowUp01: () => ArrowUp01, ArrowUp10: () => ArrowUp10, ArrowUpAZ: () => ArrowUpAZ, ArrowUpAz: () => ArrowUpAZ, ArrowUpCircle: () => CircleArrowUp, ArrowUpDown: () => ArrowUpDown, ArrowUpFromDot: () => ArrowUpFromDot, ArrowUpFromLine: () => ArrowUpFromLine, ArrowUpLeft: () => ArrowUpLeft, ArrowUpLeftFromCircle: () => CircleArrowOutUpLeft, ArrowUpLeftFromSquare: () => SquareArrowOutUpLeft, ArrowUpLeftSquare: () => SquareArrowUpLeft, ArrowUpNarrowWide: () => ArrowUpNarrowWide, ArrowUpRight: () => ArrowUpRight, ArrowUpRightFromCircle: () => CircleArrowOutUpRight, ArrowUpRightFromSquare: () => SquareArrowOutUpRight, ArrowUpRightSquare: () => SquareArrowUpRight, ArrowUpSquare: () => SquareArrowUp, ArrowUpToLine: () => ArrowUpToLine, ArrowUpWideNarrow: () => ArrowUpWideNarrow, ArrowUpZA: () => ArrowUpZA, ArrowUpZa: () => ArrowUpZA, ArrowsUpFromLine: () => ArrowsUpFromLine, Asterisk: () => Asterisk, AsteriskSquare: () => SquareAsterisk, AtSign: () => AtSign, Atom: () => Atom, AudioLines: () => AudioLines, AudioWaveform: () => AudioWaveform, Award: () => Award, Axe: () => Axe, Axis3D: () => Axis3d, Axis3d: () => Axis3d, Baby: () => Baby, Backpack: () => Backpack, Badge: () => Badge$1, BadgeAlert: () => BadgeAlert, BadgeCent: () => BadgeCent, BadgeCheck: () => BadgeCheck, BadgeDollarSign: () => BadgeDollarSign, BadgeEuro: () => BadgeEuro, BadgeHelp: () => BadgeQuestionMark, BadgeIndianRupee: () => BadgeIndianRupee, BadgeInfo: () => BadgeInfo, BadgeJapaneseYen: () => BadgeJapaneseYen, BadgeMinus: () => BadgeMinus, BadgePercent: () => BadgePercent, BadgePlus: () => BadgePlus, BadgePoundSterling: () => BadgePoundSterling, BadgeQuestionMark: () => BadgeQuestionMark, BadgeRussianRuble: () => BadgeRussianRuble, BadgeSwissFranc: () => BadgeSwissFranc, BadgeTurkishLira: () => BadgeTurkishLira, BadgeX: () => BadgeX, BaggageClaim: () => BaggageClaim, Ban: () => Ban, Banana: () => Banana, Bandage: () => Bandage, Banknote: () => Banknote, BanknoteArrowDown: () => BanknoteArrowDown, BanknoteArrowUp: () => BanknoteArrowUp, BanknoteX: () => BanknoteX, BarChart: () => ChartNoAxesColumnIncreasing, BarChart2: () => ChartNoAxesColumn, BarChart3: () => ChartColumn, BarChart4: () => ChartColumnIncreasing, BarChartBig: () => ChartColumnBig, BarChartHorizontal: () => ChartBar, BarChartHorizontalBig: () => ChartBarBig, Barcode: () => Barcode, Barrel: () => Barrel, Baseline: () => Baseline, Bath: () => Bath, Battery: () => Battery, BatteryCharging: () => BatteryCharging, BatteryFull: () => BatteryFull, BatteryLow: () => BatteryLow, BatteryMedium: () => BatteryMedium, BatteryPlus: () => BatteryPlus, BatteryWarning: () => BatteryWarning, Beaker: () => Beaker, Bean: () => Bean, BeanOff: () => BeanOff, Bed: () => Bed, BedDouble: () => BedDouble, BedSingle: () => BedSingle, Beef: () => Beef, Beer: () => Beer, BeerOff: () => BeerOff, Bell: () => Bell, BellDot: () => BellDot, BellElectric: () => BellElectric, BellMinus: () => BellMinus, BellOff: () => BellOff, BellPlus: () => BellPlus, BellRing: () => BellRing, BetweenHorizonalEnd: () => BetweenHorizontalEnd, BetweenHorizonalStart: () => BetweenHorizontalStart, BetweenHorizontalEnd: () => BetweenHorizontalEnd, BetweenHorizontalStart: () => BetweenHorizontalStart, BetweenVerticalEnd: () => BetweenVerticalEnd, BetweenVerticalStart: () => BetweenVerticalStart, BicepsFlexed: () => BicepsFlexed, Bike: () => Bike, Binary: () => Binary, Binoculars: () => Binoculars, Biohazard: () => Biohazard, Bird: () => Bird, Birdhouse: () => Birdhouse, Bitcoin: () => Bitcoin, Blend: () => Blend, Blinds: () => Blinds, Blocks: () => Blocks, Bluetooth: () => Bluetooth, BluetoothConnected: () => BluetoothConnected, BluetoothOff: () => BluetoothOff, BluetoothSearching: () => BluetoothSearching, Bold: () => Bold, Bolt: () => Bolt, Bomb: () => Bomb, Bone: () => Bone, Book: () => Book, BookA: () => BookA, BookAlert: () => BookAlert, BookAudio: () => BookAudio, BookCheck: () => BookCheck, BookCopy: () => BookCopy, BookDashed: () => BookDashed, BookDown: () => BookDown, BookHeadphones: () => BookHeadphones, BookHeart: () => BookHeart, BookImage: () => BookImage, BookKey: () => BookKey, BookLock: () => BookLock, BookMarked: () => BookMarked, BookMinus: () => BookMinus, BookOpen: () => BookOpen, BookOpenCheck: () => BookOpenCheck, BookOpenText: () => BookOpenText, BookPlus: () => BookPlus, BookSearch: () => BookSearch, BookTemplate: () => BookDashed, BookText: () => BookText, BookType: () => BookType, BookUp: () => BookUp, BookUp2: () => BookUp2, BookUser: () => BookUser, BookX: () => BookX, Bookmark: () => Bookmark, BookmarkCheck: () => BookmarkCheck, BookmarkMinus: () => BookmarkMinus, BookmarkPlus: () => BookmarkPlus, BookmarkX: () => BookmarkX, BoomBox: () => BoomBox, Bot: () => Bot, BotMessageSquare: () => BotMessageSquare, BotOff: () => BotOff, BottleWine: () => BottleWine, BowArrow: () => BowArrow, Box: () => Box, BoxSelect: () => SquareDashed, Boxes: () => Boxes, Braces: () => Braces, Brackets: () => Brackets, Brain: () => Brain, BrainCircuit: () => BrainCircuit, BrainCog: () => BrainCog, BrickWall: () => BrickWall, BrickWallFire: () => BrickWallFire, BrickWallShield: () => BrickWallShield, Briefcase: () => Briefcase, BriefcaseBusiness: () => BriefcaseBusiness, BriefcaseConveyorBelt: () => BriefcaseConveyorBelt, BriefcaseMedical: () => BriefcaseMedical, BringToFront: () => BringToFront, Brush: () => Brush, BrushCleaning: () => BrushCleaning, Bubbles: () => Bubbles, Bug: () => Bug, BugOff: () => BugOff, BugPlay: () => BugPlay, Building: () => Building, Building2: () => Building2, Bus: () => Bus, BusFront: () => BusFront, Cable: () => Cable, CableCar: () => CableCar, Cake: () => Cake, CakeSlice: () => CakeSlice, Calculator: () => Calculator, Calendar: () => Calendar, Calendar1: () => Calendar1, CalendarArrowDown: () => CalendarArrowDown, CalendarArrowUp: () => CalendarArrowUp, CalendarCheck: () => CalendarCheck, CalendarCheck2: () => CalendarCheck2, CalendarClock: () => CalendarClock, CalendarCog: () => CalendarCog, CalendarDays: () => CalendarDays, CalendarFold: () => CalendarFold, CalendarHeart: () => CalendarHeart, CalendarMinus: () => CalendarMinus, CalendarMinus2: () => CalendarMinus2, CalendarOff: () => CalendarOff, CalendarPlus: () => CalendarPlus, CalendarPlus2: () => CalendarPlus2, CalendarRange: () => CalendarRange, CalendarSearch: () => CalendarSearch, CalendarSync: () => CalendarSync, CalendarX: () => CalendarX, CalendarX2: () => CalendarX2, Calendars: () => Calendars, Camera: () => Camera, CameraOff: () => CameraOff, CandlestickChart: () => ChartCandlestick, Candy: () => Candy, CandyCane: () => CandyCane, CandyOff: () => CandyOff, Cannabis: () => Cannabis, Captions: () => Captions, CaptionsOff: () => CaptionsOff, Car: () => Car, CarFront: () => CarFront, CarTaxiFront: () => CarTaxiFront, Caravan: () => Caravan, CardSim: () => CardSim, Carrot: () => Carrot, CaseLower: () => CaseLower, CaseSensitive: () => CaseSensitive, CaseUpper: () => CaseUpper, CassetteTape: () => CassetteTape, Cast: () => Cast, Castle: () => Castle, Cat: () => Cat, Cctv: () => Cctv, ChartArea: () => ChartArea, ChartBar: () => ChartBar, ChartBarBig: () => ChartBarBig, ChartBarDecreasing: () => ChartBarDecreasing, ChartBarIncreasing: () => ChartBarIncreasing, ChartBarStacked: () => ChartBarStacked, ChartCandlestick: () => ChartCandlestick, ChartColumn: () => ChartColumn, ChartColumnBig: () => ChartColumnBig, ChartColumnDecreasing: () => ChartColumnDecreasing, ChartColumnIncreasing: () => ChartColumnIncreasing, ChartColumnStacked: () => ChartColumnStacked, ChartGantt: () => ChartGantt, ChartLine: () => ChartLine, ChartNetwork: () => ChartNetwork, ChartNoAxesColumn: () => ChartNoAxesColumn, ChartNoAxesColumnDecreasing: () => ChartNoAxesColumnDecreasing, ChartNoAxesColumnIncreasing: () => ChartNoAxesColumnIncreasing, ChartNoAxesCombined: () => ChartNoAxesCombined, ChartNoAxesGantt: () => ChartNoAxesGantt, ChartPie: () => ChartPie, ChartScatter: () => ChartScatter, ChartSpline: () => ChartSpline, Check: () => Check, CheckCheck: () => CheckCheck, CheckCircle: () => CircleCheckBig, CheckCircle2: () => CircleCheck, CheckLine: () => CheckLine, CheckSquare: () => SquareCheckBig, CheckSquare2: () => SquareCheck, ChefHat: () => ChefHat, Cherry: () => Cherry, ChessBishop: () => ChessBishop, ChessKing: () => ChessKing, ChessKnight: () => ChessKnight, ChessPawn: () => ChessPawn, ChessQueen: () => ChessQueen, ChessRook: () => ChessRook, ChevronDown: () => ChevronDown, ChevronDownCircle: () => CircleChevronDown, ChevronDownSquare: () => SquareChevronDown, ChevronFirst: () => ChevronFirst, ChevronLast: () => ChevronLast, ChevronLeft: () => ChevronLeft, ChevronLeftCircle: () => CircleChevronLeft, ChevronLeftSquare: () => SquareChevronLeft, ChevronRight: () => ChevronRight, ChevronRightCircle: () => CircleChevronRight, ChevronRightSquare: () => SquareChevronRight, ChevronUp: () => ChevronUp, ChevronUpCircle: () => CircleChevronUp, ChevronUpSquare: () => SquareChevronUp, ChevronsDown: () => ChevronsDown, ChevronsDownUp: () => ChevronsDownUp, ChevronsLeft: () => ChevronsLeft, ChevronsLeftRight: () => ChevronsLeftRight, ChevronsLeftRightEllipsis: () => ChevronsLeftRightEllipsis, ChevronsRight: () => ChevronsRight, ChevronsRightLeft: () => ChevronsRightLeft, ChevronsUp: () => ChevronsUp, ChevronsUpDown: () => ChevronsUpDown, Chrome: () => Chromium, Chromium: () => Chromium, Church: () => Church, Cigarette: () => Cigarette, CigaretteOff: () => CigaretteOff, Circle: () => Circle, CircleAlert: () => CircleAlert, CircleArrowDown: () => CircleArrowDown, CircleArrowLeft: () => CircleArrowLeft, CircleArrowOutDownLeft: () => CircleArrowOutDownLeft, CircleArrowOutDownRight: () => CircleArrowOutDownRight, CircleArrowOutUpLeft: () => CircleArrowOutUpLeft, CircleArrowOutUpRight: () => CircleArrowOutUpRight, CircleArrowRight: () => CircleArrowRight, CircleArrowUp: () => CircleArrowUp, CircleCheck: () => CircleCheck, CircleCheckBig: () => CircleCheckBig, CircleChevronDown: () => CircleChevronDown, CircleChevronLeft: () => CircleChevronLeft, CircleChevronRight: () => CircleChevronRight, CircleChevronUp: () => CircleChevronUp, CircleDashed: () => CircleDashed, CircleDivide: () => CircleDivide, CircleDollarSign: () => CircleDollarSign, CircleDot: () => CircleDot, CircleDotDashed: () => CircleDotDashed, CircleEllipsis: () => CircleEllipsis, CircleEqual: () => CircleEqual, CircleFadingArrowUp: () => CircleFadingArrowUp, CircleFadingPlus: () => CircleFadingPlus, CircleGauge: () => CircleGauge, CircleHelp: () => CircleQuestionMark, CircleMinus: () => CircleMinus, CircleOff: () => CircleOff, CircleParking: () => CircleParking, CircleParkingOff: () => CircleParkingOff, CirclePause: () => CirclePause, CirclePercent: () => CirclePercent, CirclePlay: () => CirclePlay, CirclePlus: () => CirclePlus, CirclePoundSterling: () => CirclePoundSterling, CirclePower: () => CirclePower, CircleQuestionMark: () => CircleQuestionMark, CircleSlash: () => CircleSlash, CircleSlash2: () => CircleSlash2, CircleSlashed: () => CircleSlash2, CircleSmall: () => CircleSmall, CircleStar: () => CircleStar, CircleStop: () => CircleStop, CircleUser: () => CircleUser, CircleUserRound: () => CircleUserRound, CircleX: () => CircleX, CircuitBoard: () => CircuitBoard, Citrus: () => Citrus, Clapperboard: () => Clapperboard, Clipboard: () => Clipboard, ClipboardCheck: () => ClipboardCheck, ClipboardClock: () => ClipboardClock, ClipboardCopy: () => ClipboardCopy, ClipboardEdit: () => ClipboardPen, ClipboardList: () => ClipboardList, ClipboardMinus: () => ClipboardMinus, ClipboardPaste: () => ClipboardPaste, ClipboardPen: () => ClipboardPen, ClipboardPenLine: () => ClipboardPenLine, ClipboardPlus: () => ClipboardPlus, ClipboardSignature: () => ClipboardPenLine, ClipboardType: () => ClipboardType, ClipboardX: () => ClipboardX, Clock: () => Clock, Clock1: () => Clock1, Clock10: () => Clock10, Clock11: () => Clock11, Clock12: () => Clock12, Clock2: () => Clock2, Clock3: () => Clock3, Clock4: () => Clock4, Clock5: () => Clock5, Clock6: () => Clock6, Clock7: () => Clock7, Clock8: () => Clock8, Clock9: () => Clock9, ClockAlert: () => ClockAlert, ClockArrowDown: () => ClockArrowDown, ClockArrowUp: () => ClockArrowUp, ClockCheck: () => ClockCheck, ClockFading: () => ClockFading, ClockPlus: () => ClockPlus, ClosedCaption: () => ClosedCaption, Cloud: () => Cloud, CloudAlert: () => CloudAlert, CloudCheck: () => CloudCheck, CloudCog: () => CloudCog, CloudDownload: () => CloudDownload, CloudDrizzle: () => CloudDrizzle, CloudFog: () => CloudFog, CloudHail: () => CloudHail, CloudLightning: () => CloudLightning, CloudMoon: () => CloudMoon, CloudMoonRain: () => CloudMoonRain, CloudOff: () => CloudOff, CloudRain: () => CloudRain, CloudRainWind: () => CloudRainWind, CloudSnow: () => CloudSnow, CloudSun: () => CloudSun, CloudSunRain: () => CloudSunRain, CloudUpload: () => CloudUpload, Cloudy: () => Cloudy, Clover: () => Clover, Club: () => Club, Code: () => Code, Code2: () => CodeXml, CodeSquare: () => SquareCode, CodeXml: () => CodeXml, Codepen: () => Codepen, Codesandbox: () => Codesandbox, Coffee: () => Coffee, Cog: () => Cog, Coins: () => Coins, Columns: () => Columns2, Columns2: () => Columns2, Columns3: () => Columns3, Columns3Cog: () => Columns3Cog, Columns4: () => Columns4, ColumnsSettings: () => Columns3Cog, Combine: () => Combine, Command: () => Command, Compass: () => Compass, Component: () => Component, Computer: () => Computer, ConciergeBell: () => ConciergeBell, Cone: () => Cone, Construction: () => Construction, Contact: () => Contact, Contact2: () => ContactRound, ContactRound: () => ContactRound, Container: () => Container, Contrast: () => Contrast, Cookie: () => Cookie, CookingPot: () => CookingPot, Copy: () => Copy, CopyCheck: () => CopyCheck, CopyMinus: () => CopyMinus, CopyPlus: () => CopyPlus, CopySlash: () => CopySlash, CopyX: () => CopyX, Copyleft: () => Copyleft, Copyright: () => Copyright, CornerDownLeft: () => CornerDownLeft, CornerDownRight: () => CornerDownRight, CornerLeftDown: () => CornerLeftDown, CornerLeftUp: () => CornerLeftUp, CornerRightDown: () => CornerRightDown, CornerRightUp: () => CornerRightUp, CornerUpLeft: () => CornerUpLeft, CornerUpRight: () => CornerUpRight, Cpu: () => Cpu, CreativeCommons: () => CreativeCommons, CreditCard: () => CreditCard, Croissant: () => Croissant, Crop: () => Crop, Cross: () => Cross, Crosshair: () => Crosshair, Crown: () => Crown, Cuboid: () => Cuboid, CupSoda: () => CupSoda, CurlyBraces: () => Braces, Currency: () => Currency, Cylinder: () => Cylinder, Dam: () => Dam, Database: () => Database, DatabaseBackup: () => DatabaseBackup, DatabaseZap: () => DatabaseZap, DecimalsArrowLeft: () => DecimalsArrowLeft, DecimalsArrowRight: () => DecimalsArrowRight, Delete: () => Delete$2, Dessert: () => Dessert, Diameter: () => Diameter, Diamond: () => Diamond, DiamondMinus: () => DiamondMinus, DiamondPercent: () => DiamondPercent, DiamondPlus: () => DiamondPlus, Dice1: () => Dice1, Dice2: () => Dice2, Dice3: () => Dice3, Dice4: () => Dice4, Dice5: () => Dice5, Dice6: () => Dice6, Dices: () => Dices, Diff: () => Diff$2, Disc: () => Disc, Disc2: () => Disc2, Disc3: () => Disc3, DiscAlbum: () => DiscAlbum, Divide: () => Divide, DivideCircle: () => CircleDivide, DivideSquare: () => SquareDivide, Dna: () => Dna, DnaOff: () => DnaOff, Dock: () => Dock, Dog: () => Dog, DollarSign: () => DollarSign, Donut: () => Donut, DoorClosed: () => DoorClosed, DoorClosedLocked: () => DoorClosedLocked, DoorOpen: () => DoorOpen, Dot: () => Dot, DotSquare: () => SquareDot, Download: () => Download, DownloadCloud: () => CloudDownload, DraftingCompass: () => DraftingCompass, Drama: () => Drama, Dribbble: () => Dribbble, Drill: () => Drill, Drone: () => Drone, Droplet: () => Droplet, DropletOff: () => DropletOff, Droplets: () => Droplets, Drum: () => Drum, Drumstick: () => Drumstick, Dumbbell: () => Dumbbell, Ear: () => Ear, EarOff: () => EarOff, Earth: () => Earth, EarthLock: () => EarthLock, Eclipse: () => Eclipse, Edit: () => SquarePen, Edit2: () => Pen, Edit3: () => PenLine, Egg: () => Egg, EggFried: () => EggFried, EggOff: () => EggOff, Ellipsis: () => Ellipsis, EllipsisVertical: () => EllipsisVertical, Equal: () => Equal, EqualApproximately: () => EqualApproximately, EqualNot: () => EqualNot, EqualSquare: () => SquareEqual, Eraser: () => Eraser, EthernetPort: () => EthernetPort, Euro: () => Euro, EvCharger: () => EvCharger, Expand: () => Expand, ExternalLink: () => ExternalLink, Eye: () => Eye, EyeClosed: () => EyeClosed, EyeOff: () => EyeOff, Facebook: () => Facebook, Factory: () => Factory, Fan: () => Fan, FastForward: () => FastForward, Feather: () => Feather, Fence: () => Fence, FerrisWheel: () => FerrisWheel, Figma: () => Figma, File: () => File$1, FileArchive: () => FileArchive, FileAudio: () => FileHeadphone, FileAudio2: () => FileHeadphone, FileAxis3D: () => FileAxis3d, FileAxis3d: () => FileAxis3d, FileBadge: () => FileBadge, FileBadge2: () => FileBadge, FileBarChart: () => FileChartColumnIncreasing, FileBarChart2: () => FileChartColumn, FileBox: () => FileBox, FileBraces: () => FileBraces, FileBracesCorner: () => FileBracesCorner, FileChartColumn: () => FileChartColumn, FileChartColumnIncreasing: () => FileChartColumnIncreasing, FileChartLine: () => FileChartLine, FileChartPie: () => FileChartPie, FileCheck: () => FileCheck, FileCheck2: () => FileCheckCorner, FileCheckCorner: () => FileCheckCorner, FileClock: () => FileClock, FileCode: () => FileCode, FileCode2: () => FileCodeCorner, FileCodeCorner: () => FileCodeCorner, FileCog: () => FileCog, FileCog2: () => FileCog, FileDiff: () => FileDiff, FileDigit: () => FileDigit, FileDown: () => FileDown, FileEdit: () => FilePen, FileExclamationPoint: () => FileExclamationPoint, FileHeadphone: () => FileHeadphone, FileHeart: () => FileHeart, FileImage: () => FileImage, FileInput: () => FileInput, FileJson: () => FileBraces, FileJson2: () => FileBracesCorner, FileKey: () => FileKey, FileKey2: () => FileKey, FileLineChart: () => FileChartLine, FileLock: () => FileLock, FileLock2: () => FileLock, FileMinus: () => FileMinus, FileMinus2: () => FileMinusCorner, FileMinusCorner: () => FileMinusCorner, FileMusic: () => FileMusic, FileOutput: () => FileOutput, FilePen: () => FilePen, FilePenLine: () => FilePenLine, FilePieChart: () => FileChartPie, FilePlay: () => FilePlay, FilePlus: () => FilePlus, FilePlus2: () => FilePlusCorner, FilePlusCorner: () => FilePlusCorner, FileQuestion: () => FileQuestionMark, FileQuestionMark: () => FileQuestionMark, FileScan: () => FileScan, FileSearch: () => FileSearch, FileSearch2: () => FileSearchCorner, FileSearchCorner: () => FileSearchCorner, FileSignal: () => FileSignal, FileSignature: () => FilePenLine, FileSliders: () => FileSliders, FileSpreadsheet: () => FileSpreadsheet, FileStack: () => FileStack, FileSymlink: () => FileSymlink, FileTerminal: () => FileTerminal, FileText: () => FileText, FileType: () => FileType, FileType2: () => FileTypeCorner, FileTypeCorner: () => FileTypeCorner, FileUp: () => FileUp, FileUser: () => FileUser, FileVideo: () => FilePlay, FileVideo2: () => FileVideoCamera, FileVideoCamera: () => FileVideoCamera, FileVolume: () => FileVolume, FileVolume2: () => FileSignal, FileWarning: () => FileExclamationPoint, FileX: () => FileX, FileX2: () => FileXCorner, FileXCorner: () => FileXCorner, Files: () => Files, Film: () => Film, Filter: () => Funnel, FilterX: () => FunnelX, Fingerprint: () => FingerprintPattern, FingerprintPattern: () => FingerprintPattern, FireExtinguisher: () => FireExtinguisher, Fish: () => Fish, FishOff: () => FishOff, FishSymbol: () => FishSymbol, Flag: () => Flag, FlagOff: () => FlagOff, FlagTriangleLeft: () => FlagTriangleLeft, FlagTriangleRight: () => FlagTriangleRight, Flame: () => Flame, FlameKindling: () => FlameKindling, Flashlight: () => Flashlight, FlashlightOff: () => FlashlightOff, FlaskConical: () => FlaskConical, FlaskConicalOff: () => FlaskConicalOff, FlaskRound: () => FlaskRound, FlipHorizontal: () => FlipHorizontal, FlipHorizontal2: () => FlipHorizontal2, FlipVertical: () => FlipVertical, FlipVertical2: () => FlipVertical2, Flower: () => Flower, Flower2: () => Flower2, Focus: () => Focus, FoldHorizontal: () => FoldHorizontal, FoldVertical: () => FoldVertical, Folder: () => Folder$1, FolderArchive: () => FolderArchive, FolderCheck: () => FolderCheck, FolderClock: () => FolderClock, FolderClosed: () => FolderClosed, FolderCode: () => FolderCode, FolderCog: () => FolderCog, FolderCog2: () => FolderCog, FolderDot: () => FolderDot, FolderDown: () => FolderDown, FolderEdit: () => FolderPen, FolderGit: () => FolderGit, FolderGit2: () => FolderGit2, FolderHeart: () => FolderHeart, FolderInput: () => FolderInput, FolderKanban: () => FolderKanban, FolderKey: () => FolderKey, FolderLock: () => FolderLock, FolderMinus: () => FolderMinus, FolderOpen: () => FolderOpen, FolderOpenDot: () => FolderOpenDot, FolderOutput: () => FolderOutput, FolderPen: () => FolderPen, FolderPlus: () => FolderPlus, FolderRoot: () => FolderRoot, FolderSearch: () => FolderSearch, FolderSearch2: () => FolderSearch2, FolderSymlink: () => FolderSymlink, FolderSync: () => FolderSync, FolderTree: () => FolderTree, FolderUp: () => FolderUp, FolderX: () => FolderX, Folders: () => Folders, Footprints: () => Footprints, ForkKnife: () => Utensils, ForkKnifeCrossed: () => UtensilsCrossed, Forklift: () => Forklift, Form: () => Form, FormInput: () => RectangleEllipsis, Forward: () => Forward, Frame: () => Frame, Framer: () => Framer, Frown: () => Frown, Fuel: () => Fuel, Fullscreen: () => Fullscreen, FunctionSquare: () => SquareFunction, Funnel: () => Funnel, FunnelPlus: () => FunnelPlus, FunnelX: () => FunnelX, GalleryHorizontal: () => GalleryHorizontal, GalleryHorizontalEnd: () => GalleryHorizontalEnd, GalleryThumbnails: () => GalleryThumbnails, GalleryVertical: () => GalleryVertical, GalleryVerticalEnd: () => GalleryVerticalEnd, Gamepad: () => Gamepad, Gamepad2: () => Gamepad2, GamepadDirectional: () => GamepadDirectional, GanttChart: () => ChartNoAxesGantt, GanttChartSquare: () => SquareChartGantt, Gauge: () => Gauge, GaugeCircle: () => CircleGauge, Gavel: () => Gavel, Gem: () => Gem, GeorgianLari: () => GeorgianLari, Ghost: () => Ghost, Gift: () => Gift, GitBranch: () => GitBranch, GitBranchMinus: () => GitBranchMinus, GitBranchPlus: () => GitBranchPlus, GitCommit: () => GitCommitHorizontal, GitCommitHorizontal: () => GitCommitHorizontal, GitCommitVertical: () => GitCommitVertical, GitCompare: () => GitCompare, GitCompareArrows: () => GitCompareArrows, GitFork: () => GitFork, GitGraph: () => GitGraph, GitMerge: () => GitMerge, GitPullRequest: () => GitPullRequest, GitPullRequestArrow: () => GitPullRequestArrow, GitPullRequestClosed: () => GitPullRequestClosed, GitPullRequestCreate: () => GitPullRequestCreate, GitPullRequestCreateArrow: () => GitPullRequestCreateArrow, GitPullRequestDraft: () => GitPullRequestDraft, Github: () => Github, Gitlab: () => Gitlab, GlassWater: () => GlassWater, Glasses: () => Glasses, Globe: () => Globe, Globe2: () => Earth, GlobeLock: () => GlobeLock, Goal: () => Goal, Gpu: () => Gpu, Grab: () => HandGrab, GraduationCap: () => GraduationCap, Grape: () => Grape, Grid: () => Grid3x3, Grid2X2: () => Grid2x2, Grid2X2Check: () => Grid2x2Check, Grid2X2Plus: () => Grid2x2Plus, Grid2X2X: () => Grid2x2X, Grid2x2: () => Grid2x2, Grid2x2Check: () => Grid2x2Check, Grid2x2Plus: () => Grid2x2Plus, Grid2x2X: () => Grid2x2X, Grid3X3: () => Grid3x3, Grid3x2: () => Grid3x2, Grid3x3: () => Grid3x3, Grip: () => Grip, GripHorizontal: () => GripHorizontal, GripVertical: () => GripVertical, Group: () => Group, Guitar: () => Guitar, Ham: () => Ham, Hamburger: () => Hamburger, Hammer: () => Hammer, Hand: () => Hand, HandCoins: () => HandCoins, HandFist: () => HandFist, HandGrab: () => HandGrab, HandHeart: () => HandHeart, HandHelping: () => HandHelping, HandMetal: () => HandMetal, HandPlatter: () => HandPlatter, Handbag: () => Handbag, Handshake: () => Handshake, HardDrive: () => HardDrive, HardDriveDownload: () => HardDriveDownload, HardDriveUpload: () => HardDriveUpload, HardHat: () => HardHat, Hash: () => Hash, HatGlasses: () => HatGlasses, Haze: () => Haze, HdmiPort: () => HdmiPort, Heading: () => Heading, Heading1: () => Heading1, Heading2: () => Heading2, Heading3: () => Heading3, Heading4: () => Heading4, Heading5: () => Heading5, Heading6: () => Heading6, HeadphoneOff: () => HeadphoneOff, Headphones: () => Headphones, Headset: () => Headset, Heart: () => Heart, HeartCrack: () => HeartCrack, HeartHandshake: () => HeartHandshake, HeartMinus: () => HeartMinus, HeartOff: () => HeartOff, HeartPlus: () => HeartPlus, HeartPulse: () => HeartPulse, Heater: () => Heater, Helicopter: () => Helicopter, HelpCircle: () => CircleQuestionMark, HelpingHand: () => HandHelping, Hexagon: () => Hexagon, Highlighter: () => Highlighter, History: () => History, Home: () => House, Hop: () => Hop, HopOff: () => HopOff, Hospital: () => Hospital, Hotel: () => Hotel, Hourglass: () => Hourglass, House: () => House, HouseHeart: () => HouseHeart, HousePlug: () => HousePlug, HousePlus: () => HousePlus, HouseWifi: () => HouseWifi, IceCream: () => IceCreamCone, IceCream2: () => IceCreamBowl, IceCreamBowl: () => IceCreamBowl, IceCreamCone: () => IceCreamCone, IdCard: () => IdCard, IdCardLanyard: () => IdCardLanyard, Image: () => Image$1, ImageDown: () => ImageDown, ImageMinus: () => ImageMinus, ImageOff: () => ImageOff, ImagePlay: () => ImagePlay, ImagePlus: () => ImagePlus, ImageUp: () => ImageUp, ImageUpscale: () => ImageUpscale, Images: () => Images, Import: () => Import, Inbox: () => Inbox, Indent: () => ListIndentIncrease, IndentDecrease: () => ListIndentDecrease, IndentIncrease: () => ListIndentIncrease, IndianRupee: () => IndianRupee, Infinity: () => Infinity$1, Info: () => Info, Inspect: () => SquareMousePointer, InspectionPanel: () => InspectionPanel, Instagram: () => Instagram, Italic: () => Italic, IterationCcw: () => IterationCcw, IterationCw: () => IterationCw, JapaneseYen: () => JapaneseYen, Joystick: () => Joystick, Kanban: () => Kanban, KanbanSquare: () => SquareKanban, KanbanSquareDashed: () => SquareDashedKanban, Kayak: () => Kayak, Key: () => Key, KeyRound: () => KeyRound, KeySquare: () => KeySquare, Keyboard: () => Keyboard, KeyboardMusic: () => KeyboardMusic, KeyboardOff: () => KeyboardOff, Lamp: () => Lamp, LampCeiling: () => LampCeiling, LampDesk: () => LampDesk, LampFloor: () => LampFloor, LampWallDown: () => LampWallDown, LampWallUp: () => LampWallUp, LandPlot: () => LandPlot, Landmark: () => Landmark, Languages: () => Languages, Laptop: () => Laptop, Laptop2: () => LaptopMinimal, LaptopMinimal: () => LaptopMinimal, LaptopMinimalCheck: () => LaptopMinimalCheck, Lasso: () => Lasso, LassoSelect: () => LassoSelect, Laugh: () => Laugh, Layers: () => Layers, Layers2: () => Layers2, Layers3: () => Layers, Layout: () => PanelsTopLeft, LayoutDashboard: () => LayoutDashboard, LayoutGrid: () => LayoutGrid, LayoutList: () => LayoutList, LayoutPanelLeft: () => LayoutPanelLeft, LayoutPanelTop: () => LayoutPanelTop, LayoutTemplate: () => LayoutTemplate, Leaf: () => Leaf, LeafyGreen: () => LeafyGreen, Lectern: () => Lectern, LetterText: () => TextInitial, Library: () => Library, LibraryBig: () => LibraryBig, LibrarySquare: () => SquareLibrary, LifeBuoy: () => LifeBuoy, Ligature: () => Ligature, Lightbulb: () => Lightbulb, LightbulbOff: () => LightbulbOff, LineChart: () => ChartLine, LineSquiggle: () => LineSquiggle, Link: () => Link, Link2: () => Link2, Link2Off: () => Link2Off, Linkedin: () => Linkedin, List: () => List, ListCheck: () => ListCheck, ListChecks: () => ListChecks, ListChevronsDownUp: () => ListChevronsDownUp, ListChevronsUpDown: () => ListChevronsUpDown, ListCollapse: () => ListCollapse, ListEnd: () => ListEnd, ListFilter: () => ListFilter, ListFilterPlus: () => ListFilterPlus, ListIndentDecrease: () => ListIndentDecrease, ListIndentIncrease: () => ListIndentIncrease, ListMinus: () => ListMinus, ListMusic: () => ListMusic, ListOrdered: () => ListOrdered, ListPlus: () => ListPlus, ListRestart: () => ListRestart, ListStart: () => ListStart, ListTodo: () => ListTodo, ListTree: () => ListTree, ListVideo: () => ListVideo, ListX: () => ListX, Loader: () => Loader, Loader2: () => LoaderCircle, LoaderCircle: () => LoaderCircle, LoaderPinwheel: () => LoaderPinwheel, Locate: () => Locate, LocateFixed: () => LocateFixed, LocateOff: () => LocateOff, LocationEdit: () => MapPinPen, Lock: () => Lock, LockKeyhole: () => LockKeyhole, LockKeyholeOpen: () => LockKeyholeOpen, LockOpen: () => LockOpen, LogIn: () => LogIn, LogOut: () => LogOut, Logs: () => Logs, Lollipop: () => Lollipop, Luggage: () => Luggage, MSquare: () => SquareM, Magnet: () => Magnet, Mail: () => Mail, MailCheck: () => MailCheck, MailMinus: () => MailMinus, MailOpen: () => MailOpen, MailPlus: () => MailPlus, MailQuestion: () => MailQuestionMark, MailQuestionMark: () => MailQuestionMark, MailSearch: () => MailSearch, MailWarning: () => MailWarning, MailX: () => MailX, Mailbox: () => Mailbox, Mails: () => Mails, Map: () => Map$1, MapMinus: () => MapMinus, MapPin: () => MapPin, MapPinCheck: () => MapPinCheck, MapPinCheckInside: () => MapPinCheckInside, MapPinHouse: () => MapPinHouse, MapPinMinus: () => MapPinMinus, MapPinMinusInside: () => MapPinMinusInside, MapPinOff: () => MapPinOff, MapPinPen: () => MapPinPen, MapPinPlus: () => MapPinPlus, MapPinPlusInside: () => MapPinPlusInside, MapPinX: () => MapPinX, MapPinXInside: () => MapPinXInside, MapPinned: () => MapPinned, MapPlus: () => MapPlus, Mars: () => Mars, MarsStroke: () => MarsStroke, Martini: () => Martini, Maximize: () => Maximize, Maximize2: () => Maximize2, Medal: () => Medal, Megaphone: () => Megaphone, MegaphoneOff: () => MegaphoneOff, Meh: () => Meh, MemoryStick: () => MemoryStick, Menu: () => Menu, MenuSquare: () => SquareMenu, Merge: () => Merge, MessageCircle: () => MessageCircle, MessageCircleCode: () => MessageCircleCode, MessageCircleDashed: () => MessageCircleDashed, MessageCircleHeart: () => MessageCircleHeart, MessageCircleMore: () => MessageCircleMore, MessageCircleOff: () => MessageCircleOff, MessageCirclePlus: () => MessageCirclePlus, MessageCircleQuestion: () => MessageCircleQuestionMark, MessageCircleQuestionMark: () => MessageCircleQuestionMark, MessageCircleReply: () => MessageCircleReply, MessageCircleWarning: () => MessageCircleWarning, MessageCircleX: () => MessageCircleX, MessageSquare: () => MessageSquare, MessageSquareCode: () => MessageSquareCode, MessageSquareDashed: () => MessageSquareDashed, MessageSquareDiff: () => MessageSquareDiff, MessageSquareDot: () => MessageSquareDot, MessageSquareHeart: () => MessageSquareHeart, MessageSquareLock: () => MessageSquareLock, MessageSquareMore: () => MessageSquareMore, MessageSquareOff: () => MessageSquareOff, MessageSquarePlus: () => MessageSquarePlus, MessageSquareQuote: () => MessageSquareQuote, MessageSquareReply: () => MessageSquareReply, MessageSquareShare: () => MessageSquareShare, MessageSquareText: () => MessageSquareText, MessageSquareWarning: () => MessageSquareWarning, MessageSquareX: () => MessageSquareX, MessagesSquare: () => MessagesSquare, Mic: () => Mic, Mic2: () => MicVocal, MicOff: () => MicOff, MicVocal: () => MicVocal, Microchip: () => Microchip, Microscope: () => Microscope, Microwave: () => Microwave, Milestone: () => Milestone, Milk: () => Milk, MilkOff: () => MilkOff, Minimize: () => Minimize, Minimize2: () => Minimize2, Minus: () => Minus, MinusCircle: () => CircleMinus, MinusSquare: () => SquareMinus, Monitor: () => Monitor, MonitorCheck: () => MonitorCheck, MonitorCloud: () => MonitorCloud, MonitorCog: () => MonitorCog, MonitorDot: () => MonitorDot, MonitorDown: () => MonitorDown, MonitorOff: () => MonitorOff, MonitorPause: () => MonitorPause, MonitorPlay: () => MonitorPlay, MonitorSmartphone: () => MonitorSmartphone, MonitorSpeaker: () => MonitorSpeaker, MonitorStop: () => MonitorStop, MonitorUp: () => MonitorUp, MonitorX: () => MonitorX, Moon: () => Moon, MoonStar: () => MoonStar, MoreHorizontal: () => Ellipsis, MoreVertical: () => EllipsisVertical, Motorbike: () => Motorbike, Mountain: () => Mountain, MountainSnow: () => MountainSnow, Mouse: () => Mouse, MouseOff: () => MouseOff, MousePointer: () => MousePointer, MousePointer2: () => MousePointer2, MousePointer2Off: () => MousePointer2Off, MousePointerBan: () => MousePointerBan, MousePointerClick: () => MousePointerClick, MousePointerSquareDashed: () => SquareDashedMousePointer, Move: () => Move, Move3D: () => Move3d, Move3d: () => Move3d, MoveDiagonal: () => MoveDiagonal, MoveDiagonal2: () => MoveDiagonal2, MoveDown: () => MoveDown, MoveDownLeft: () => MoveDownLeft, MoveDownRight: () => MoveDownRight, MoveHorizontal: () => MoveHorizontal, MoveLeft: () => MoveLeft, MoveRight: () => MoveRight, MoveUp: () => MoveUp, MoveUpLeft: () => MoveUpLeft, MoveUpRight: () => MoveUpRight, MoveVertical: () => MoveVertical, Music: () => Music, Music2: () => Music2, Music3: () => Music3, Music4: () => Music4, Navigation: () => Navigation, Navigation2: () => Navigation2, Navigation2Off: () => Navigation2Off, NavigationOff: () => NavigationOff, Network: () => Network, Newspaper: () => Newspaper, Nfc: () => Nfc, NonBinary: () => NonBinary, Notebook: () => Notebook, NotebookPen: () => NotebookPen, NotebookTabs: () => NotebookTabs, NotebookText: () => NotebookText, NotepadText: () => NotepadText, NotepadTextDashed: () => NotepadTextDashed, Nut: () => Nut, NutOff: () => NutOff, Octagon: () => Octagon, OctagonAlert: () => OctagonAlert, OctagonMinus: () => OctagonMinus, OctagonPause: () => OctagonPause, OctagonX: () => OctagonX, Omega: () => Omega, Option: () => Option, Orbit: () => Orbit, Origami: () => Origami, Outdent: () => ListIndentDecrease, Package: () => Package, Package2: () => Package2, PackageCheck: () => PackageCheck, PackageMinus: () => PackageMinus, PackageOpen: () => PackageOpen, PackagePlus: () => PackagePlus, PackageSearch: () => PackageSearch, PackageX: () => PackageX, PaintBucket: () => PaintBucket, PaintRoller: () => PaintRoller, Paintbrush: () => Paintbrush, Paintbrush2: () => PaintbrushVertical, PaintbrushVertical: () => PaintbrushVertical, Palette: () => Palette, Palmtree: () => TreePalm, Panda: () => Panda, PanelBottom: () => PanelBottom, PanelBottomClose: () => PanelBottomClose, PanelBottomDashed: () => PanelBottomDashed, PanelBottomInactive: () => PanelBottomDashed, PanelBottomOpen: () => PanelBottomOpen, PanelLeft: () => PanelLeft, PanelLeftClose: () => PanelLeftClose, PanelLeftDashed: () => PanelLeftDashed, PanelLeftInactive: () => PanelLeftDashed, PanelLeftOpen: () => PanelLeftOpen, PanelLeftRightDashed: () => PanelLeftRightDashed, PanelRight: () => PanelRight, PanelRightClose: () => PanelRightClose, PanelRightDashed: () => PanelRightDashed, PanelRightInactive: () => PanelRightDashed, PanelRightOpen: () => PanelRightOpen, PanelTop: () => PanelTop, PanelTopBottomDashed: () => PanelTopBottomDashed, PanelTopClose: () => PanelTopClose, PanelTopDashed: () => PanelTopDashed, PanelTopInactive: () => PanelTopDashed, PanelTopOpen: () => PanelTopOpen, PanelsLeftBottom: () => PanelsLeftBottom, PanelsLeftRight: () => Columns3, PanelsRightBottom: () => PanelsRightBottom, PanelsTopBottom: () => Rows3, PanelsTopLeft: () => PanelsTopLeft, Paperclip: () => Paperclip, Parentheses: () => Parentheses, ParkingCircle: () => CircleParking, ParkingCircleOff: () => CircleParkingOff, ParkingMeter: () => ParkingMeter, ParkingSquare: () => SquareParking, ParkingSquareOff: () => SquareParkingOff, PartyPopper: () => PartyPopper, Pause: () => Pause, PauseCircle: () => CirclePause, PauseOctagon: () => OctagonPause, PawPrint: () => PawPrint, PcCase: () => PcCase, Pen: () => Pen, PenBox: () => SquarePen, PenLine: () => PenLine, PenOff: () => PenOff, PenSquare: () => SquarePen, PenTool: () => PenTool, Pencil: () => Pencil, PencilLine: () => PencilLine, PencilOff: () => PencilOff, PencilRuler: () => PencilRuler, Pentagon: () => Pentagon, Percent: () => Percent, PercentCircle: () => CirclePercent, PercentDiamond: () => DiamondPercent, PercentSquare: () => SquarePercent, PersonStanding: () => PersonStanding, PhilippinePeso: () => PhilippinePeso, Phone: () => Phone, PhoneCall: () => PhoneCall, PhoneForwarded: () => PhoneForwarded, PhoneIncoming: () => PhoneIncoming, PhoneMissed: () => PhoneMissed, PhoneOff: () => PhoneOff, PhoneOutgoing: () => PhoneOutgoing, Pi: () => Pi, PiSquare: () => SquarePi, Piano: () => Piano, Pickaxe: () => Pickaxe, PictureInPicture: () => PictureInPicture, PictureInPicture2: () => PictureInPicture2, PieChart: () => ChartPie, PiggyBank: () => PiggyBank, Pilcrow: () => Pilcrow, PilcrowLeft: () => PilcrowLeft, PilcrowRight: () => PilcrowRight, PilcrowSquare: () => SquarePilcrow, Pill: () => Pill, PillBottle: () => PillBottle, Pin: () => Pin, PinOff: () => PinOff, Pipette: () => Pipette, Pizza: () => Pizza, Plane: () => Plane, PlaneLanding: () => PlaneLanding, PlaneTakeoff: () => PlaneTakeoff, Play: () => Play, PlayCircle: () => CirclePlay, PlaySquare: () => SquarePlay, Plug: () => Plug, Plug2: () => Plug2, PlugZap: () => PlugZap, PlugZap2: () => PlugZap, Plus: () => Plus, PlusCircle: () => CirclePlus, PlusSquare: () => SquarePlus, Pocket: () => Pocket, PocketKnife: () => PocketKnife, Podcast: () => Podcast, Pointer: () => Pointer, PointerOff: () => PointerOff, Popcorn: () => Popcorn, Popsicle: () => Popsicle, PoundSterling: () => PoundSterling, Power: () => Power, PowerCircle: () => CirclePower, PowerOff: () => PowerOff, PowerSquare: () => SquarePower, Presentation: () => Presentation, Printer: () => Printer, PrinterCheck: () => PrinterCheck, Projector: () => Projector, Proportions: () => Proportions, Puzzle: () => Puzzle, Pyramid: () => Pyramid, QrCode: () => QrCode, Quote: () => Quote, Rabbit: () => Rabbit, Radar: () => Radar, Radiation: () => Radiation, Radical: () => Radical, Radio: () => Radio, RadioReceiver: () => RadioReceiver, RadioTower: () => RadioTower, Radius: () => Radius, RailSymbol: () => RailSymbol, Rainbow: () => Rainbow, Rat: () => Rat, Ratio: () => Ratio, Receipt: () => Receipt, ReceiptCent: () => ReceiptCent, ReceiptEuro: () => ReceiptEuro, ReceiptIndianRupee: () => ReceiptIndianRupee, ReceiptJapaneseYen: () => ReceiptJapaneseYen, ReceiptPoundSterling: () => ReceiptPoundSterling, ReceiptRussianRuble: () => ReceiptRussianRuble, ReceiptSwissFranc: () => ReceiptSwissFranc, ReceiptText: () => ReceiptText, ReceiptTurkishLira: () => ReceiptTurkishLira, RectangleCircle: () => RectangleCircle, RectangleEllipsis: () => RectangleEllipsis, RectangleGoggles: () => RectangleGoggles, RectangleHorizontal: () => RectangleHorizontal, RectangleVertical: () => RectangleVertical, Recycle: () => Recycle, Redo: () => Redo, Redo2: () => Redo2, RedoDot: () => RedoDot, RefreshCcw: () => RefreshCcw, RefreshCcwDot: () => RefreshCcwDot, RefreshCw: () => RefreshCw, RefreshCwOff: () => RefreshCwOff, Refrigerator: () => Refrigerator, Regex: () => Regex, RemoveFormatting: () => RemoveFormatting, Repeat: () => Repeat, Repeat1: () => Repeat1, Repeat2: () => Repeat2, Replace: () => Replace, ReplaceAll: () => ReplaceAll, Reply: () => Reply, ReplyAll: () => ReplyAll, Rewind: () => Rewind, Ribbon: () => Ribbon, Rocket: () => Rocket, RockingChair: () => RockingChair, RollerCoaster: () => RollerCoaster, Rose: () => Rose, Rotate3D: () => Rotate3d, Rotate3d: () => Rotate3d, RotateCcw: () => RotateCcw, RotateCcwKey: () => RotateCcwKey, RotateCcwSquare: () => RotateCcwSquare, RotateCw: () => RotateCw, RotateCwSquare: () => RotateCwSquare, Route: () => Route, RouteOff: () => RouteOff, Router: () => Router, Rows: () => Rows2, Rows2: () => Rows2, Rows3: () => Rows3, Rows4: () => Rows4, Rss: () => Rss, Ruler: () => Ruler, RulerDimensionLine: () => RulerDimensionLine, RussianRuble: () => RussianRuble, Sailboat: () => Sailboat, Salad: () => Salad, Sandwich: () => Sandwich, Satellite: () => Satellite, SatelliteDish: () => SatelliteDish, SaudiRiyal: () => SaudiRiyal, Save: () => Save, SaveAll: () => SaveAll, SaveOff: () => SaveOff, Scale: () => Scale, Scale3D: () => Scale3d, Scale3d: () => Scale3d, Scaling: () => Scaling, Scan: () => Scan, ScanBarcode: () => ScanBarcode, ScanEye: () => ScanEye, ScanFace: () => ScanFace, ScanHeart: () => ScanHeart, ScanLine: () => ScanLine, ScanQrCode: () => ScanQrCode, ScanSearch: () => ScanSearch, ScanText: () => ScanText, ScatterChart: () => ChartScatter, School: () => School, School2: () => University, Scissors: () => Scissors, ScissorsLineDashed: () => ScissorsLineDashed, ScissorsSquare: () => SquareScissors, ScissorsSquareDashedBottom: () => SquareBottomDashedScissors, Scooter: () => Scooter, ScreenShare: () => ScreenShare, ScreenShareOff: () => ScreenShareOff, Scroll: () => Scroll, ScrollText: () => ScrollText, Search: () => Search, SearchCheck: () => SearchCheck, SearchCode: () => SearchCode, SearchSlash: () => SearchSlash, SearchX: () => SearchX, Section: () => Section, Send: () => Send, SendHorizonal: () => SendHorizontal, SendHorizontal: () => SendHorizontal, SendToBack: () => SendToBack, SeparatorHorizontal: () => SeparatorHorizontal, SeparatorVertical: () => SeparatorVertical, Server: () => Server, ServerCog: () => ServerCog, ServerCrash: () => ServerCrash, ServerOff: () => ServerOff, Settings: () => Settings$1, Settings2: () => Settings2, Shapes: () => Shapes, Share: () => Share, Share2: () => Share2, Sheet: () => Sheet, Shell: () => Shell, Shield: () => Shield, ShieldAlert: () => ShieldAlert, ShieldBan: () => ShieldBan, ShieldCheck: () => ShieldCheck, ShieldClose: () => ShieldX, ShieldEllipsis: () => ShieldEllipsis, ShieldHalf: () => ShieldHalf, ShieldMinus: () => ShieldMinus, ShieldOff: () => ShieldOff, ShieldPlus: () => ShieldPlus, ShieldQuestion: () => ShieldQuestionMark, ShieldQuestionMark: () => ShieldQuestionMark, ShieldUser: () => ShieldUser, ShieldX: () => ShieldX, Ship: () => Ship, ShipWheel: () => ShipWheel, Shirt: () => Shirt, ShoppingBag: () => ShoppingBag, ShoppingBasket: () => ShoppingBasket, ShoppingCart: () => ShoppingCart, Shovel: () => Shovel, ShowerHead: () => ShowerHead, Shredder: () => Shredder, Shrimp: () => Shrimp, Shrink: () => Shrink, Shrub: () => Shrub, Shuffle: () => Shuffle, Sidebar: () => PanelLeft, SidebarClose: () => PanelLeftClose, SidebarOpen: () => PanelLeftOpen, Sigma: () => Sigma, SigmaSquare: () => SquareSigma, Signal: () => Signal, SignalHigh: () => SignalHigh, SignalLow: () => SignalLow, SignalMedium: () => SignalMedium, SignalZero: () => SignalZero, Signature: () => Signature, Signpost: () => Signpost, SignpostBig: () => SignpostBig, Siren: () => Siren, SkipBack: () => SkipBack, SkipForward: () => SkipForward, Skull: () => Skull, Slack: () => Slack, Slash: () => Slash, SlashSquare: () => SquareSlash, Slice: () => Slice, Sliders: () => SlidersVertical, SlidersHorizontal: () => SlidersHorizontal, SlidersVertical: () => SlidersVertical, Smartphone: () => Smartphone, SmartphoneCharging: () => SmartphoneCharging, SmartphoneNfc: () => SmartphoneNfc, Smile: () => Smile, SmilePlus: () => SmilePlus, Snail: () => Snail, Snowflake: () => Snowflake, SoapDispenserDroplet: () => SoapDispenserDroplet, Sofa: () => Sofa, SolarPanel: () => SolarPanel, SortAsc: () => ArrowUpNarrowWide, SortDesc: () => ArrowDownWideNarrow, Soup: () => Soup, Space: () => Space, Spade: () => Spade, Sparkle: () => Sparkle, Sparkles: () => Sparkles, Speaker: () => Speaker, Speech: () => Speech, SpellCheck: () => SpellCheck, SpellCheck2: () => SpellCheck2, Spline: () => Spline, SplinePointer: () => SplinePointer, Split: () => Split, SplitSquareHorizontal: () => SquareSplitHorizontal, SplitSquareVertical: () => SquareSplitVertical, Spool: () => Spool, Spotlight: () => Spotlight, SprayCan: () => SprayCan, Sprout: () => Sprout, Square: () => Square, SquareActivity: () => SquareActivity, SquareArrowDown: () => SquareArrowDown, SquareArrowDownLeft: () => SquareArrowDownLeft, SquareArrowDownRight: () => SquareArrowDownRight, SquareArrowLeft: () => SquareArrowLeft, SquareArrowOutDownLeft: () => SquareArrowOutDownLeft, SquareArrowOutDownRight: () => SquareArrowOutDownRight, SquareArrowOutUpLeft: () => SquareArrowOutUpLeft, SquareArrowOutUpRight: () => SquareArrowOutUpRight, SquareArrowRight: () => SquareArrowRight, SquareArrowUp: () => SquareArrowUp, SquareArrowUpLeft: () => SquareArrowUpLeft, SquareArrowUpRight: () => SquareArrowUpRight, SquareAsterisk: () => SquareAsterisk, SquareBottomDashedScissors: () => SquareBottomDashedScissors, SquareChartGantt: () => SquareChartGantt, SquareCheck: () => SquareCheck, SquareCheckBig: () => SquareCheckBig, SquareChevronDown: () => SquareChevronDown, SquareChevronLeft: () => SquareChevronLeft, SquareChevronRight: () => SquareChevronRight, SquareChevronUp: () => SquareChevronUp, SquareCode: () => SquareCode, SquareDashed: () => SquareDashed, SquareDashedBottom: () => SquareDashedBottom, SquareDashedBottomCode: () => SquareDashedBottomCode, SquareDashedKanban: () => SquareDashedKanban, SquareDashedMousePointer: () => SquareDashedMousePointer, SquareDashedTopSolid: () => SquareDashedTopSolid, SquareDivide: () => SquareDivide, SquareDot: () => SquareDot, SquareEqual: () => SquareEqual, SquareFunction: () => SquareFunction, SquareGanttChart: () => SquareChartGantt, SquareKanban: () => SquareKanban, SquareLibrary: () => SquareLibrary, SquareM: () => SquareM, SquareMenu: () => SquareMenu, SquareMinus: () => SquareMinus, SquareMousePointer: () => SquareMousePointer, SquareParking: () => SquareParking, SquareParkingOff: () => SquareParkingOff, SquarePause: () => SquarePause, SquarePen: () => SquarePen, SquarePercent: () => SquarePercent, SquarePi: () => SquarePi, SquarePilcrow: () => SquarePilcrow, SquarePlay: () => SquarePlay, SquarePlus: () => SquarePlus, SquarePower: () => SquarePower, SquareRadical: () => SquareRadical, SquareRoundCorner: () => SquareRoundCorner, SquareScissors: () => SquareScissors, SquareSigma: () => SquareSigma, SquareSlash: () => SquareSlash, SquareSplitHorizontal: () => SquareSplitHorizontal, SquareSplitVertical: () => SquareSplitVertical, SquareSquare: () => SquareSquare, SquareStack: () => SquareStack, SquareStar: () => SquareStar, SquareStop: () => SquareStop, SquareTerminal: () => SquareTerminal, SquareUser: () => SquareUser, SquareUserRound: () => SquareUserRound, SquareX: () => SquareX, SquaresExclude: () => SquaresExclude, SquaresIntersect: () => SquaresIntersect, SquaresSubtract: () => SquaresSubtract, SquaresUnite: () => SquaresUnite, Squircle: () => Squircle, SquircleDashed: () => SquircleDashed, Squirrel: () => Squirrel, Stamp: () => Stamp, Star: () => Star, StarHalf: () => StarHalf, StarOff: () => StarOff, Stars: () => Sparkles, StepBack: () => StepBack, StepForward: () => StepForward, Stethoscope: () => Stethoscope, Sticker: () => Sticker, StickyNote: () => StickyNote, StopCircle: () => CircleStop, Store: () => Store$1, StretchHorizontal: () => StretchHorizontal, StretchVertical: () => StretchVertical, Strikethrough: () => Strikethrough, Subscript: () => Subscript, Subtitles: () => Captions, Sun: () => Sun, SunDim: () => SunDim, SunMedium: () => SunMedium, SunMoon: () => SunMoon, SunSnow: () => SunSnow, Sunrise: () => Sunrise, Sunset: () => Sunset, Superscript: () => Superscript, SwatchBook: () => SwatchBook, SwissFranc: () => SwissFranc, SwitchCamera: () => SwitchCamera, Sword: () => Sword, Swords: () => Swords, Syringe: () => Syringe, Table: () => Table, Table2: () => Table2, TableCellsMerge: () => TableCellsMerge, TableCellsSplit: () => TableCellsSplit, TableColumnsSplit: () => TableColumnsSplit, TableConfig: () => Columns3Cog, TableOfContents: () => TableOfContents, TableProperties: () => TableProperties, TableRowsSplit: () => TableRowsSplit, Tablet: () => Tablet, TabletSmartphone: () => TabletSmartphone, Tablets: () => Tablets, Tag: () => Tag, Tags: () => Tags, Tally1: () => Tally1, Tally2: () => Tally2, Tally3: () => Tally3, Tally4: () => Tally4, Tally5: () => Tally5, Tangent: () => Tangent, Target: () => Target, Telescope: () => Telescope, Tent: () => Tent, TentTree: () => TentTree, Terminal: () => Terminal, TerminalSquare: () => SquareTerminal, TestTube: () => TestTube, TestTube2: () => TestTubeDiagonal, TestTubeDiagonal: () => TestTubeDiagonal, TestTubes: () => TestTubes, Text: () => TextAlignStart, TextAlignCenter: () => TextAlignCenter, TextAlignEnd: () => TextAlignEnd, TextAlignJustify: () => TextAlignJustify, TextAlignStart: () => TextAlignStart, TextCursor: () => TextCursor, TextCursorInput: () => TextCursorInput, TextInitial: () => TextInitial, TextQuote: () => TextQuote, TextSearch: () => TextSearch, TextSelect: () => TextSelect, TextSelection: () => TextSelect, TextWrap: () => TextWrap, Theater: () => Theater, Thermometer: () => Thermometer, ThermometerSnowflake: () => ThermometerSnowflake, ThermometerSun: () => ThermometerSun, ThumbsDown: () => ThumbsDown, ThumbsUp: () => ThumbsUp, Ticket: () => Ticket, TicketCheck: () => TicketCheck, TicketMinus: () => TicketMinus, TicketPercent: () => TicketPercent, TicketPlus: () => TicketPlus, TicketSlash: () => TicketSlash, TicketX: () => TicketX, Tickets: () => Tickets, TicketsPlane: () => TicketsPlane, Timer: () => Timer, TimerOff: () => TimerOff, TimerReset: () => TimerReset, ToggleLeft: () => ToggleLeft, ToggleRight: () => ToggleRight, Toilet: () => Toilet, ToolCase: () => ToolCase, Tornado: () => Tornado, Torus: () => Torus, Touchpad: () => Touchpad, TouchpadOff: () => TouchpadOff, TowerControl: () => TowerControl, ToyBrick: () => ToyBrick, Tractor: () => Tractor, TrafficCone: () => TrafficCone, Train: () => TramFront, TrainFront: () => TrainFront, TrainFrontTunnel: () => TrainFrontTunnel, TrainTrack: () => TrainTrack, TramFront: () => TramFront, Transgender: () => Transgender, Trash: () => Trash, Trash2: () => Trash2, TreeDeciduous: () => TreeDeciduous, TreePalm: () => TreePalm, TreePine: () => TreePine, Trees: () => Trees, Trello: () => Trello, TrendingDown: () => TrendingDown, TrendingUp: () => TrendingUp, TrendingUpDown: () => TrendingUpDown, Triangle: () => Triangle, TriangleAlert: () => TriangleAlert, TriangleDashed: () => TriangleDashed, TriangleRight: () => TriangleRight, Trophy: () => Trophy, Truck: () => Truck, TruckElectric: () => TruckElectric, TurkishLira: () => TurkishLira, Turntable: () => Turntable, Turtle: () => Turtle, Tv: () => Tv, Tv2: () => TvMinimal, TvMinimal: () => TvMinimal, TvMinimalPlay: () => TvMinimalPlay, Twitch: () => Twitch, Twitter: () => Twitter, Type: () => Type$1, TypeOutline: () => TypeOutline, Umbrella: () => Umbrella, UmbrellaOff: () => UmbrellaOff, Underline: () => Underline, Undo: () => Undo, Undo2: () => Undo2, UndoDot: () => UndoDot, UnfoldHorizontal: () => UnfoldHorizontal, UnfoldVertical: () => UnfoldVertical, Ungroup: () => Ungroup, University: () => University, Unlink: () => Unlink, Unlink2: () => Unlink2, Unlock: () => LockOpen, UnlockKeyhole: () => LockKeyholeOpen, Unplug: () => Unplug, Upload: () => Upload, UploadCloud: () => CloudUpload, Usb: () => Usb, User: () => User, User2: () => UserRound, UserCheck: () => UserCheck, UserCheck2: () => UserRoundCheck, UserCircle: () => CircleUser, UserCircle2: () => CircleUserRound, UserCog: () => UserCog, UserCog2: () => UserRoundCog, UserLock: () => UserLock, UserMinus: () => UserMinus, UserMinus2: () => UserRoundMinus, UserPen: () => UserPen, UserPlus: () => UserPlus, UserPlus2: () => UserRoundPlus, UserRound: () => UserRound, UserRoundCheck: () => UserRoundCheck, UserRoundCog: () => UserRoundCog, UserRoundMinus: () => UserRoundMinus, UserRoundPen: () => UserRoundPen, UserRoundPlus: () => UserRoundPlus, UserRoundSearch: () => UserRoundSearch, UserRoundX: () => UserRoundX, UserSearch: () => UserSearch, UserSquare: () => SquareUser, UserSquare2: () => SquareUserRound, UserStar: () => UserStar, UserX: () => UserX, UserX2: () => UserRoundX, Users: () => Users, Users2: () => UsersRound, UsersRound: () => UsersRound, Utensils: () => Utensils, UtensilsCrossed: () => UtensilsCrossed, UtilityPole: () => UtilityPole, Van: () => Van, Variable: () => Variable, Vault: () => Vault, VectorSquare: () => VectorSquare, Vegan: () => Vegan, VenetianMask: () => VenetianMask, Venus: () => Venus, VenusAndMars: () => VenusAndMars, Verified: () => BadgeCheck, Vibrate: () => Vibrate, VibrateOff: () => VibrateOff, Video: () => Video, VideoOff: () => VideoOff, Videotape: () => Videotape, View: () => View, Voicemail: () => Voicemail, Volleyball: () => Volleyball, Volume: () => Volume, Volume1: () => Volume1, Volume2: () => Volume2, VolumeOff: () => VolumeOff, VolumeX: () => VolumeX, Vote: () => Vote, Wallet: () => Wallet, Wallet2: () => WalletMinimal, WalletCards: () => WalletCards, WalletMinimal: () => WalletMinimal, Wallpaper: () => Wallpaper, Wand: () => Wand, Wand2: () => WandSparkles, WandSparkles: () => WandSparkles, Warehouse: () => Warehouse, WashingMachine: () => WashingMachine, Watch: () => Watch, Waves: () => Waves, WavesArrowDown: () => WavesArrowDown, WavesArrowUp: () => WavesArrowUp, WavesLadder: () => WavesLadder, Waypoints: () => Waypoints, Webcam: () => Webcam, Webhook: () => Webhook, WebhookOff: () => WebhookOff, Weight: () => Weight, WeightTilde: () => WeightTilde, Wheat: () => Wheat, WheatOff: () => WheatOff, WholeWord: () => WholeWord, Wifi: () => Wifi, WifiCog: () => WifiCog, WifiHigh: () => WifiHigh, WifiLow: () => WifiLow, WifiOff: () => WifiOff, WifiPen: () => WifiPen, WifiSync: () => WifiSync, WifiZero: () => WifiZero, Wind: () => Wind, WindArrowDown: () => WindArrowDown, Wine: () => Wine, WineOff: () => WineOff, Workflow: () => Workflow, Worm: () => Worm, WrapText: () => TextWrap, Wrench: () => Wrench, X: () => X, XCircle: () => CircleX, XOctagon: () => OctagonX, XSquare: () => SquareX, Youtube: () => Youtube, Zap: () => Zap, ZapOff: () => ZapOff, ZoomIn: () => ZoomIn, ZoomOut: () => ZoomOut }); var init_iconsAndAliases = __esmMin((() => { init_a_arrow_down(); init_a_arrow_up(); init_a_large_small(); init_accessibility(); init_activity(); init_air_vent(); init_airplay(); init_alarm_clock_check(); init_alarm_clock_minus(); init_alarm_clock_off(); init_alarm_clock_plus(); init_alarm_clock(); init_alarm_smoke(); init_album(); init_align_center_horizontal(); init_align_center_vertical(); init_align_end_horizontal(); init_align_end_vertical(); init_align_horizontal_distribute_center(); init_align_horizontal_distribute_end(); init_align_horizontal_justify_center(); init_align_horizontal_distribute_start(); init_align_horizontal_justify_end(); init_align_horizontal_space_around(); init_align_horizontal_justify_start(); init_align_horizontal_space_between(); init_align_start_horizontal(); init_align_start_vertical(); init_align_vertical_distribute_center(); init_align_vertical_distribute_end(); init_align_vertical_distribute_start(); init_align_vertical_justify_center(); init_align_vertical_justify_end(); init_align_vertical_justify_start(); init_align_vertical_space_around(); init_align_vertical_space_between(); init_ambulance(); init_ampersand(); init_ampersands(); init_amphora(); init_anchor(); init_angry(); init_annoyed(); init_antenna(); init_anvil(); init_aperture(); init_app_window_mac(); init_app_window(); init_apple(); init_archive_restore(); init_archive_x(); init_archive(); init_arrow_big_down_dash(); init_armchair(); init_arrow_big_down(); init_arrow_big_left_dash(); init_arrow_big_left(); init_arrow_big_right_dash(); init_arrow_big_right(); init_arrow_big_up_dash(); init_arrow_big_up(); init_arrow_down_0_1(); init_arrow_down_1_0(); init_arrow_down_a_z(); init_arrow_down_from_line(); init_arrow_down_left(); init_arrow_down_narrow_wide(); init_arrow_down_right(); init_arrow_down_to_dot(); init_arrow_down_to_line(); init_arrow_down_up(); init_arrow_down_z_a(); init_arrow_down_wide_narrow(); init_arrow_down(); init_arrow_left_from_line(); init_arrow_left_right(); init_arrow_left_to_line(); init_arrow_left(); init_arrow_right_from_line(); init_arrow_right_left(); init_arrow_right_to_line(); init_arrow_right(); init_arrow_up_0_1(); init_arrow_up_1_0(); init_arrow_up_a_z(); init_arrow_up_down(); init_arrow_up_from_dot(); init_arrow_up_from_line(); init_arrow_up_left(); init_arrow_up_narrow_wide(); init_arrow_up_right(); init_arrow_up_to_line(); init_arrow_up_wide_narrow(); init_arrow_up_z_a(); init_arrow_up(); init_arrows_up_from_line(); init_asterisk(); init_at_sign(); init_atom(); init_audio_lines(); init_audio_waveform(); init_award(); init_axe(); init_axis_3d(); init_baby(); init_backpack(); init_badge_cent(); init_badge_alert(); init_badge_check(); init_badge_dollar_sign(); init_badge_euro(); init_badge_info(); init_badge_indian_rupee(); init_badge_japanese_yen(); init_badge_minus(); init_badge_percent(); init_badge_plus(); init_badge_pound_sterling(); init_badge_question_mark(); init_badge_russian_ruble(); init_badge_swiss_franc(); init_badge_turkish_lira(); init_badge_x(); init_badge(); init_baggage_claim(); init_ban(); init_banana(); init_bandage(); init_banknote_arrow_down(); init_banknote_arrow_up(); init_banknote_x(); init_banknote(); init_barcode(); init_barrel(); init_baseline(); init_bath(); init_battery_charging(); init_battery_full(); init_battery_low(); init_battery_medium(); init_battery_plus(); init_battery_warning(); init_battery(); init_beaker(); init_bean_off(); init_bean(); init_bed_double(); init_bed_single(); init_bed(); init_beef(); init_beer_off(); init_beer(); init_bell_dot(); init_bell_electric(); init_bell_minus(); init_bell_off(); init_bell_plus(); init_bell_ring(); init_bell(); init_between_horizontal_end(); init_between_horizontal_start(); init_between_vertical_end(); init_between_vertical_start(); init_biceps_flexed(); init_bike(); init_binoculars(); init_binary(); init_biohazard(); init_bird(); init_bitcoin(); init_blend(); init_birdhouse(); init_blinds(); init_blocks(); init_bluetooth_connected(); init_bluetooth_off(); init_bluetooth_searching(); init_bluetooth(); init_bold(); init_bolt(); init_bomb(); init_bone(); init_book_a(); init_book_alert(); init_book_audio(); init_book_check(); init_book_copy(); init_book_dashed(); init_book_down(); init_book_headphones(); init_book_heart(); init_book_image(); init_book_key(); init_book_lock(); init_book_marked(); init_book_minus(); init_book_open_check(); init_book_open_text(); init_book_open(); init_book_plus(); init_book_search(); init_book_text(); init_book_type(); init_book_up_2(); init_book_up(); init_book_user(); init_book_x(); init_book(); init_bookmark_check(); init_bookmark_minus(); init_bookmark_plus(); init_bookmark_x(); init_bookmark(); init_boom_box(); init_bot_message_square(); init_bot_off(); init_bot(); init_bottle_wine(); init_bow_arrow(); init_box(); init_boxes(); init_braces(); init_brackets(); init_brain_circuit(); init_brain_cog(); init_brain(); init_brick_wall_fire(); init_brick_wall_shield(); init_brick_wall(); init_briefcase_business(); init_briefcase_conveyor_belt(); init_briefcase_medical(); init_briefcase(); init_bring_to_front(); init_brush_cleaning(); init_brush(); init_bubbles(); init_bug_off(); init_bug_play(); init_bug(); init_building_2(); init_building(); init_bus_front(); init_bus(); init_cable_car(); init_cable(); init_cake_slice(); init_cake(); init_calculator(); init_calendar_1(); init_calendar_arrow_down(); init_calendar_arrow_up(); init_calendar_check_2(); init_calendar_check(); init_calendar_clock(); init_calendar_cog(); init_calendar_days(); init_calendar_fold(); init_calendar_heart(); init_calendar_minus(); init_calendar_minus_2(); init_calendar_off(); init_calendar_plus_2(); init_calendar_plus(); init_calendar_range(); init_calendar_search(); init_calendar_sync(); init_calendar_x_2(); init_calendar_x(); init_calendar(); init_calendars(); init_camera_off(); init_camera(); init_candy_cane(); init_candy_off(); init_cannabis(); init_captions_off(); init_candy(); init_captions(); init_car_front(); init_car_taxi_front(); init_car(); init_caravan(); init_card_sim(); init_carrot(); init_case_lower(); init_case_sensitive(); init_case_upper(); init_cassette_tape(); init_cast(); init_castle(); init_cat(); init_cctv(); init_chart_area(); init_chart_bar_big(); init_chart_bar_decreasing(); init_chart_bar_increasing(); init_chart_bar_stacked(); init_chart_bar(); init_chart_candlestick(); init_chart_column_big(); init_chart_column_increasing(); init_chart_column_decreasing(); init_chart_column_stacked(); init_chart_column(); init_chart_gantt(); init_chart_line(); init_chart_network(); init_chart_no_axes_column_decreasing(); init_chart_no_axes_column_increasing(); init_chart_no_axes_column(); init_chart_no_axes_combined(); init_chart_no_axes_gantt(); init_chart_pie(); init_chart_scatter(); init_chart_spline(); init_check_check(); init_check_line(); init_check(); init_chef_hat(); init_cherry(); init_chess_bishop(); init_chess_king(); init_chess_knight(); init_chess_pawn(); init_chess_queen(); init_chess_rook(); init_chevron_down(); init_chevron_first(); init_chevron_last(); init_chevron_left(); init_chevron_right(); init_chevron_up(); init_chevrons_down_up(); init_chevrons_down(); init_chevrons_left_right_ellipsis(); init_chevrons_left_right(); init_chevrons_left(); init_chevrons_right_left(); init_chevrons_right(); init_chevrons_up_down(); init_chevrons_up(); init_chromium(); init_church(); init_cigarette_off(); init_cigarette(); init_circle_alert(); init_circle_arrow_down(); init_circle_arrow_left(); init_circle_arrow_out_down_left(); init_circle_arrow_out_down_right(); init_circle_arrow_out_up_left(); init_circle_arrow_out_up_right(); init_circle_arrow_right(); init_circle_arrow_up(); init_circle_check_big(); init_circle_check(); init_circle_chevron_down(); init_circle_chevron_left(); init_circle_chevron_right(); init_circle_chevron_up(); init_circle_dashed(); init_circle_divide(); init_circle_dollar_sign(); init_circle_dot_dashed(); init_circle_dot(); init_circle_ellipsis(); init_circle_equal(); init_circle_fading_arrow_up(); init_circle_fading_plus(); init_circle_gauge(); init_circle_minus(); init_circle_off(); init_circle_parking_off(); init_circle_parking(); init_circle_pause(); init_circle_percent(); init_circle_play(); init_circle_plus(); init_circle_pound_sterling(); init_circle_power(); init_circle_question_mark(); init_circle_slash_2(); init_circle_slash(); init_circle_small(); init_circle_star(); init_circle_stop(); init_circle_user_round(); init_circle_user(); init_circle_x(); init_circle(); init_circuit_board(); init_citrus(); init_clapperboard(); init_clipboard_check(); init_clipboard_clock(); init_clipboard_copy(); init_clipboard_list(); init_clipboard_paste(); init_clipboard_minus(); init_clipboard_pen_line(); init_clipboard_pen(); init_clipboard_plus(); init_clipboard_type(); init_clipboard(); init_clipboard_x(); init_clock_1(); init_clock_10(); init_clock_12(); init_clock_2(); init_clock_3(); init_clock_11(); init_clock_4(); init_clock_5(); init_clock_6(); init_clock_7(); init_clock_8(); init_clock_9(); init_clock_alert(); init_clock_arrow_down(); init_clock_arrow_up(); init_clock_check(); init_clock_fading(); init_clock_plus(); init_clock(); init_closed_caption(); init_cloud_alert(); init_cloud_check(); init_cloud_download(); init_cloud_cog(); init_cloud_drizzle(); init_cloud_fog(); init_cloud_hail(); init_cloud_lightning(); init_cloud_moon_rain(); init_cloud_moon(); init_cloud_off(); init_cloud_rain_wind(); init_cloud_rain(); init_cloud_snow(); init_cloud_sun_rain(); init_cloud_sun(); init_cloud_upload(); init_cloud(); init_cloudy(); init_clover(); init_club(); init_code_xml(); init_code(); init_codepen(); init_codesandbox(); init_coffee(); init_cog(); init_coins(); init_columns_3_cog(); init_columns_2(); init_columns_3(); init_columns_4(); init_combine(); init_command(); init_compass(); init_component(); init_computer(); init_concierge_bell(); init_cone(); init_construction(); init_contact_round(); init_contact(); init_container(); init_contrast(); init_cookie(); init_cooking_pot(); init_copy_check(); init_copy_minus(); init_copy_plus(); init_copy_slash(); init_copy_x(); init_copy(); init_copyright(); init_copyleft(); init_corner_down_left(); init_corner_down_right(); init_corner_left_down(); init_corner_left_up(); init_corner_right_down(); init_corner_right_up(); init_corner_up_left(); init_cpu(); init_creative_commons(); init_credit_card(); init_corner_up_right(); init_croissant(); init_crop(); init_cross(); init_crosshair(); init_crown(); init_cuboid(); init_cup_soda(); init_currency(); init_cylinder(); init_dam(); init_database_backup(); init_database_zap(); init_database(); init_decimals_arrow_left(); init_decimals_arrow_right(); init_delete(); init_dessert(); init_diameter(); init_diamond_minus(); init_diamond_percent(); init_diamond_plus(); init_diamond(); init_dice_1(); init_dice_2(); init_dice_3(); init_dice_4(); init_dice_5(); init_dice_6(); init_dices(); init_diff(); init_disc_2(); init_disc_3(); init_disc_album(); init_disc(); init_divide(); init_dna_off(); init_dna(); init_dock(); init_dog(); init_dollar_sign(); init_donut(); init_door_closed_locked(); init_door_closed(); init_door_open(); init_dot(); init_download(); init_drafting_compass(); init_drama(); init_dribbble(); init_drill(); init_drone(); init_droplet_off(); init_droplet(); init_droplets(); init_drum(); init_drumstick(); init_dumbbell(); init_ear_off(); init_ear(); init_earth_lock(); init_earth(); init_eclipse(); init_egg_fried(); init_egg_off(); init_egg(); init_ellipsis_vertical(); init_ellipsis(); init_equal_approximately(); init_equal_not(); init_equal(); init_eraser(); init_ethernet_port(); init_euro(); init_ev_charger(); init_expand(); init_external_link(); init_eye_closed(); init_eye_off(); init_eye(); init_facebook(); init_factory(); init_fan(); init_fast_forward(); init_feather(); init_fence(); init_ferris_wheel(); init_figma(); init_file_archive(); init_file_axis_3d(); init_file_badge(); init_file_box(); init_file_braces_corner(); init_file_braces(); init_file_chart_column_increasing(); init_file_chart_column(); init_file_chart_line(); init_file_chart_pie(); init_file_check_corner(); init_file_check(); init_file_clock(); init_file_code(); init_file_code_corner(); init_file_cog(); init_file_diff(); init_file_digit(); init_file_down(); init_file_exclamation_point(); init_file_headphone(); init_file_heart(); init_file_image(); init_file_input(); init_file_key(); init_file_lock(); init_file_minus_corner(); init_file_minus(); init_file_music(); init_file_output(); init_file_pen_line(); init_file_pen(); init_file_play(); init_file_plus_corner(); init_file_plus(); init_file_question_mark(); init_file_scan(); init_file_search_corner(); init_file_search(); init_file_signal(); init_file_sliders(); init_file_spreadsheet(); init_file_stack(); init_file_symlink(); init_file_terminal(); init_file_text(); init_file_type_corner(); init_file_type(); init_file_up(); init_file_user(); init_file_video_camera(); init_file_volume(); init_file_x_corner(); init_file_x(); init_file(); init_files(); init_film(); init_fingerprint_pattern(); init_fire_extinguisher(); init_fish_off(); init_fish_symbol(); init_fish(); init_flag_off(); init_flag_triangle_left(); init_flag_triangle_right(); init_flag(); init_flame_kindling(); init_flame(); init_flashlight_off(); init_flashlight(); init_flask_conical_off(); init_flask_conical(); init_flask_round(); init_flip_horizontal_2(); init_flip_horizontal(); init_flip_vertical_2(); init_flip_vertical(); init_flower_2(); init_flower(); init_focus(); init_fold_horizontal(); init_fold_vertical(); init_folder_archive(); init_folder_check(); init_folder_clock(); init_folder_closed(); init_folder_code(); init_folder_cog(); init_folder_dot(); init_folder_down(); init_folder_git_2(); init_folder_git(); init_folder_heart(); init_folder_input(); init_folder_kanban(); init_folder_key(); init_folder_lock(); init_folder_minus(); init_folder_open_dot(); init_folder_open(); init_folder_output(); init_folder_pen(); init_folder_plus(); init_folder_root(); init_folder_search_2(); init_folder_search(); init_folder_symlink(); init_folder_sync(); init_folder_tree(); init_folder_up(); init_folder_x(); init_folder(); init_folders(); init_footprints(); init_forklift(); init_form(); init_forward(); init_frame(); init_framer(); init_frown(); init_fuel(); init_fullscreen(); init_funnel_plus(); init_funnel_x(); init_funnel(); init_gallery_horizontal_end(); init_gallery_horizontal(); init_gallery_thumbnails(); init_gallery_vertical_end(); init_gallery_vertical(); init_gamepad_2(); init_gamepad_directional(); init_gamepad(); init_gauge(); init_gavel(); init_gem(); init_georgian_lari(); init_ghost(); init_gift(); init_git_branch_minus(); init_git_branch_plus(); init_git_branch(); init_git_commit_horizontal(); init_git_commit_vertical(); init_git_compare_arrows(); init_git_compare(); init_git_fork(); init_git_graph(); init_git_merge(); init_git_pull_request_arrow(); init_git_pull_request_closed(); init_git_pull_request_create_arrow(); init_git_pull_request_create(); init_git_pull_request_draft(); init_gitlab(); init_git_pull_request(); init_glass_water(); init_github(); init_glasses(); init_globe_lock(); init_globe(); init_goal(); init_gpu(); init_graduation_cap(); init_grape(); init_grid_2x2_check(); init_grid_2x2_plus(); init_grid_2x2_x(); init_grid_2x2(); init_grid_3x2(); init_grid_3x3(); init_grip_horizontal(); init_grip_vertical(); init_grip(); init_group(); init_guitar(); init_ham(); init_hamburger(); init_hammer(); init_hand_fist(); init_hand_coins(); init_hand_grab(); init_hand_heart(); init_hand_helping(); init_hand_metal(); init_hand_platter(); init_hand(); init_handbag(); init_handshake(); init_hard_drive_download(); init_hard_drive_upload(); init_hard_drive(); init_hard_hat(); init_hash(); init_hat_glasses(); init_hdmi_port(); init_haze(); init_heading_1(); init_heading_2(); init_heading_3(); init_heading_4(); init_heading_6(); init_heading_5(); init_heading(); init_headphone_off(); init_headphones(); init_headset(); init_heart_crack(); init_heart_handshake(); init_heart_minus(); init_heart_off(); init_heart_plus(); init_heart_pulse(); init_heart(); init_heater(); init_helicopter(); init_hexagon(); init_highlighter(); init_history(); init_hop_off(); init_hop(); init_hospital(); init_hotel(); init_hourglass(); init_house_plug(); init_house_heart(); init_house_plus(); init_house_wifi(); init_house(); init_ice_cream_bowl(); init_ice_cream_cone(); init_id_card_lanyard(); init_id_card(); init_image_down(); init_image_minus(); init_image_off(); init_image_play(); init_image_plus(); init_image_up(); init_image_upscale(); init_image(); init_images(); init_import(); init_inbox(); init_indian_rupee(); init_infinity(); init_info(); init_inspection_panel(); init_instagram(); init_italic(); init_iteration_ccw(); init_iteration_cw(); init_japanese_yen(); init_joystick(); init_kanban(); init_kayak(); init_key_round(); init_key_square(); init_key(); init_keyboard_music(); init_keyboard_off(); init_keyboard(); init_lamp_ceiling(); init_lamp_desk(); init_lamp_floor(); init_lamp_wall_down(); init_lamp_wall_up(); init_land_plot(); init_lamp(); init_landmark(); init_languages(); init_laptop_minimal_check(); init_laptop_minimal(); init_laptop(); init_lasso(); init_lasso_select(); init_laugh(); init_layers_2(); init_layers(); init_layout_dashboard(); init_layout_grid(); init_layout_list(); init_layout_panel_left(); init_layout_panel_top(); init_layout_template(); init_leaf(); init_leafy_green(); init_lectern(); init_library_big(); init_library(); init_life_buoy(); init_ligature(); init_lightbulb_off(); init_lightbulb(); init_line_squiggle(); init_link_2_off(); init_link_2(); init_link(); init_linkedin(); init_list_check(); init_list_checks(); init_list_chevrons_down_up(); init_list_chevrons_up_down(); init_list_collapse(); init_list_end(); init_list_filter_plus(); init_list_filter(); init_list_indent_decrease(); init_list_indent_increase(); init_list_minus(); init_list_music(); init_list_ordered(); init_list_plus(); init_list_restart(); init_list_start(); init_list_todo(); init_list_tree(); init_list_video(); init_list_x(); init_list(); init_loader_circle(); init_loader_pinwheel(); init_loader(); init_locate_off(); init_locate_fixed(); init_locate(); init_lock_keyhole_open(); init_lock_keyhole(); init_lock_open(); init_lock(); init_log_out(); init_log_in(); init_logs(); init_lollipop(); init_luggage(); init_magnet(); init_mail_check(); init_mail_minus(); init_mail_open(); init_mail_plus(); init_mail_question_mark(); init_mail_search(); init_mail_warning(); init_mail_x(); init_mail(); init_mailbox(); init_mails(); init_map_minus(); init_map_pin_check_inside(); init_map_pin_check(); init_map_pin_house(); init_map_pin_minus_inside(); init_map_pin_minus(); init_map_pin_off(); init_map_pin_pen(); init_map_pin_plus_inside(); init_map_pin_x_inside(); init_map_pin_plus(); init_map_pin_x(); init_map_pin(); init_map_pinned(); init_map_plus(); init_map(); init_mars(); init_mars_stroke(); init_martini(); init_maximize_2(); init_maximize(); init_medal(); init_megaphone_off(); init_megaphone(); init_meh(); init_memory_stick(); init_menu(); init_merge(); init_message_circle_code(); init_message_circle_dashed(); init_message_circle_heart(); init_message_circle_more(); init_message_circle_off(); init_message_circle_plus(); init_message_circle_question_mark(); init_message_circle_reply(); init_message_circle_warning(); init_message_circle_x(); init_message_circle(); init_message_square_code(); init_message_square_dashed(); init_message_square_diff(); init_message_square_dot(); init_message_square_heart(); init_message_square_lock(); init_message_square_more(); init_message_square_off(); init_message_square_plus(); init_message_square_quote(); init_message_square_reply(); init_message_square_share(); init_message_square_text(); init_message_square_warning(); init_message_square_x(); init_message_square(); init_messages_square(); init_mic_off(); init_mic_vocal(); init_mic(); init_microchip(); init_microscope(); init_milestone(); init_microwave(); init_milk_off(); init_milk(); init_minimize_2(); init_minimize(); init_minus(); init_monitor_check(); init_monitor_cloud(); init_monitor_cog(); init_monitor_dot(); init_monitor_down(); init_monitor_off(); init_monitor_pause(); init_monitor_play(); init_monitor_smartphone(); init_monitor_speaker(); init_monitor_stop(); init_monitor_up(); init_monitor_x(); init_monitor(); init_moon_star(); init_moon(); init_motorbike(); init_mountain_snow(); init_mountain(); init_mouse_off(); init_mouse_pointer_2_off(); init_mouse_pointer_2(); init_mouse_pointer_ban(); init_mouse_pointer_click(); init_mouse_pointer(); init_mouse(); init_move_diagonal(); init_move_diagonal_2(); init_move_3d(); init_move_down_left(); init_move_down_right(); init_move_down(); init_move_left(); init_move_horizontal(); init_move_right(); init_move_up_left(); init_move_up_right(); init_move_up(); init_move_vertical(); init_move(); init_music_2(); init_music_3(); init_music_4(); init_music(); init_navigation_2(); init_navigation_2_off(); init_navigation_off(); init_navigation(); init_network(); init_newspaper(); init_nfc(); init_non_binary(); init_notebook_pen(); init_notebook_tabs(); init_notebook_text(); init_notebook(); init_notepad_text_dashed(); init_nut_off(); init_notepad_text(); init_nut(); init_octagon_alert(); init_octagon_minus(); init_octagon_pause(); init_octagon_x(); init_octagon(); init_omega(); init_option(); init_orbit(); init_origami(); init_package_2(); init_package_check(); init_package_minus(); init_package_open(); init_package_plus(); init_package_search(); init_package_x(); init_package(); init_paint_bucket(); init_paint_roller(); init_paintbrush_vertical(); init_paintbrush(); init_palette(); init_panda(); init_panel_bottom_close(); init_panel_bottom_dashed(); init_panel_bottom(); init_panel_bottom_open(); init_panel_left_close(); init_panel_left_dashed(); init_panel_left_open(); init_panel_left_right_dashed(); init_panel_left(); init_panel_right_close(); init_panel_right_open(); init_panel_right_dashed(); init_panel_top_bottom_dashed(); init_panel_right(); init_panel_top_close(); init_panel_top_dashed(); init_panel_top_open(); init_panel_top(); init_panels_left_bottom(); init_panels_right_bottom(); init_panels_top_left(); init_paperclip(); init_parentheses(); init_parking_meter(); init_party_popper(); init_pause(); init_paw_print(); init_pc_case(); init_pen_line(); init_pen_off(); init_pen_tool(); init_pen(); init_pencil_line(); init_pencil_off(); init_pencil_ruler(); init_pencil(); init_pentagon(); init_percent(); init_person_standing(); init_philippine_peso(); init_phone_call(); init_phone_forwarded(); init_phone_incoming(); init_phone_missed(); init_phone_off(); init_phone_outgoing(); init_phone(); init_pi(); init_piano(); init_pickaxe(); init_picture_in_picture_2(); init_picture_in_picture(); init_piggy_bank(); init_pilcrow_left(); init_pilcrow(); init_pilcrow_right(); init_pill_bottle(); init_pill(); init_pin_off(); init_pin(); init_pipette(); init_pizza(); init_plane_landing(); init_plane_takeoff(); init_plane(); init_play(); init_plug_2(); init_plug_zap(); init_plug(); init_plus(); init_pocket_knife(); init_pocket(); init_podcast(); init_pointer_off(); init_pointer(); init_popcorn(); init_popsicle(); init_pound_sterling(); init_power_off(); init_power(); init_presentation(); init_printer_check(); init_projector(); init_printer(); init_proportions(); init_puzzle(); init_pyramid(); init_qr_code(); init_quote(); init_rabbit(); init_radar(); init_radiation(); init_radical(); init_radio_receiver(); init_radio(); init_radius(); init_radio_tower(); init_rail_symbol(); init_rainbow(); init_rat(); init_ratio(); init_receipt_cent(); init_receipt_euro(); init_receipt_indian_rupee(); init_receipt_japanese_yen(); init_receipt_pound_sterling(); init_receipt_russian_ruble(); init_receipt_swiss_franc(); init_receipt_text(); init_receipt_turkish_lira(); init_receipt(); init_rectangle_circle(); init_rectangle_ellipsis(); init_rectangle_goggles(); init_rectangle_horizontal(); init_rectangle_vertical(); init_recycle(); init_redo_2(); init_redo_dot(); init_redo(); init_refresh_ccw_dot(); init_refresh_ccw(); init_refresh_cw_off(); init_refresh_cw(); init_refrigerator(); init_regex(); init_remove_formatting(); init_repeat_1(); init_repeat_2(); init_repeat$2(); init_replace_all(); init_replace(); init_reply_all(); init_reply(); init_rewind(); init_ribbon(); init_rocket(); init_rocking_chair(); init_roller_coaster(); init_rose(); init_rotate_3d(); init_rotate_ccw_square(); init_rotate_ccw_key(); init_rotate_ccw(); init_rotate_cw_square(); init_rotate_cw(); init_route_off(); init_route(); init_rows_2(); init_router(); init_rows_3(); init_rows_4(); init_rss(); init_ruler_dimension_line(); init_ruler(); init_russian_ruble(); init_sailboat(); init_salad(); init_sandwich(); init_satellite_dish(); init_satellite(); init_saudi_riyal(); init_save_all(); init_save_off(); init_save(); init_scale_3d(); init_scale(); init_scaling(); init_scan_barcode(); init_scan_eye(); init_scan_heart(); init_scan_face(); init_scan_qr_code(); init_scan_line(); init_scan_search(); init_scan_text(); init_scan(); init_school(); init_scissors_line_dashed(); init_scissors(); init_scooter(); init_screen_share_off(); init_screen_share(); init_scroll_text(); init_scroll(); init_search_check(); init_search_code(); init_search_slash(); init_search_x(); init_search(); init_section(); init_send_horizontal(); init_send_to_back(); init_send(); init_separator_horizontal(); init_separator_vertical(); init_server_cog(); init_server_crash(); init_server_off(); init_server(); init_settings_2(); init_settings(); init_shapes(); init_share_2(); init_share(); init_sheet(); init_shell(); init_shield_ban(); init_shield_alert(); init_shield_check(); init_shield_ellipsis(); init_shield_half(); init_shield_minus(); init_shield_off(); init_shield_plus(); init_shield_question_mark(); init_shield_user(); init_shield_x(); init_shield(); init_ship_wheel(); init_ship(); init_shirt(); init_shopping_bag(); init_shopping_basket(); init_shopping_cart(); init_shovel(); init_shower_head(); init_shredder(); init_shrimp(); init_shrink(); init_shrub(); init_shuffle(); init_sigma(); init_signal_high(); init_signal_low(); init_signal_medium(); init_signal_zero(); init_signal(); init_signature(); init_signpost_big(); init_siren(); init_skip_back(); init_signpost(); init_skip_forward(); init_skull(); init_slack(); init_slash(); init_slice(); init_sliders_horizontal(); init_sliders_vertical(); init_smartphone_charging(); init_smartphone_nfc(); init_smartphone(); init_smile_plus(); init_smile(); init_snail(); init_snowflake(); init_soap_dispenser_droplet(); init_sofa(); init_solar_panel(); init_soup(); init_space(); init_spade(); init_sparkles(); init_speaker(); init_sparkle(); init_speech(); init_spell_check_2(); init_spell_check(); init_spline_pointer(); init_spline(); init_spool(); init_split(); init_spotlight(); init_spray_can(); init_sprout(); init_square_activity(); init_square_arrow_down_left(); init_square_arrow_down_right(); init_square_arrow_down(); init_square_arrow_left(); init_square_arrow_out_down_left(); init_square_arrow_out_down_right(); init_square_arrow_out_up_left(); init_square_arrow_out_up_right(); init_square_arrow_right(); init_square_arrow_up_left(); init_square_arrow_up_right(); init_square_arrow_up(); init_square_asterisk(); init_square_bottom_dashed_scissors(); init_square_check_big(); init_square_chart_gantt(); init_square_check(); init_square_chevron_down(); init_square_chevron_left(); init_square_chevron_right(); init_square_chevron_up(); init_square_code(); init_square_dashed_bottom_code(); init_square_dashed_kanban(); init_square_dashed_mouse_pointer(); init_square_dashed_bottom(); init_square_dashed_top_solid(); init_square_dashed(); init_square_divide(); init_square_dot(); init_square_function(); init_square_equal(); init_square_kanban(); init_square_library(); init_square_m(); init_square_menu(); init_square_minus(); init_square_mouse_pointer(); init_square_parking_off(); init_square_parking(); init_square_pause(); init_square_pen(); init_square_percent(); init_square_pi(); init_square_pilcrow(); init_square_play(); init_square_plus(); init_square_power(); init_square_radical(); init_square_round_corner(); init_square_scissors(); init_square_sigma(); init_square_slash(); init_square_split_horizontal(); init_square_split_vertical(); init_square_square(); init_square_stack(); init_square_star(); init_square_stop(); init_square_terminal(); init_square_user_round(); init_square_user(); init_square_x(); init_square(); init_squares_exclude(); init_squares_subtract(); init_squares_intersect(); init_squares_unite(); init_squircle_dashed(); init_squirrel(); init_squircle(); init_stamp(); init_star_half(); init_star_off(); init_star(); init_step_back(); init_step_forward(); init_stethoscope(); init_sticker(); init_sticky_note(); init_stretch_horizontal(); init_store$1(); init_stretch_vertical(); init_strikethrough(); init_subscript(); init_sun_medium(); init_sun_dim(); init_sun_snow(); init_sun_moon(); init_sun(); init_sunrise(); init_sunset(); init_superscript(); init_swatch_book(); init_swiss_franc(); init_switch_camera(); init_sword(); init_swords(); init_syringe(); init_table_2(); init_table_cells_merge(); init_table_cells_split(); init_table_columns_split(); init_table_of_contents(); init_table_properties(); init_table_rows_split(); init_table(); init_tablet_smartphone(); init_tablet(); init_tablets(); init_tag(); init_tags(); init_tally_1(); init_tally_2(); init_tally_3(); init_tally_4(); init_tally_5(); init_tangent(); init_target(); init_telescope(); init_tent_tree(); init_tent(); init_terminal(); init_test_tube_diagonal(); init_test_tube(); init_test_tubes(); init_text_align_center(); init_text_align_end(); init_text_align_justify(); init_text_align_start(); init_text_cursor_input(); init_text_cursor(); init_text_initial(); init_text_quote(); init_text_search(); init_text_select(); init_text_wrap(); init_theater(); init_thermometer_snowflake(); init_thermometer_sun(); init_thermometer(); init_thumbs_down(); init_thumbs_up(); init_ticket_check(); init_ticket_minus(); init_ticket_percent(); init_ticket_plus(); init_ticket_slash(); init_ticket_x(); init_ticket(); init_tickets_plane(); init_tickets(); init_timer_off(); init_timer_reset(); init_timer(); init_toggle_left(); init_toggle_right(); init_toilet(); init_tool_case(); init_tornado(); init_touchpad_off(); init_torus(); init_touchpad(); init_tower_control(); init_toy_brick(); init_tractor(); init_traffic_cone(); init_train_front_tunnel(); init_train_front(); init_train_track(); init_tram_front(); init_transgender(); init_trash_2(); init_trash(); init_tree_deciduous(); init_tree_palm(); init_tree_pine(); init_trees(); init_trello(); init_trending_down(); init_trending_up_down(); init_trending_up(); init_triangle_alert(); init_triangle_dashed(); init_triangle_right(); init_trophy(); init_triangle(); init_truck_electric(); init_truck(); init_turkish_lira(); init_turntable(); init_turtle(); init_tv_minimal_play(); init_tv_minimal(); init_tv(); init_twitch(); init_twitter(); init_type_outline(); init_type$6(); init_umbrella_off(); init_umbrella(); init_underline(); init_undo_2(); init_undo_dot(); init_undo(); init_unfold_horizontal(); init_unfold_vertical(); init_ungroup(); init_university(); init_unlink_2(); init_unlink(); init_upload(); init_unplug(); init_usb(); init_user_cog(); init_user_check(); init_user_lock(); init_user_minus(); init_user_pen(); init_user_plus(); init_user_round_check(); init_user_round_cog(); init_user_round_minus(); init_user_round_pen(); init_user_round_plus(); init_user_round_search(); init_user_round_x(); init_user_round(); init_user_search(); init_user_star(); init_user_x(); init_user(); init_users_round(); init_users(); init_utensils_crossed(); init_utensils(); init_utility_pole(); init_van(); init_vault(); init_variable(); init_vector_square(); init_vegan(); init_venetian_mask(); init_venus_and_mars(); init_venus(); init_vibrate_off(); init_vibrate(); init_video_off(); init_video(); init_videotape(); init_view(); init_volleyball(); init_voicemail(); init_volume_1(); init_volume_2(); init_volume_off(); init_volume_x(); init_volume(); init_vote(); init_wallet_cards(); init_wallet_minimal(); init_wallet(); init_wallpaper(); init_wand_sparkles(); init_wand(); init_warehouse(); init_washing_machine(); init_watch(); init_waves_arrow_down(); init_waves_arrow_up(); init_waves_ladder(); init_waves(); init_waypoints(); init_webcam(); init_webhook_off(); init_webhook(); init_weight_tilde(); init_weight(); init_wheat_off(); init_wheat(); init_whole_word(); init_wifi_cog(); init_wifi_high(); init_wifi_low(); init_wifi_off(); init_wifi_pen(); init_wifi_sync(); init_wifi_zero(); init_wifi(); init_wind_arrow_down(); init_wind(); init_wine_off(); init_wine(); init_workflow(); init_worm(); init_wrench(); init_youtube(); init_x(); init_zap_off(); init_zap(); init_zoom_in(); init_zoom_out(); })); //#endregion //#region node_modules/lucide/dist/esm/lucide.js var createIcons; var init_lucide = __esmMin((() => { init_replaceElement(); init_iconsAndAliases(); init_createElement(); init_a_arrow_down(); init_a_arrow_up(); init_a_large_small(); init_accessibility(); init_activity(); init_air_vent(); init_airplay(); init_alarm_clock_check(); init_alarm_clock_minus(); init_alarm_clock_off(); init_alarm_clock_plus(); init_alarm_clock(); init_alarm_smoke(); init_album(); init_align_center_horizontal(); init_align_center_vertical(); init_align_end_horizontal(); init_align_end_vertical(); init_align_horizontal_distribute_center(); init_align_horizontal_distribute_end(); init_align_horizontal_justify_center(); init_align_horizontal_distribute_start(); init_align_horizontal_justify_end(); init_align_horizontal_space_around(); init_align_horizontal_justify_start(); init_align_horizontal_space_between(); init_align_start_horizontal(); init_align_start_vertical(); init_align_vertical_distribute_center(); init_align_vertical_distribute_end(); init_align_vertical_distribute_start(); init_align_vertical_justify_center(); init_align_vertical_justify_end(); init_align_vertical_justify_start(); init_align_vertical_space_around(); init_align_vertical_space_between(); init_ambulance(); init_ampersand(); init_ampersands(); init_amphora(); init_anchor(); init_angry(); init_annoyed(); init_antenna(); init_anvil(); init_aperture(); init_app_window_mac(); init_app_window(); init_apple(); init_archive_restore(); init_archive_x(); init_archive(); init_arrow_big_down_dash(); init_armchair(); init_arrow_big_down(); init_arrow_big_left_dash(); init_arrow_big_left(); init_arrow_big_right_dash(); init_arrow_big_right(); init_arrow_big_up_dash(); init_arrow_big_up(); init_arrow_down_0_1(); init_arrow_down_1_0(); init_arrow_down_a_z(); init_arrow_down_from_line(); init_arrow_down_left(); init_arrow_down_narrow_wide(); init_arrow_down_right(); init_arrow_down_to_dot(); init_arrow_down_to_line(); init_arrow_down_up(); init_arrow_down_z_a(); init_arrow_down_wide_narrow(); init_arrow_down(); init_arrow_left_from_line(); init_arrow_left_right(); init_arrow_left_to_line(); init_arrow_left(); init_arrow_right_from_line(); init_arrow_right_left(); init_arrow_right_to_line(); init_arrow_right(); init_arrow_up_0_1(); init_arrow_up_1_0(); init_arrow_up_a_z(); init_arrow_up_down(); init_arrow_up_from_dot(); init_arrow_up_from_line(); init_arrow_up_left(); init_arrow_up_narrow_wide(); init_arrow_up_right(); init_arrow_up_to_line(); init_arrow_up_wide_narrow(); init_arrow_up_z_a(); init_arrow_up(); init_arrows_up_from_line(); init_asterisk(); init_at_sign(); init_atom(); init_audio_lines(); init_audio_waveform(); init_award(); init_axe(); init_axis_3d(); init_baby(); init_backpack(); init_badge_cent(); init_badge_alert(); init_badge_check(); init_badge_dollar_sign(); init_badge_euro(); init_badge_info(); init_badge_indian_rupee(); init_badge_japanese_yen(); init_badge_minus(); init_badge_percent(); init_badge_plus(); init_badge_pound_sterling(); init_badge_question_mark(); init_badge_russian_ruble(); init_badge_swiss_franc(); init_badge_turkish_lira(); init_badge_x(); init_badge(); init_baggage_claim(); init_ban(); init_banana(); init_bandage(); init_banknote_arrow_down(); init_banknote_arrow_up(); init_banknote_x(); init_banknote(); init_barcode(); init_barrel(); init_baseline(); init_bath(); init_battery_charging(); init_battery_full(); init_battery_low(); init_battery_medium(); init_battery_plus(); init_battery_warning(); init_battery(); init_beaker(); init_bean_off(); init_bean(); init_bed_double(); init_bed_single(); init_bed(); init_beef(); init_beer_off(); init_beer(); init_bell_dot(); init_bell_electric(); init_bell_minus(); init_bell_off(); init_bell_plus(); init_bell_ring(); init_bell(); init_between_horizontal_end(); init_between_horizontal_start(); init_between_vertical_end(); init_between_vertical_start(); init_biceps_flexed(); init_bike(); init_binoculars(); init_binary(); init_biohazard(); init_bird(); init_bitcoin(); init_blend(); init_birdhouse(); init_blinds(); init_blocks(); init_bluetooth_connected(); init_bluetooth_off(); init_bluetooth_searching(); init_bluetooth(); init_bold(); init_bolt(); init_bomb(); init_bone(); init_book_a(); init_book_alert(); init_book_audio(); init_book_check(); init_book_copy(); init_book_dashed(); init_book_down(); init_book_headphones(); init_book_heart(); init_book_image(); init_book_key(); init_book_lock(); init_book_marked(); init_book_minus(); init_book_open_check(); init_book_open_text(); init_book_open(); init_book_plus(); init_book_search(); init_book_text(); init_book_type(); init_book_up_2(); init_book_up(); init_book_user(); init_book_x(); init_book(); init_bookmark_check(); init_bookmark_minus(); init_bookmark_plus(); init_bookmark_x(); init_bookmark(); init_boom_box(); init_bot_message_square(); init_bot_off(); init_bot(); init_bottle_wine(); init_bow_arrow(); init_box(); init_boxes(); init_braces(); init_brackets(); init_brain_circuit(); init_brain_cog(); init_brain(); init_brick_wall_fire(); init_brick_wall_shield(); init_brick_wall(); init_briefcase_business(); init_briefcase_conveyor_belt(); init_briefcase_medical(); init_briefcase(); init_bring_to_front(); init_brush_cleaning(); init_brush(); init_bubbles(); init_bug_off(); init_bug_play(); init_bug(); init_building_2(); init_building(); init_bus_front(); init_bus(); init_cable_car(); init_cable(); init_cake_slice(); init_cake(); init_calculator(); init_calendar_1(); init_calendar_arrow_down(); init_calendar_arrow_up(); init_calendar_check_2(); init_calendar_check(); init_calendar_clock(); init_calendar_cog(); init_calendar_days(); init_calendar_fold(); init_calendar_heart(); init_calendar_minus(); init_calendar_minus_2(); init_calendar_off(); init_calendar_plus_2(); init_calendar_plus(); init_calendar_range(); init_calendar_search(); init_calendar_sync(); init_calendar_x_2(); init_calendar_x(); init_calendar(); init_calendars(); init_camera_off(); init_camera(); init_candy_cane(); init_candy_off(); init_cannabis(); init_captions_off(); init_candy(); init_captions(); init_car_front(); init_car_taxi_front(); init_car(); init_caravan(); init_card_sim(); init_carrot(); init_case_lower(); init_case_sensitive(); init_case_upper(); init_cassette_tape(); init_cast(); init_castle(); init_cat(); init_cctv(); init_chart_area(); init_chart_bar_big(); init_chart_bar_decreasing(); init_chart_bar_increasing(); init_chart_bar_stacked(); init_chart_bar(); init_chart_candlestick(); init_chart_column_big(); init_chart_column_increasing(); init_chart_column_decreasing(); init_chart_column_stacked(); init_chart_column(); init_chart_gantt(); init_chart_line(); init_chart_network(); init_chart_no_axes_column_decreasing(); init_chart_no_axes_column_increasing(); init_chart_no_axes_column(); init_chart_no_axes_combined(); init_chart_no_axes_gantt(); init_chart_pie(); init_chart_scatter(); init_chart_spline(); init_check_check(); init_check_line(); init_check(); init_chef_hat(); init_cherry(); init_chess_bishop(); init_chess_king(); init_chess_knight(); init_chess_pawn(); init_chess_queen(); init_chess_rook(); init_chevron_down(); init_chevron_first(); init_chevron_last(); init_chevron_left(); init_chevron_right(); init_chevron_up(); init_chevrons_down_up(); init_chevrons_down(); init_chevrons_left_right_ellipsis(); init_chevrons_left_right(); init_chevrons_left(); init_chevrons_right_left(); init_chevrons_right(); init_chevrons_up_down(); init_chevrons_up(); init_chromium(); init_church(); init_cigarette_off(); init_cigarette(); init_circle_alert(); init_circle_arrow_down(); init_circle_arrow_left(); init_circle_arrow_out_down_left(); init_circle_arrow_out_down_right(); init_circle_arrow_out_up_left(); init_circle_arrow_out_up_right(); init_circle_arrow_right(); init_circle_arrow_up(); init_circle_check_big(); init_circle_check(); init_circle_chevron_down(); init_circle_chevron_left(); init_circle_chevron_right(); init_circle_chevron_up(); init_circle_dashed(); init_circle_divide(); init_circle_dollar_sign(); init_circle_dot_dashed(); init_circle_dot(); init_circle_ellipsis(); init_circle_equal(); init_circle_fading_arrow_up(); init_circle_fading_plus(); init_circle_gauge(); init_circle_minus(); init_circle_off(); init_circle_parking_off(); init_circle_parking(); init_circle_pause(); init_circle_percent(); init_circle_play(); init_circle_plus(); init_circle_pound_sterling(); init_circle_power(); init_circle_question_mark(); init_circle_slash_2(); init_circle_slash(); init_circle_small(); init_circle_star(); init_circle_stop(); init_circle_user_round(); init_circle_user(); init_circle_x(); init_circle(); init_circuit_board(); init_citrus(); init_clapperboard(); init_clipboard_check(); init_clipboard_clock(); init_clipboard_copy(); init_clipboard_list(); init_clipboard_paste(); init_clipboard_minus(); init_clipboard_pen_line(); init_clipboard_pen(); init_clipboard_plus(); init_clipboard_type(); init_clipboard(); init_clipboard_x(); init_clock_1(); init_clock_10(); init_clock_12(); init_clock_2(); init_clock_3(); init_clock_11(); init_clock_4(); init_clock_5(); init_clock_6(); init_clock_7(); init_clock_8(); init_clock_9(); init_clock_alert(); init_clock_arrow_down(); init_clock_arrow_up(); init_clock_check(); init_clock_fading(); init_clock_plus(); init_clock(); init_closed_caption(); init_cloud_alert(); init_cloud_check(); init_cloud_download(); init_cloud_cog(); init_cloud_drizzle(); init_cloud_fog(); init_cloud_hail(); init_cloud_lightning(); init_cloud_moon_rain(); init_cloud_moon(); init_cloud_off(); init_cloud_rain_wind(); init_cloud_rain(); init_cloud_snow(); init_cloud_sun_rain(); init_cloud_sun(); init_cloud_upload(); init_cloud(); init_cloudy(); init_clover(); init_club(); init_code_xml(); init_code(); init_codepen(); init_codesandbox(); init_coffee(); init_cog(); init_coins(); init_columns_3_cog(); init_columns_2(); init_columns_3(); init_columns_4(); init_combine(); init_command(); init_compass(); init_component(); init_computer(); init_concierge_bell(); init_cone(); init_construction(); init_contact_round(); init_contact(); init_container(); init_contrast(); init_cookie(); init_cooking_pot(); init_copy_check(); init_copy_minus(); init_copy_plus(); init_copy_slash(); init_copy_x(); init_copy(); init_copyright(); init_copyleft(); init_corner_down_left(); init_corner_down_right(); init_corner_left_down(); init_corner_left_up(); init_corner_right_down(); init_corner_right_up(); init_corner_up_left(); init_cpu(); init_creative_commons(); init_credit_card(); init_corner_up_right(); init_croissant(); init_crop(); init_cross(); init_crosshair(); init_crown(); init_cuboid(); init_cup_soda(); init_currency(); init_cylinder(); init_dam(); init_database_backup(); init_database_zap(); init_database(); init_decimals_arrow_left(); init_decimals_arrow_right(); init_delete(); init_dessert(); init_diameter(); init_diamond_minus(); init_diamond_percent(); init_diamond_plus(); init_diamond(); init_dice_1(); init_dice_2(); init_dice_3(); init_dice_4(); init_dice_5(); init_dice_6(); init_dices(); init_diff(); init_disc_2(); init_disc_3(); init_disc_album(); init_disc(); init_divide(); init_dna_off(); init_dna(); init_dock(); init_dog(); init_dollar_sign(); init_donut(); init_door_closed_locked(); init_door_closed(); init_door_open(); init_dot(); init_download(); init_drafting_compass(); init_drama(); init_dribbble(); init_drill(); init_drone(); init_droplet_off(); init_droplet(); init_droplets(); init_drum(); init_drumstick(); init_dumbbell(); init_ear_off(); init_ear(); init_earth_lock(); init_earth(); init_eclipse(); init_egg_fried(); init_egg_off(); init_egg(); init_ellipsis_vertical(); init_ellipsis(); init_equal_approximately(); init_equal_not(); init_equal(); init_eraser(); init_ethernet_port(); init_euro(); init_ev_charger(); init_expand(); init_external_link(); init_eye_closed(); init_eye_off(); init_eye(); init_facebook(); init_factory(); init_fan(); init_fast_forward(); init_feather(); init_fence(); init_ferris_wheel(); init_figma(); init_file_archive(); init_file_axis_3d(); init_file_badge(); init_file_box(); init_file_braces_corner(); init_file_braces(); init_file_chart_column_increasing(); init_file_chart_column(); init_file_chart_line(); init_file_chart_pie(); init_file_check_corner(); init_file_check(); init_file_clock(); init_file_code(); init_file_code_corner(); init_file_cog(); init_file_diff(); init_file_digit(); init_file_down(); init_file_exclamation_point(); init_file_headphone(); init_file_heart(); init_file_image(); init_file_input(); init_file_key(); init_file_lock(); init_file_minus_corner(); init_file_minus(); init_file_music(); init_file_output(); init_file_pen_line(); init_file_pen(); init_file_play(); init_file_plus_corner(); init_file_plus(); init_file_question_mark(); init_file_scan(); init_file_search_corner(); init_file_search(); init_file_signal(); init_file_sliders(); init_file_spreadsheet(); init_file_stack(); init_file_symlink(); init_file_terminal(); init_file_text(); init_file_type_corner(); init_file_type(); init_file_up(); init_file_user(); init_file_video_camera(); init_file_volume(); init_file_x_corner(); init_file_x(); init_file(); init_files(); init_film(); init_fingerprint_pattern(); init_fire_extinguisher(); init_fish_off(); init_fish_symbol(); init_fish(); init_flag_off(); init_flag_triangle_left(); init_flag_triangle_right(); init_flag(); init_flame_kindling(); init_flame(); init_flashlight_off(); init_flashlight(); init_flask_conical_off(); init_flask_conical(); init_flask_round(); init_flip_horizontal_2(); init_flip_horizontal(); init_flip_vertical_2(); init_flip_vertical(); init_flower_2(); init_flower(); init_focus(); init_fold_horizontal(); init_fold_vertical(); init_folder_archive(); init_folder_check(); init_folder_clock(); init_folder_closed(); init_folder_code(); init_folder_cog(); init_folder_dot(); init_folder_down(); init_folder_git_2(); init_folder_git(); init_folder_heart(); init_folder_input(); init_folder_kanban(); init_folder_key(); init_folder_lock(); init_folder_minus(); init_folder_open_dot(); init_folder_open(); init_folder_output(); init_folder_pen(); init_folder_plus(); init_folder_root(); init_folder_search_2(); init_folder_search(); init_folder_symlink(); init_folder_sync(); init_folder_tree(); init_folder_up(); init_folder_x(); init_folder(); init_folders(); init_footprints(); init_forklift(); init_form(); init_forward(); init_frame(); init_framer(); init_frown(); init_fuel(); init_fullscreen(); init_funnel_plus(); init_funnel_x(); init_funnel(); init_gallery_horizontal_end(); init_gallery_horizontal(); init_gallery_thumbnails(); init_gallery_vertical_end(); init_gallery_vertical(); init_gamepad_2(); init_gamepad_directional(); init_gamepad(); init_gauge(); init_gavel(); init_gem(); init_georgian_lari(); init_ghost(); init_gift(); init_git_branch_minus(); init_git_branch_plus(); init_git_branch(); init_git_commit_horizontal(); init_git_commit_vertical(); init_git_compare_arrows(); init_git_compare(); init_git_fork(); init_git_graph(); init_git_merge(); init_git_pull_request_arrow(); init_git_pull_request_closed(); init_git_pull_request_create_arrow(); init_git_pull_request_create(); init_git_pull_request_draft(); init_gitlab(); init_git_pull_request(); init_glass_water(); init_github(); init_glasses(); init_globe_lock(); init_globe(); init_goal(); init_gpu(); init_graduation_cap(); init_grape(); init_grid_2x2_check(); init_grid_2x2_plus(); init_grid_2x2_x(); init_grid_2x2(); init_grid_3x2(); init_grid_3x3(); init_grip_horizontal(); init_grip_vertical(); init_grip(); init_group(); init_guitar(); init_ham(); init_hamburger(); init_hammer(); init_hand_fist(); init_hand_coins(); init_hand_grab(); init_hand_heart(); init_hand_helping(); init_hand_metal(); init_hand_platter(); init_hand(); init_handbag(); init_handshake(); init_hard_drive_download(); init_hard_drive_upload(); init_hard_drive(); init_hard_hat(); init_hash(); init_hat_glasses(); init_hdmi_port(); init_haze(); init_heading_1(); init_heading_2(); init_heading_3(); init_heading_4(); init_heading_6(); init_heading_5(); init_heading(); init_headphone_off(); init_headphones(); init_headset(); init_heart_crack(); init_heart_handshake(); init_heart_minus(); init_heart_off(); init_heart_plus(); init_heart_pulse(); init_heart(); init_heater(); init_helicopter(); init_hexagon(); init_highlighter(); init_history(); init_hop_off(); init_hop(); init_hospital(); init_hotel(); init_hourglass(); init_house_plug(); init_house_heart(); init_house_plus(); init_house_wifi(); init_house(); init_ice_cream_bowl(); init_ice_cream_cone(); init_id_card_lanyard(); init_id_card(); init_image_down(); init_image_minus(); init_image_off(); init_image_play(); init_image_plus(); init_image_up(); init_image_upscale(); init_image(); init_images(); init_import(); init_inbox(); init_indian_rupee(); init_infinity(); init_info(); init_inspection_panel(); init_instagram(); init_italic(); init_iteration_ccw(); init_iteration_cw(); init_japanese_yen(); init_joystick(); init_kanban(); init_kayak(); init_key_round(); init_key_square(); init_key(); init_keyboard_music(); init_keyboard_off(); init_keyboard(); init_lamp_ceiling(); init_lamp_desk(); init_lamp_floor(); init_lamp_wall_down(); init_lamp_wall_up(); init_land_plot(); init_lamp(); init_landmark(); init_languages(); init_laptop_minimal_check(); init_laptop_minimal(); init_laptop(); init_lasso(); init_lasso_select(); init_laugh(); init_layers_2(); init_layers(); init_layout_dashboard(); init_layout_grid(); init_layout_list(); init_layout_panel_left(); init_layout_panel_top(); init_layout_template(); init_leaf(); init_leafy_green(); init_lectern(); init_library_big(); init_library(); init_life_buoy(); init_ligature(); init_lightbulb_off(); init_lightbulb(); init_line_squiggle(); init_link_2_off(); init_link_2(); init_link(); init_linkedin(); init_list_check(); init_list_checks(); init_list_chevrons_down_up(); init_list_chevrons_up_down(); init_list_collapse(); init_list_end(); init_list_filter_plus(); init_list_filter(); init_list_indent_decrease(); init_list_indent_increase(); init_list_minus(); init_list_music(); init_list_ordered(); init_list_plus(); init_list_restart(); init_list_start(); init_list_todo(); init_list_tree(); init_list_video(); init_list_x(); init_list(); init_loader_circle(); init_loader_pinwheel(); init_loader(); init_locate_off(); init_locate_fixed(); init_locate(); init_lock_keyhole_open(); init_lock_keyhole(); init_lock_open(); init_lock(); init_log_out(); init_log_in(); init_logs(); init_lollipop(); init_luggage(); init_magnet(); init_mail_check(); init_mail_minus(); init_mail_open(); init_mail_plus(); init_mail_question_mark(); init_mail_search(); init_mail_warning(); init_mail_x(); init_mail(); init_mailbox(); init_mails(); init_map_minus(); init_map_pin_check_inside(); init_map_pin_check(); init_map_pin_house(); init_map_pin_minus_inside(); init_map_pin_minus(); init_map_pin_off(); init_map_pin_pen(); init_map_pin_plus_inside(); init_map_pin_x_inside(); init_map_pin_plus(); init_map_pin_x(); init_map_pin(); init_map_pinned(); init_map_plus(); init_map(); init_mars(); init_mars_stroke(); init_martini(); init_maximize_2(); init_maximize(); init_medal(); init_megaphone_off(); init_megaphone(); init_meh(); init_memory_stick(); init_menu(); init_merge(); init_message_circle_code(); init_message_circle_dashed(); init_message_circle_heart(); init_message_circle_more(); init_message_circle_off(); init_message_circle_plus(); init_message_circle_question_mark(); init_message_circle_reply(); init_message_circle_warning(); init_message_circle_x(); init_message_circle(); init_message_square_code(); init_message_square_dashed(); init_message_square_diff(); init_message_square_dot(); init_message_square_heart(); init_message_square_lock(); init_message_square_more(); init_message_square_off(); init_message_square_plus(); init_message_square_quote(); init_message_square_reply(); init_message_square_share(); init_message_square_text(); init_message_square_warning(); init_message_square_x(); init_message_square(); init_messages_square(); init_mic_off(); init_mic_vocal(); init_mic(); init_microchip(); init_microscope(); init_milestone(); init_microwave(); init_milk_off(); init_milk(); init_minimize_2(); init_minimize(); init_minus(); init_monitor_check(); init_monitor_cloud(); init_monitor_cog(); init_monitor_dot(); init_monitor_down(); init_monitor_off(); init_monitor_pause(); init_monitor_play(); init_monitor_smartphone(); init_monitor_speaker(); init_monitor_stop(); init_monitor_up(); init_monitor_x(); init_monitor(); init_moon_star(); init_moon(); init_motorbike(); init_mountain_snow(); init_mountain(); init_mouse_off(); init_mouse_pointer_2_off(); init_mouse_pointer_2(); init_mouse_pointer_ban(); init_mouse_pointer_click(); init_mouse_pointer(); init_mouse(); init_move_diagonal(); init_move_diagonal_2(); init_move_3d(); init_move_down_left(); init_move_down_right(); init_move_down(); init_move_left(); init_move_horizontal(); init_move_right(); init_move_up_left(); init_move_up_right(); init_move_up(); init_move_vertical(); init_move(); init_music_2(); init_music_3(); init_music_4(); init_music(); init_navigation_2(); init_navigation_2_off(); init_navigation_off(); init_navigation(); init_network(); init_newspaper(); init_nfc(); init_non_binary(); init_notebook_pen(); init_notebook_tabs(); init_notebook_text(); init_notebook(); init_notepad_text_dashed(); init_nut_off(); init_notepad_text(); init_nut(); init_octagon_alert(); init_octagon_minus(); init_octagon_pause(); init_octagon_x(); init_octagon(); init_omega(); init_option(); init_orbit(); init_origami(); init_package_2(); init_package_check(); init_package_minus(); init_package_open(); init_package_plus(); init_package_search(); init_package_x(); init_package(); init_paint_bucket(); init_paint_roller(); init_paintbrush_vertical(); init_paintbrush(); init_palette(); init_panda(); init_panel_bottom_close(); init_panel_bottom_dashed(); init_panel_bottom(); init_panel_bottom_open(); init_panel_left_close(); init_panel_left_dashed(); init_panel_left_open(); init_panel_left_right_dashed(); init_panel_left(); init_panel_right_close(); init_panel_right_open(); init_panel_right_dashed(); init_panel_top_bottom_dashed(); init_panel_right(); init_panel_top_close(); init_panel_top_dashed(); init_panel_top_open(); init_panel_top(); init_panels_left_bottom(); init_panels_right_bottom(); init_panels_top_left(); init_paperclip(); init_parentheses(); init_parking_meter(); init_party_popper(); init_pause(); init_paw_print(); init_pc_case(); init_pen_line(); init_pen_off(); init_pen_tool(); init_pen(); init_pencil_line(); init_pencil_off(); init_pencil_ruler(); init_pencil(); init_pentagon(); init_percent(); init_person_standing(); init_philippine_peso(); init_phone_call(); init_phone_forwarded(); init_phone_incoming(); init_phone_missed(); init_phone_off(); init_phone_outgoing(); init_phone(); init_pi(); init_piano(); init_pickaxe(); init_picture_in_picture_2(); init_picture_in_picture(); init_piggy_bank(); init_pilcrow_left(); init_pilcrow(); init_pilcrow_right(); init_pill_bottle(); init_pill(); init_pin_off(); init_pin(); init_pipette(); init_pizza(); init_plane_landing(); init_plane_takeoff(); init_plane(); init_play(); init_plug_2(); init_plug_zap(); init_plug(); init_plus(); init_pocket_knife(); init_pocket(); init_podcast(); init_pointer_off(); init_pointer(); init_popcorn(); init_popsicle(); init_pound_sterling(); init_power_off(); init_power(); init_presentation(); init_printer_check(); init_projector(); init_printer(); init_proportions(); init_puzzle(); init_pyramid(); init_qr_code(); init_quote(); init_rabbit(); init_radar(); init_radiation(); init_radical(); init_radio_receiver(); init_radio(); init_radius(); init_radio_tower(); init_rail_symbol(); init_rainbow(); init_rat(); init_ratio(); init_receipt_cent(); init_receipt_euro(); init_receipt_indian_rupee(); init_receipt_japanese_yen(); init_receipt_pound_sterling(); init_receipt_russian_ruble(); init_receipt_swiss_franc(); init_receipt_text(); init_receipt_turkish_lira(); init_receipt(); init_rectangle_circle(); init_rectangle_ellipsis(); init_rectangle_goggles(); init_rectangle_horizontal(); init_rectangle_vertical(); init_recycle(); init_redo_2(); init_redo_dot(); init_redo(); init_refresh_ccw_dot(); init_refresh_ccw(); init_refresh_cw_off(); init_refresh_cw(); init_refrigerator(); init_regex(); init_remove_formatting(); init_repeat_1(); init_repeat_2(); init_repeat$2(); init_replace_all(); init_replace(); init_reply_all(); init_reply(); init_rewind(); init_ribbon(); init_rocket(); init_rocking_chair(); init_roller_coaster(); init_rose(); init_rotate_3d(); init_rotate_ccw_square(); init_rotate_ccw_key(); init_rotate_ccw(); init_rotate_cw_square(); init_rotate_cw(); init_route_off(); init_route(); init_rows_2(); init_router(); init_rows_3(); init_rows_4(); init_rss(); init_ruler_dimension_line(); init_ruler(); init_russian_ruble(); init_sailboat(); init_salad(); init_sandwich(); init_satellite_dish(); init_satellite(); init_saudi_riyal(); init_save_all(); init_save_off(); init_save(); init_scale_3d(); init_scale(); init_scaling(); init_scan_barcode(); init_scan_eye(); init_scan_heart(); init_scan_face(); init_scan_qr_code(); init_scan_line(); init_scan_search(); init_scan_text(); init_scan(); init_school(); init_scissors_line_dashed(); init_scissors(); init_scooter(); init_screen_share_off(); init_screen_share(); init_scroll_text(); init_scroll(); init_search_check(); init_search_code(); init_search_slash(); init_search_x(); init_search(); init_section(); init_send_horizontal(); init_send_to_back(); init_send(); init_separator_horizontal(); init_separator_vertical(); init_server_cog(); init_server_crash(); init_server_off(); init_server(); init_settings_2(); init_settings(); init_shapes(); init_share_2(); init_share(); init_sheet(); init_shell(); init_shield_ban(); init_shield_alert(); init_shield_check(); init_shield_ellipsis(); init_shield_half(); init_shield_minus(); init_shield_off(); init_shield_plus(); init_shield_question_mark(); init_shield_user(); init_shield_x(); init_shield(); init_ship_wheel(); init_ship(); init_shirt(); init_shopping_bag(); init_shopping_basket(); init_shopping_cart(); init_shovel(); init_shower_head(); init_shredder(); init_shrimp(); init_shrink(); init_shrub(); init_shuffle(); init_sigma(); init_signal_high(); init_signal_low(); init_signal_medium(); init_signal_zero(); init_signal(); init_signature(); init_signpost_big(); init_siren(); init_skip_back(); init_signpost(); init_skip_forward(); init_skull(); init_slack(); init_slash(); init_slice(); init_sliders_horizontal(); init_sliders_vertical(); init_smartphone_charging(); init_smartphone_nfc(); init_smartphone(); init_smile_plus(); init_smile(); init_snail(); init_snowflake(); init_soap_dispenser_droplet(); init_sofa(); init_solar_panel(); init_soup(); init_space(); init_spade(); init_sparkles(); init_speaker(); init_sparkle(); init_speech(); init_spell_check_2(); init_spell_check(); init_spline_pointer(); init_spline(); init_spool(); init_split(); init_spotlight(); init_spray_can(); init_sprout(); init_square_activity(); init_square_arrow_down_left(); init_square_arrow_down_right(); init_square_arrow_down(); init_square_arrow_left(); init_square_arrow_out_down_left(); init_square_arrow_out_down_right(); init_square_arrow_out_up_left(); init_square_arrow_out_up_right(); init_square_arrow_right(); init_square_arrow_up_left(); init_square_arrow_up_right(); init_square_arrow_up(); init_square_asterisk(); init_square_bottom_dashed_scissors(); init_square_check_big(); init_square_chart_gantt(); init_square_check(); init_square_chevron_down(); init_square_chevron_left(); init_square_chevron_right(); init_square_chevron_up(); init_square_code(); init_square_dashed_bottom_code(); init_square_dashed_kanban(); init_square_dashed_mouse_pointer(); init_square_dashed_bottom(); init_square_dashed_top_solid(); init_square_dashed(); init_square_divide(); init_square_dot(); init_square_function(); init_square_equal(); init_square_kanban(); init_square_library(); init_square_m(); init_square_menu(); init_square_minus(); init_square_mouse_pointer(); init_square_parking_off(); init_square_parking(); init_square_pause(); init_square_pen(); init_square_percent(); init_square_pi(); init_square_pilcrow(); init_square_play(); init_square_plus(); init_square_power(); init_square_radical(); init_square_round_corner(); init_square_scissors(); init_square_sigma(); init_square_slash(); init_square_split_horizontal(); init_square_split_vertical(); init_square_square(); init_square_stack(); init_square_star(); init_square_stop(); init_square_terminal(); init_square_user_round(); init_square_user(); init_square_x(); init_square(); init_squares_exclude(); init_squares_subtract(); init_squares_intersect(); init_squares_unite(); init_squircle_dashed(); init_squirrel(); init_squircle(); init_stamp(); init_star_half(); init_star_off(); init_star(); init_step_back(); init_step_forward(); init_stethoscope(); init_sticker(); init_sticky_note(); init_stretch_horizontal(); init_store$1(); init_stretch_vertical(); init_strikethrough(); init_subscript(); init_sun_medium(); init_sun_dim(); init_sun_snow(); init_sun_moon(); init_sun(); init_sunrise(); init_sunset(); init_superscript(); init_swatch_book(); init_swiss_franc(); init_switch_camera(); init_sword(); init_swords(); init_syringe(); init_table_2(); init_table_cells_merge(); init_table_cells_split(); init_table_columns_split(); init_table_of_contents(); init_table_properties(); init_table_rows_split(); init_table(); init_tablet_smartphone(); init_tablet(); init_tablets(); init_tag(); init_tags(); init_tally_1(); init_tally_2(); init_tally_3(); init_tally_4(); init_tally_5(); init_tangent(); init_target(); init_telescope(); init_tent_tree(); init_tent(); init_terminal(); init_test_tube_diagonal(); init_test_tube(); init_test_tubes(); init_text_align_center(); init_text_align_end(); init_text_align_justify(); init_text_align_start(); init_text_cursor_input(); init_text_cursor(); init_text_initial(); init_text_quote(); init_text_search(); init_text_select(); init_text_wrap(); init_theater(); init_thermometer_snowflake(); init_thermometer_sun(); init_thermometer(); init_thumbs_down(); init_thumbs_up(); init_ticket_check(); init_ticket_minus(); init_ticket_percent(); init_ticket_plus(); init_ticket_slash(); init_ticket_x(); init_ticket(); init_tickets_plane(); init_tickets(); init_timer_off(); init_timer_reset(); init_timer(); init_toggle_left(); init_toggle_right(); init_toilet(); init_tool_case(); init_tornado(); init_touchpad_off(); init_torus(); init_touchpad(); init_tower_control(); init_toy_brick(); init_tractor(); init_traffic_cone(); init_train_front_tunnel(); init_train_front(); init_train_track(); init_tram_front(); init_transgender(); init_trash_2(); init_trash(); init_tree_deciduous(); init_tree_palm(); init_tree_pine(); init_trees(); init_trello(); init_trending_down(); init_trending_up_down(); init_trending_up(); init_triangle_alert(); init_triangle_dashed(); init_triangle_right(); init_trophy(); init_triangle(); init_truck_electric(); init_truck(); init_turkish_lira(); init_turntable(); init_turtle(); init_tv_minimal_play(); init_tv_minimal(); init_tv(); init_twitch(); init_twitter(); init_type_outline(); init_type$6(); init_umbrella_off(); init_umbrella(); init_underline(); init_undo_2(); init_undo_dot(); init_undo(); init_unfold_horizontal(); init_unfold_vertical(); init_ungroup(); init_university(); init_unlink_2(); init_unlink(); init_upload(); init_unplug(); init_usb(); init_user_cog(); init_user_check(); init_user_lock(); init_user_minus(); init_user_pen(); init_user_plus(); init_user_round_check(); init_user_round_cog(); init_user_round_minus(); init_user_round_pen(); init_user_round_plus(); init_user_round_search(); init_user_round_x(); init_user_round(); init_user_search(); init_user_star(); init_user_x(); init_user(); init_users_round(); init_users(); init_utensils_crossed(); init_utensils(); init_utility_pole(); init_van(); init_vault(); init_variable(); init_vector_square(); init_vegan(); init_venetian_mask(); init_venus_and_mars(); init_venus(); init_vibrate_off(); init_vibrate(); init_video_off(); init_video(); init_videotape(); init_view(); init_volleyball(); init_voicemail(); init_volume_1(); init_volume_2(); init_volume_off(); init_volume_x(); init_volume(); init_vote(); init_wallet_cards(); init_wallet_minimal(); init_wallet(); init_wallpaper(); init_wand_sparkles(); init_wand(); init_warehouse(); init_washing_machine(); init_watch(); init_waves_arrow_down(); init_waves_arrow_up(); init_waves_ladder(); init_waves(); init_waypoints(); init_webcam(); init_webhook_off(); init_webhook(); init_weight_tilde(); init_weight(); init_wheat_off(); init_wheat(); init_whole_word(); init_wifi_cog(); init_wifi_high(); init_wifi_low(); init_wifi_off(); init_wifi_pen(); init_wifi_sync(); init_wifi_zero(); init_wifi(); init_wind_arrow_down(); init_wind(); init_wine_off(); init_wine(); init_workflow(); init_worm(); init_wrench(); init_youtube(); init_x(); init_zap_off(); init_zap(); init_zoom_in(); init_zoom_out(); createIcons = ({ icons = {}, nameAttr = "data-lucide", attrs = {}, root = document, inTemplates } = {}) => { if (!Object.values(icons).length) { throw new Error("Please provide an icons object.\nIf you want to use all the icons you can import it like:\n `import { createIcons, icons } from 'lucide';\nlucide.createIcons({icons});`"); } if (typeof root === "undefined") { throw new Error("`createIcons()` only works in a browser environment."); } const elementsToReplace = Array.from(root.querySelectorAll(`[${nameAttr}]`)); elementsToReplace.forEach((element) => replaceElement(element, { nameAttr, icons, attrs })); if (inTemplates) { const templates = Array.from(root.querySelectorAll("template")); templates.forEach((template) => createIcons({ icons, nameAttr, attrs, root: template.content, inTemplates })); } if (nameAttr === "data-lucide") { const deprecatedElements = root.querySelectorAll("[icon-name]"); if (deprecatedElements.length > 0) { console.warn("[Lucide] Some icons were found with the now deprecated icon-name attribute. These will still be replaced for backwards compatibility, but will no longer be supported in v1.0 and you should switch to data-lucide"); Array.from(deprecatedElements).forEach((element) => replaceElement(element, { nameAttr: "icon-name", icons, attrs })); } } }; })); //#endregion //#region node_modules/@mariozechner/mini-lit/dist/icons.js function icon(lucideIcon, size = "md", className) { return x`${o(iconDOM(lucideIcon, size, className).outerHTML)}`; } function iconDOM(lucideIcon, size = "md", className) { const element = createElement(lucideIcon, { class: sizeClasses[size] + (className ? " " + className : "") }); return element; } var sizeClasses; var init_icons = __esmMin((() => { init_lit(); init_unsafe_html(); init_lucide(); sizeClasses = { xs: "w-3 h-3", sm: "w-4 h-4", md: "w-5 h-5", lg: "w-6 h-6", xl: "w-8 h-8" }; })); //#endregion //#region node_modules/@mariozechner/mini-lit/dist/index.js var init_dist = __esmMin((() => { init_component$1(); init_i18n$1(); init_icons(); })); //#endregion //#region node_modules/@mariozechner/mini-lit/dist/Button.js var Button; var init_Button = __esmMin((() => { init_mini(); Button = fc(({ variant = "default", size = "md", disabled = false, type = "button", loading = false, onClick, title, className = "", children }) => { const sizeClasses$1 = { sm: "h-8 rounded-md px-3 text-xs", md: "h-9 rounded-md px-4 text-sm", lg: "h-10 rounded-md px-8 text-sm", icon: "size-8 rounded-md" }; const variantClasses = { default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90", destructive: "bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90", outline: "border border-input bg-background text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground", secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80", ghost: "text-foreground hover:bg-accent hover:text-accent-foreground", link: "text-primary underline-offset-4 hover:underline" }; const baseClasses = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-all cursor-pointer disabled:cursor-not-allowed disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"; const gapClass = size === "icon" ? "" : "gap-2"; const paddingAdjustClass = size === "icon" ? "" : "has-[>svg]:px-2.5"; const variantClass = variantClasses[variant] || variantClasses.default; const handleClick = (e$10) => { if (disabled || loading) { e$10.preventDefault(); e$10.stopPropagation(); return; } onClick?.(e$10); }; return x` `; }); })); //#endregion //#region node_modules/@mariozechner/mini-lit/dist/Dialog.js var Dialog, DialogHeader, DialogContent, DialogFooter; var init_Dialog = __esmMin((() => { init_lit(); init_i18n$1(); init_mini(); Dialog = fc(({ isOpen, onClose, children, width = "min(600px, 90vw)", height = "auto", className = "", backdropClassName = "bg-black/50" }) => { if (!isOpen) return x``; const handleBackdropClick = (e$10) => { if (e$10.target === e$10.currentTarget) { onClose?.(); } }; const handleKeyDown = (e$10) => { if (e$10.key === "Escape") { onClose?.(); } }; if (isOpen) { document.addEventListener("keydown", handleKeyDown); setTimeout(() => { if (!isOpen) { document.removeEventListener("keydown", handleKeyDown); } }, 0); } return x`
e$10.stopPropagation()} > ${children}
`; }); DialogHeader = fc(({ title, description, className = "" }) => { return x`

${title}

${description ? x`

${description}

` : ""}
`; }); DialogContent = fc(({ children, className = "" }) => { return x`
${children}
`; }); DialogFooter = fc(({ children, className = "" }) => { return x`
${children}
`; }); })); //#endregion //#region node_modules/@mariozechner/mini-lit/dist/DialogBase.js var DialogBase; var init_DialogBase = __esmMin((() => { init_lit(); init_Dialog(); DialogBase = class extends i { constructor() { super(...arguments); this.modalWidth = "min(600px, 90vw)"; this.modalHeight = "min(600px, 80vh)"; } createRenderRoot() { return this; } open() { this.previousFocus = document.activeElement; document.body.appendChild(this); this.boundHandleKeyDown = (e$10) => { if (e$10.key === "Escape") { this.close(); } }; window.addEventListener("keydown", this.boundHandleKeyDown); } close() { if (this.boundHandleKeyDown) { window.removeEventListener("keydown", this.boundHandleKeyDown); } this.remove(); if (this.previousFocus?.focus) { requestAnimationFrame(() => { this.previousFocus?.focus(); }); } } render() { return Dialog({ isOpen: true, onClose: () => this.close(), width: this.modalWidth, height: this.modalHeight, backdropClassName: "bg-black/50 backdrop-blur-sm", children: this.renderContent() }); } }; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/utils/i18n.js var translations; var init_i18n = __esmMin((() => { init_dist(); init_i18n$1(); translations = { en: { ...defaultEnglish, Free: "Free", "Input Required": "Input Required", Cancel: "Cancel", Confirm: "Confirm", "Select Model": "Select Model", "Search models...": "Search models...", Format: "Format", Thinking: "Thinking", Vision: "Vision", You: "You", Assistant: "Assistant", "Thinking...": "Thinking...", "Type your message...": "Type your message...", "API Keys Configuration": "API Keys Configuration", "Configure API keys for LLM providers. Keys are stored locally in your browser.": "Configure API keys for LLM providers. Keys are stored locally in your browser.", Configured: "Configured", "Not configured": "Not configured", "✓ Valid": "✓ Valid", "✗ Invalid": "✗ Invalid", "Testing...": "Testing...", Update: "Update", Test: "Test", Remove: "Remove", Save: "Save", "Update API key": "Update API key", "Enter API key": "Enter API key", "Type a message...": "Type a message...", "Failed to fetch file": "Failed to fetch file", "Invalid source type": "Invalid source type", PDF: "PDF", Document: "Document", Presentation: "Presentation", Spreadsheet: "Spreadsheet", Text: "Text", "Error loading file": "Error loading file", "No text content available": "No text content available", "Failed to load PDF": "Failed to load PDF", "Failed to load document": "Failed to load document", "Failed to load spreadsheet": "Failed to load spreadsheet", "Error loading PDF": "Error loading PDF", "Error loading document": "Error loading document", "Error loading spreadsheet": "Error loading spreadsheet", "Preview not available for this file type.": "Preview not available for this file type.", "Click the download button above to view it on your computer.": "Click the download button above to view it on your computer.", "No content available": "No content available", "Failed to display text content": "Failed to display text content", "API keys are required to use AI models. Get your keys from the provider's website.": "API keys are required to use AI models. Get your keys from the provider's website.", console: "console", "Copy output": "Copy output", "Copied!": "Copied!", "Error:": "Error:", "Request aborted": "Request aborted", Call: "Call", Result: "Result", "(no result)": "(no result)", "Waiting for tool result…": "Waiting for tool result…", "Call was aborted; no result.": "Call was aborted; no result.", "No session available": "No session available", "No session set": "No session set", "Preparing tool parameters...": "Preparing tool parameters...", "(no output)": "(no output)", Input: "Input", Output: "Output", "Waiting for expression...": "Waiting for expression...", "Writing expression...": "Writing expression...", Calculating: "Calculating", "Getting current time in": "Getting current time in", "Getting current date and time": "Getting current date and time", "Waiting for command...": "Waiting for command...", "Writing command...": "Writing command...", "Running command...": "Running command...", "Command failed": "Command failed", "Enter Auth Token": "Enter Auth Token", "Please enter your auth token.": "Please enter your auth token.", "Auth token is required for proxy transport": "Auth token is required for proxy transport", "Execution aborted": "Execution aborted", "Code parameter is required": "Code parameter is required", "Unknown error": "Unknown error", "Code executed successfully (no output)": "Code executed successfully (no output)", "Execution failed": "Execution failed", "JavaScript REPL": "JavaScript REPL", "JavaScript code to execute": "JavaScript code to execute", "Writing JavaScript code...": "Writing JavaScript code...", "Executing JavaScript": "Executing JavaScript", "Preparing JavaScript...": "Preparing JavaScript...", "Preparing command...": "Preparing command...", "Preparing calculation...": "Preparing calculation...", "Preparing tool...": "Preparing tool...", "Getting time...": "Getting time...", "Processing artifact...": "Processing artifact...", "Preparing artifact...": "Preparing artifact...", "Processing artifact": "Processing artifact", "Processed artifact": "Processed artifact", "Creating artifact": "Creating artifact", "Created artifact": "Created artifact", "Updating artifact": "Updating artifact", "Updated artifact": "Updated artifact", "Rewriting artifact": "Rewriting artifact", "Rewrote artifact": "Rewrote artifact", "Getting artifact": "Getting artifact", "Got artifact": "Got artifact", "Deleting artifact": "Deleting artifact", "Deleted artifact": "Deleted artifact", "Getting logs": "Getting logs", "Got logs": "Got logs", "An error occurred": "An error occurred", "Copy logs": "Copy logs", "Autoscroll enabled": "Autoscroll enabled", "Autoscroll disabled": "Autoscroll disabled", Processing: "Processing", Create: "Create", Rewrite: "Rewrite", Get: "Get", "Get logs": "Get logs", "Show artifacts": "Show artifacts", "Close artifacts": "Close artifacts", Artifacts: "Artifacts", "Copy HTML": "Copy HTML", "Download HTML": "Download HTML", "Reload HTML": "Reload HTML", "Copy SVG": "Copy SVG", "Download SVG": "Download SVG", "Copy Markdown": "Copy Markdown", "Download Markdown": "Download Markdown", Download: "Download", "No logs for {filename}": "No logs for {filename}", "API Keys Settings": "API Keys Settings", Settings: "Settings", "API Keys": "API Keys", Proxy: "Proxy", "Use CORS Proxy": "Use CORS Proxy", "Proxy URL": "Proxy URL", "Format: The proxy must accept requests as /?url=": "Format: The proxy must accept requests as /?url=", "Settings are stored locally in your browser": "Settings are stored locally in your browser", Clear: "Clear", "API Key Required": "API Key Required", "Enter your API key for {provider}": "Enter your API key for {provider}", "Allows browser-based apps to bypass CORS restrictions when calling LLM providers. Required for Z-AI and Anthropic with OAuth token.": "Allows browser-based apps to bypass CORS restrictions when calling LLM providers. Required for Z-AI and Anthropic with OAuth token.", Off: "Off", Minimal: "Minimal", Low: "Low", Medium: "Medium", High: "High", "Storage Permission Required": "Storage Permission Required", "This app needs persistent storage to save your conversations": "This app needs persistent storage to save your conversations", "Why is this needed?": "Why is this needed?", "Without persistent storage, your browser may delete saved conversations when it needs disk space. Granting this permission ensures your chat history is preserved.": "Without persistent storage, your browser may delete saved conversations when it needs disk space. Granting this permission ensures your chat history is preserved.", "What this means:": "What this means:", "Your conversations will be saved locally in your browser": "Your conversations will be saved locally in your browser", "Data will not be deleted automatically to free up space": "Data will not be deleted automatically to free up space", "You can still manually clear data at any time": "You can still manually clear data at any time", "No data is sent to external servers": "No data is sent to external servers", "Continue Anyway": "Continue Anyway", "Requesting...": "Requesting...", "Grant Permission": "Grant Permission", Sessions: "Sessions", "Load a previous conversation": "Load a previous conversation", "No sessions yet": "No sessions yet", "Delete this session?": "Delete this session?", Today: "Today", Yesterday: "Yesterday", "{days} days ago": "{days} days ago", messages: "messages", tokens: "tokens", Delete: "Delete", "Drop files here": "Drop files here", "Command failed:": "Command failed:", "Providers & Models": "Providers & Models", "Cloud Providers": "Cloud Providers", "Cloud LLM providers with predefined models. API keys are stored locally in your browser.": "Cloud LLM providers with predefined models. API keys are stored locally in your browser.", "Custom Providers": "Custom Providers", "User-configured servers with auto-discovered or manually defined models.": "User-configured servers with auto-discovered or manually defined models.", "Add Provider": "Add Provider", "No custom providers configured. Click 'Add Provider' to get started.": "No custom providers configured. Click 'Add Provider' to get started.", "auto-discovered": "auto-discovered", Refresh: "Refresh", Edit: "Edit", "Are you sure you want to delete this provider?": "Are you sure you want to delete this provider?", "Edit Provider": "Edit Provider", "Provider Name": "Provider Name", "e.g., My Ollama Server": "e.g., My Ollama Server", "Provider Type": "Provider Type", "Base URL": "Base URL", "e.g., http://localhost:11434": "e.g., http://localhost:11434", "API Key (Optional)": "API Key (Optional)", "Leave empty if not required": "Leave empty if not required", "Test Connection": "Test Connection", Discovered: "Discovered", Models: "Models", models: "models", and: "and", more: "more", "For manual provider types, add models after saving the provider.": "For manual provider types, add models after saving the provider.", "Please fill in all required fields": "Please fill in all required fields", "Failed to save provider": "Failed to save provider", "OpenAI Completions Compatible": "OpenAI Completions Compatible", "OpenAI Responses Compatible": "OpenAI Responses Compatible", "Anthropic Messages Compatible": "Anthropic Messages Compatible", "Checking...": "Checking...", Disconnected: "Disconnected" }, de: { ...defaultGerman, Free: "Kostenlos", "Input Required": "Eingabe erforderlich", Cancel: "Abbrechen", Confirm: "Bestätigen", "Select Model": "Modell auswählen", "Search models...": "Modelle suchen...", Format: "Formatieren", Thinking: "Thinking", Vision: "Vision", You: "Sie", Assistant: "Assistent", "Thinking...": "Denkt nach...", "Type your message...": "Geben Sie Ihre Nachricht ein...", "API Keys Configuration": "API-Schlüssel-Konfiguration", "Configure API keys for LLM providers. Keys are stored locally in your browser.": "Konfigurieren Sie API-Schlüssel für LLM-Anbieter. Schlüssel werden lokal in Ihrem Browser gespeichert.", Configured: "Konfiguriert", "Not configured": "Nicht konfiguriert", "✓ Valid": "✓ Gültig", "✗ Invalid": "✗ Ungültig", "Testing...": "Teste...", Update: "Aktualisieren", Test: "Testen", Remove: "Entfernen", Save: "Speichern", "Update API key": "API-Schlüssel aktualisieren", "Enter API key": "API-Schlüssel eingeben", "Type a message...": "Nachricht eingeben...", "Failed to fetch file": "Datei konnte nicht abgerufen werden", "Invalid source type": "Ungültiger Quellentyp", PDF: "PDF", Document: "Dokument", Presentation: "Präsentation", Spreadsheet: "Tabelle", Text: "Text", "Error loading file": "Fehler beim Laden der Datei", "No text content available": "Kein Textinhalt verfügbar", "Failed to load PDF": "PDF konnte nicht geladen werden", "Failed to load document": "Dokument konnte nicht geladen werden", "Failed to load spreadsheet": "Tabelle konnte nicht geladen werden", "Error loading PDF": "Fehler beim Laden des PDFs", "Error loading document": "Fehler beim Laden des Dokuments", "Error loading spreadsheet": "Fehler beim Laden der Tabelle", "Preview not available for this file type.": "Vorschau für diesen Dateityp nicht verfügbar.", "Click the download button above to view it on your computer.": "Klicken Sie oben auf die Download-Schaltfläche, um die Datei auf Ihrem Computer anzuzeigen.", "No content available": "Kein Inhalt verfügbar", "Failed to display text content": "Textinhalt konnte nicht angezeigt werden", "API keys are required to use AI models. Get your keys from the provider's website.": "API-Schlüssel sind erforderlich, um KI-Modelle zu verwenden. Holen Sie sich Ihre Schlüssel von der Website des Anbieters.", console: "Konsole", "Copy output": "Ausgabe kopieren", "Copied!": "Kopiert!", "Error:": "Fehler:", "Request aborted": "Anfrage abgebrochen", Call: "Aufruf", Result: "Ergebnis", "(no result)": "(kein Ergebnis)", "Waiting for tool result…": "Warte auf Tool-Ergebnis…", "Call was aborted; no result.": "Aufruf wurde abgebrochen; kein Ergebnis.", "No session available": "Keine Sitzung verfügbar", "No session set": "Keine Sitzung gesetzt", "Preparing tool parameters...": "Bereite Tool-Parameter vor...", "(no output)": "(keine Ausgabe)", Input: "Eingabe", Output: "Ausgabe", "Waiting for expression...": "Warte auf Ausdruck", "Writing expression...": "Schreibe Ausdruck...", Calculating: "Berechne", "Getting current time in": "Hole aktuelle Zeit in", "Getting current date and time": "Hole aktuelles Datum und Uhrzeit", "Waiting for command...": "Warte auf Befehl...", "Writing command...": "Schreibe Befehl...", "Running command...": "Führe Befehl aus...", "Command failed": "Befehl fehlgeschlagen", "Enter Auth Token": "Auth-Token eingeben", "Please enter your auth token.": "Bitte geben Sie Ihr Auth-Token ein.", "Auth token is required for proxy transport": "Auth-Token ist für Proxy-Transport erforderlich", "Execution aborted": "Ausführung abgebrochen", "Code parameter is required": "Code-Parameter ist erforderlich", "Unknown error": "Unbekannter Fehler", "Code executed successfully (no output)": "Code erfolgreich ausgeführt (keine Ausgabe)", "Execution failed": "Ausführung fehlgeschlagen", "JavaScript REPL": "JavaScript REPL", "JavaScript code to execute": "Auszuführender JavaScript-Code", "Writing JavaScript code...": "Schreibe JavaScript-Code...", "Executing JavaScript": "Führe JavaScript aus", "Preparing JavaScript...": "Bereite JavaScript vor...", "Preparing command...": "Bereite Befehl vor...", "Preparing calculation...": "Bereite Berechnung vor...", "Preparing tool...": "Bereite Tool vor...", "Getting time...": "Hole Zeit...", "Processing artifact...": "Verarbeite Artefakt...", "Preparing artifact...": "Bereite Artefakt vor...", "Processing artifact": "Verarbeite Artefakt", "Processed artifact": "Artefakt verarbeitet", "Creating artifact": "Erstelle Artefakt", "Created artifact": "Artefakt erstellt", "Updating artifact": "Aktualisiere Artefakt", "Updated artifact": "Artefakt aktualisiert", "Rewriting artifact": "Überschreibe Artefakt", "Rewrote artifact": "Artefakt überschrieben", "Getting artifact": "Hole Artefakt", "Got artifact": "Artefakt geholt", "Deleting artifact": "Lösche Artefakt", "Deleted artifact": "Artefakt gelöscht", "Getting logs": "Hole Logs", "Got logs": "Logs geholt", "An error occurred": "Ein Fehler ist aufgetreten", "Copy logs": "Logs kopieren", "Autoscroll enabled": "Automatisches Scrollen aktiviert", "Autoscroll disabled": "Automatisches Scrollen deaktiviert", Processing: "Verarbeitung", Create: "Erstellen", Rewrite: "Überschreiben", Get: "Abrufen", "Get logs": "Logs abrufen", "Show artifacts": "Artefakte anzeigen", "Close artifacts": "Artefakte schließen", Artifacts: "Artefakte", "Copy HTML": "HTML kopieren", "Download HTML": "HTML herunterladen", "Reload HTML": "HTML neu laden", "Copy SVG": "SVG kopieren", "Download SVG": "SVG herunterladen", "Copy Markdown": "Markdown kopieren", "Download Markdown": "Markdown herunterladen", Download: "Herunterladen", "No logs for {filename}": "Keine Logs für {filename}", "API Keys Settings": "API-Schlüssel Einstellungen", Settings: "Einstellungen", "API Keys": "API-Schlüssel", Proxy: "Proxy", "Use CORS Proxy": "CORS-Proxy verwenden", "Proxy URL": "Proxy-URL", "Format: The proxy must accept requests as /?url=": "Format: Der Proxy muss Anfragen als /?url= akzeptieren", "Settings are stored locally in your browser": "Einstellungen werden lokal in Ihrem Browser gespeichert", Clear: "Löschen", "API Key Required": "API-Schlüssel erforderlich", "Enter your API key for {provider}": "Geben Sie Ihren API-Schlüssel für {provider} ein", "Allows browser-based apps to bypass CORS restrictions when calling LLM providers. Required for Z-AI and Anthropic with OAuth token.": "Ermöglicht browserbasierten Anwendungen, CORS-Einschränkungen beim Aufruf von LLM-Anbietern zu umgehen. Erforderlich für Z-AI und Anthropic mit OAuth-Token.", Off: "Aus", Minimal: "Minimal", Low: "Niedrig", Medium: "Mittel", High: "Hoch", "Storage Permission Required": "Speicherberechtigung erforderlich", "This app needs persistent storage to save your conversations": "Diese App benötigt dauerhaften Speicher, um Ihre Konversationen zu speichern", "Why is this needed?": "Warum wird das benötigt?", "Without persistent storage, your browser may delete saved conversations when it needs disk space. Granting this permission ensures your chat history is preserved.": "Ohne dauerhaften Speicher kann Ihr Browser gespeicherte Konversationen löschen, wenn Speicherplatz benötigt wird. Diese Berechtigung stellt sicher, dass Ihr Chatverlauf erhalten bleibt.", "What this means:": "Was das bedeutet:", "Your conversations will be saved locally in your browser": "Ihre Konversationen werden lokal in Ihrem Browser gespeichert", "Data will not be deleted automatically to free up space": "Daten werden nicht automatisch gelöscht, um Speicherplatz freizugeben", "You can still manually clear data at any time": "Sie können Daten jederzeit manuell löschen", "No data is sent to external servers": "Keine Daten werden an externe Server gesendet", "Continue Anyway": "Trotzdem fortfahren", "Requesting...": "Anfrage läuft...", "Grant Permission": "Berechtigung erteilen", Sessions: "Sitzungen", "Load a previous conversation": "Frühere Konversation laden", "No sessions yet": "Noch keine Sitzungen", "Delete this session?": "Diese Sitzung löschen?", Today: "Heute", Yesterday: "Gestern", "{days} days ago": "vor {days} Tagen", messages: "Nachrichten", tokens: "Tokens", Delete: "Löschen", "Drop files here": "Dateien hier ablegen", "Command failed:": "Befehl fehlgeschlagen:", "Providers & Models": "Anbieter & Modelle", "Cloud Providers": "Cloud-Anbieter", "Cloud LLM providers with predefined models. API keys are stored locally in your browser.": "Cloud-LLM-Anbieter mit vordefinierten Modellen. API-Schlüssel werden lokal in Ihrem Browser gespeichert.", "Custom Providers": "Benutzerdefinierte Anbieter", "User-configured servers with auto-discovered or manually defined models.": "Benutzerkonfigurierte Server mit automatisch erkannten oder manuell definierten Modellen.", "Add Provider": "Anbieter hinzufügen", "No custom providers configured. Click 'Add Provider' to get started.": "Keine benutzerdefinierten Anbieter konfiguriert. Klicken Sie auf 'Anbieter hinzufügen', um zu beginnen.", "auto-discovered": "automatisch erkannt", Refresh: "Aktualisieren", Edit: "Bearbeiten", "Are you sure you want to delete this provider?": "Sind Sie sicher, dass Sie diesen Anbieter löschen möchten?", "Edit Provider": "Anbieter bearbeiten", "Provider Name": "Anbietername", "e.g., My Ollama Server": "z.B. Mein Ollama Server", "Provider Type": "Anbietertyp", "Base URL": "Basis-URL", "e.g., http://localhost:11434": "z.B. http://localhost:11434", "API Key (Optional)": "API-Schlüssel (Optional)", "Leave empty if not required": "Leer lassen, falls nicht erforderlich", "Test Connection": "Verbindung testen", Discovered: "Erkannt", Models: "Modelle", models: "Modelle", and: "und", more: "mehr", "For manual provider types, add models after saving the provider.": "Für manuelle Anbietertypen fügen Sie Modelle nach dem Speichern des Anbieters hinzu.", "Please fill in all required fields": "Bitte füllen Sie alle erforderlichen Felder aus", "Failed to save provider": "Fehler beim Speichern des Anbieters", "OpenAI Completions Compatible": "OpenAI Completions Kompatibel", "OpenAI Responses Compatible": "OpenAI Responses Kompatibel", "Anthropic Messages Compatible": "Anthropic Messages Kompatibel", "Checking...": "Überprüfe...", Disconnected: "Getrennt" } }; setTranslations(translations); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/components/Input.js var Input; var init_Input = __esmMin((() => { init_mini(); init_lit(); init_ref$2(); init_i18n(); Input = fc(({ type = "text", size = "md", value = "", placeholder = "", label = "", error: error$2 = "", disabled = false, required = false, name = "", autocomplete = "", min, max, step, inputRef, onInput, onChange, onKeyDown, onKeyUp, className = "" }) => { const sizeClasses$1 = { sm: "h-8 px-3 py-1 text-sm", md: "h-9 px-3 py-1 text-sm md:text-sm", lg: "h-10 px-4 py-1 text-base" }; const baseClasses = "flex w-full min-w-0 rounded-md border bg-transparent text-foreground shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium"; const interactionClasses = "placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground"; const focusClasses = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]"; const darkClasses = "dark:bg-input/30"; const stateClasses = error$2 ? "border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40" : "border-input"; const disabledClasses = "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"; const handleInput = (e$10) => { onInput?.(e$10); }; const handleChange = (e$10) => { onChange?.(e$10); }; return x`
${label ? x` ` : ""} ${error$2 ? x`${error$2}` : ""}
`; }); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/storage/app-storage.js var app_storage_exports = /* @__PURE__ */ __export({ AppStorage: () => AppStorage, getAppStorage: () => getAppStorage, setAppStorage: () => setAppStorage }); /** * Get the global AppStorage instance. * Throws if not initialized. */ function getAppStorage() { if (!globalAppStorage) { throw new Error("AppStorage not initialized. Call setAppStorage() first."); } return globalAppStorage; } /** * Set the global AppStorage instance. */ function setAppStorage(storage) { globalAppStorage = storage; } var AppStorage, globalAppStorage; var init_app_storage = __esmMin((() => { AppStorage = class { constructor(settings, providerKeys, sessions, customProviders, backend) { this.settings = settings; this.providerKeys = providerKeys; this.sessions = sessions; this.customProviders = customProviders; this.backend = backend; } async getQuotaInfo() { return this.backend.getQuotaInfo(); } async requestPersistence() { return this.backend.requestPersistence(); } }; globalAppStorage = null; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/utils/format.js function formatCost(cost) { return `$${cost.toFixed(4)}`; } function formatModelCost(cost) { if (!cost) return i18n("Free"); const input = cost.input || 0; const output = cost.output || 0; if (input === 0 && output === 0) return i18n("Free"); const formatNum = (num) => { if (num >= 100) return num.toFixed(0); if (num >= 10) return num.toFixed(1).replace(/\.0$/, ""); if (num >= 1) return num.toFixed(2).replace(/\.?0+$/, ""); return num.toFixed(3).replace(/\.?0+$/, ""); }; return `$${formatNum(input)}/$${formatNum(output)}`; } function formatUsage(usage) { if (!usage) return ""; const parts = []; if (usage.input) parts.push(`↑${formatTokenCount(usage.input)}`); if (usage.output) parts.push(`↓${formatTokenCount(usage.output)}`); if (usage.cacheRead) parts.push(`R${formatTokenCount(usage.cacheRead)}`); if (usage.cacheWrite) parts.push(`W${formatTokenCount(usage.cacheWrite)}`); if (usage.cost?.total) parts.push(formatCost(usage.cost.total)); return parts.join(" "); } function formatTokenCount(count) { if (count < 1e3) return count.toString(); if (count < 1e4) return (count / 1e3).toFixed(1) + "k"; return Math.round(count / 1e3) + "k"; } var init_format$1 = __esmMin((() => { init_dist(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/lmstudio-sdk-stub.js function connect() { throw new Error("LM Studio is not available in the embedded web chat bundle."); } var LMStudioClient, lmstudio_sdk_stub_default; var init_lmstudio_sdk_stub = __esmMin((() => { LMStudioClient = class { constructor() { this.system = { async listDownloadedModels() { return []; } }; } }; lmstudio_sdk_stub_default = { LMStudioClient, connect }; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/whatwg-fetch-stub.js var init_whatwg_fetch_stub = __esmMin((() => {})); //#endregion //#region node_modules/ollama/dist/browser.mjs function getPlatform() { if (typeof window !== "undefined" && window.navigator) { const nav = navigator; if ("userAgentData" in nav && nav.userAgentData?.platform) { return `${nav.userAgentData.platform.toLowerCase()} Browser/${navigator.userAgent};`; } if (navigator.platform) { return `${navigator.platform.toLowerCase()} Browser/${navigator.userAgent};`; } return `unknown Browser/${navigator.userAgent};`; } else if (typeof process !== "undefined") { return `${process.arch} ${process.platform} Node.js/${process.version}`; } return ""; } function normalizeHeaders(headers) { if (headers instanceof Headers) { const obj = {}; headers.forEach((value, key) => { obj[key] = value; }); return obj; } else if (Array.isArray(headers)) { return Object.fromEntries(headers); } else { return headers || {}; } } var defaultPort, defaultHost, version$5, __defProp$1, __defNormalProp$1, __publicField$1, ResponseError, AbortableAsyncIterator, checkOk, readEnvVar, fetchWithHeaders, get, post, del, parseJSON, formatHost, __defProp, __defNormalProp, __publicField, Ollama$1, browser; var init_browser = __esmMin((() => { init_whatwg_fetch_stub(); defaultPort = "11434"; defaultHost = `http://127.0.0.1:${defaultPort}`; version$5 = "0.6.3"; __defProp$1 = Object.defineProperty; __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; __publicField$1 = (obj, key, value) => { __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value); return value; }; ResponseError = class ResponseError extends Error { constructor(error$2, status_code) { super(error$2); this.error = error$2; this.status_code = status_code; this.name = "ResponseError"; if (Error.captureStackTrace) { Error.captureStackTrace(this, ResponseError); } } }; AbortableAsyncIterator = class { constructor(abortController, itr, doneCallback) { __publicField$1(this, "abortController"); __publicField$1(this, "itr"); __publicField$1(this, "doneCallback"); this.abortController = abortController; this.itr = itr; this.doneCallback = doneCallback; } abort() { this.abortController.abort(); } async *[Symbol.asyncIterator]() { for await (const message of this.itr) { if ("error" in message) { throw new Error(message.error); } yield message; if (message.done || message.status === "success") { this.doneCallback(); return; } } throw new Error("Did not receive done or success response in stream."); } }; checkOk = async (response) => { if (response.ok) { return; } let message = `Error ${response.status}: ${response.statusText}`; let errorData = null; if (response.headers.get("content-type")?.includes("application/json")) { try { errorData = await response.json(); message = errorData.error || message; } catch (error$2) { console.log("Failed to parse error response as JSON"); } } else { try { console.log("Getting text from response"); const textResponse = await response.text(); message = textResponse || message; } catch (error$2) { console.log("Failed to get text from error response"); } } throw new ResponseError(message, response.status); }; readEnvVar = (obj, key) => { return obj[key]; }; fetchWithHeaders = async (fetch$1, url, options = {}) => { const defaultHeaders = { "Content-Type": "application/json", Accept: "application/json", "User-Agent": `ollama-js/${version$5} (${getPlatform()})` }; options.headers = normalizeHeaders(options.headers); try { const parsed = new URL(url); if (parsed.protocol === "https:" && parsed.hostname === "ollama.com") { const apiKey = typeof process === "object" && process !== null && typeof process.env === "object" && process.env !== null ? readEnvVar(process.env, "OLLAMA_API_KEY") : void 0; const authorization = options.headers["authorization"] || options.headers["Authorization"]; if (!authorization && apiKey) { options.headers["Authorization"] = `Bearer ${apiKey}`; } } } catch (error$2) { console.error("error parsing url", error$2); } const customHeaders = Object.fromEntries(Object.entries(options.headers).filter(([key]) => !Object.keys(defaultHeaders).some((defaultKey) => defaultKey.toLowerCase() === key.toLowerCase()))); options.headers = { ...defaultHeaders, ...customHeaders }; return fetch$1(url, options); }; get = async (fetch$1, host, options) => { const response = await fetchWithHeaders(fetch$1, host, { headers: options?.headers }); await checkOk(response); return response; }; post = async (fetch$1, host, data, options) => { const isRecord = (input) => { return input !== null && typeof input === "object" && !Array.isArray(input); }; const formattedData = isRecord(data) ? JSON.stringify(data) : data; const response = await fetchWithHeaders(fetch$1, host, { method: "POST", body: formattedData, signal: options?.signal, headers: options?.headers }); await checkOk(response); return response; }; del = async (fetch$1, host, data, options) => { const response = await fetchWithHeaders(fetch$1, host, { method: "DELETE", body: JSON.stringify(data), headers: options?.headers }); await checkOk(response); return response; }; parseJSON = async function* (itr) { const decoder = new TextDecoder("utf-8"); let buffer = ""; const reader = itr.getReader(); while (true) { const { done, value: chunk } = await reader.read(); if (done) { break; } buffer += decoder.decode(chunk, { stream: true }); const parts = buffer.split("\n"); buffer = parts.pop() ?? ""; for (const part of parts) { try { yield JSON.parse(part); } catch (error$2) { console.warn("invalid json: ", part); } } } buffer += decoder.decode(); for (const part of buffer.split("\n").filter((p$3) => p$3 !== "")) { try { yield JSON.parse(part); } catch (error$2) { console.warn("invalid json: ", part); } } }; formatHost = (host) => { if (!host) { return defaultHost; } let isExplicitProtocol = host.includes("://"); if (host.startsWith(":")) { host = `http://127.0.0.1${host}`; isExplicitProtocol = true; } if (!isExplicitProtocol) { host = `http://${host}`; } const url = new URL(host); let port = url.port; if (!port) { if (!isExplicitProtocol) { port = defaultPort; } else { port = url.protocol === "https:" ? "443" : "80"; } } let auth = ""; if (url.username) { auth = url.username; if (url.password) { auth += `:${url.password}`; } auth += "@"; } let formattedHost = `${url.protocol}//${auth}${url.hostname}:${port}${url.pathname}`; if (formattedHost.endsWith("/")) { formattedHost = formattedHost.slice(0, -1); } return formattedHost; }; __defProp = Object.defineProperty; __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; __publicField = (obj, key, value) => { __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); return value; }; Ollama$1 = class Ollama { constructor(config) { __publicField(this, "config"); __publicField(this, "fetch"); __publicField(this, "ongoingStreamedRequests", []); this.config = { host: "", headers: config?.headers }; if (!config?.proxy) { this.config.host = formatHost(config?.host ?? defaultHost); } this.fetch = config?.fetch ?? fetch; } abort() { for (const request of this.ongoingStreamedRequests) { request.abort(); } this.ongoingStreamedRequests.length = 0; } /** * Processes a request to the Ollama server. If the request is streamable, it will return a * AbortableAsyncIterator that yields the response messages. Otherwise, it will return the response * object. * @param endpoint {string} - The endpoint to send the request to. * @param request {object} - The request object to send to the endpoint. * @protected {T | AbortableAsyncIterator} - The response object or a AbortableAsyncIterator that yields * response messages. * @throws {Error} - If the response body is missing or if the response is an error. * @returns {Promise>} - The response object or a AbortableAsyncIterator that yields the streamed response. */ async processStreamableRequest(endpoint, request) { request.stream = request.stream ?? false; const host = `${this.config.host}/api/${endpoint}`; if (request.stream) { const abortController = new AbortController(); const response2 = await post(this.fetch, host, request, { signal: abortController.signal, headers: this.config.headers }); if (!response2.body) { throw new Error("Missing body"); } const itr = parseJSON(response2.body); const abortableAsyncIterator = new AbortableAsyncIterator(abortController, itr, () => { const i$7 = this.ongoingStreamedRequests.indexOf(abortableAsyncIterator); if (i$7 > -1) { this.ongoingStreamedRequests.splice(i$7, 1); } }); this.ongoingStreamedRequests.push(abortableAsyncIterator); return abortableAsyncIterator; } const response = await post(this.fetch, host, request, { headers: this.config.headers }); return await response.json(); } /** * Encodes an image to base64 if it is a Uint8Array. * @param image {Uint8Array | string} - The image to encode. * @returns {Promise} - The base64 encoded image. */ async encodeImage(image) { if (typeof image !== "string") { const uint8Array = new Uint8Array(image); let byteString = ""; const len = uint8Array.byteLength; for (let i$7 = 0; i$7 < len; i$7++) { byteString += String.fromCharCode(uint8Array[i$7]); } return btoa(byteString); } return image; } /** * Generates a response from a text prompt. * @param request {GenerateRequest} - The request object. * @returns {Promise>} - The response object or * an AbortableAsyncIterator that yields response messages. */ async generate(request) { if (request.images) { request.images = await Promise.all(request.images.map(this.encodeImage.bind(this))); } return this.processStreamableRequest("generate", request); } /** * Chats with the model. The request object can contain messages with images that are either * Uint8Arrays or base64 encoded strings. The images will be base64 encoded before sending the * request. * @param request {ChatRequest} - The request object. * @returns {Promise>} - The response object or an * AbortableAsyncIterator that yields response messages. */ async chat(request) { if (request.messages) { for (const message of request.messages) { if (message.images) { message.images = await Promise.all(message.images.map(this.encodeImage.bind(this))); } } } return this.processStreamableRequest("chat", request); } /** * Creates a new model from a stream of data. * @param request {CreateRequest} - The request object. * @returns {Promise>} - The response object or a stream of progress responses. */ async create(request) { return this.processStreamableRequest("create", { ...request }); } /** * Pulls a model from the Ollama registry. The request object can contain a stream flag to indicate if the * response should be streamed. * @param request {PullRequest} - The request object. * @returns {Promise>} - The response object or * an AbortableAsyncIterator that yields response messages. */ async pull(request) { return this.processStreamableRequest("pull", { name: request.model, stream: request.stream, insecure: request.insecure }); } /** * Pushes a model to the Ollama registry. The request object can contain a stream flag to indicate if the * response should be streamed. * @param request {PushRequest} - The request object. * @returns {Promise>} - The response object or * an AbortableAsyncIterator that yields response messages. */ async push(request) { return this.processStreamableRequest("push", { name: request.model, stream: request.stream, insecure: request.insecure }); } /** * Deletes a model from the server. The request object should contain the name of the model to * delete. * @param request {DeleteRequest} - The request object. * @returns {Promise} - The response object. */ async delete(request) { await del(this.fetch, `${this.config.host}/api/delete`, { name: request.model }, { headers: this.config.headers }); return { status: "success" }; } /** * Copies a model from one name to another. The request object should contain the name of the * model to copy and the new name. * @param request {CopyRequest} - The request object. * @returns {Promise} - The response object. */ async copy(request) { await post(this.fetch, `${this.config.host}/api/copy`, { ...request }, { headers: this.config.headers }); return { status: "success" }; } /** * Lists the models on the server. * @returns {Promise} - The response object. * @throws {Error} - If the response body is missing. */ async list() { const response = await get(this.fetch, `${this.config.host}/api/tags`, { headers: this.config.headers }); return await response.json(); } /** * Shows the metadata of a model. The request object should contain the name of the model. * @param request {ShowRequest} - The request object. * @returns {Promise} - The response object. */ async show(request) { const response = await post(this.fetch, `${this.config.host}/api/show`, { ...request }, { headers: this.config.headers }); return await response.json(); } /** * Embeds text input into vectors. * @param request {EmbedRequest} - The request object. * @returns {Promise} - The response object. */ async embed(request) { const response = await post(this.fetch, `${this.config.host}/api/embed`, { ...request }, { headers: this.config.headers }); return await response.json(); } /** * Embeds a text prompt into a vector. * @param request {EmbeddingsRequest} - The request object. * @returns {Promise} - The response object. */ async embeddings(request) { const response = await post(this.fetch, `${this.config.host}/api/embeddings`, { ...request }, { headers: this.config.headers }); return await response.json(); } /** * Lists the running models on the server * @returns {Promise} - The response object. * @throws {Error} - If the response body is missing. */ async ps() { const response = await get(this.fetch, `${this.config.host}/api/ps`, { headers: this.config.headers }); return await response.json(); } /** * Returns the Ollama server version. * @returns {Promise} - The server version object. */ async version() { const response = await get(this.fetch, `${this.config.host}/api/version`, { headers: this.config.headers }); return await response.json(); } /** * Performs web search using the Ollama web search API * @param request {WebSearchRequest} - The search request containing query and options * @returns {Promise} - The search results * @throws {Error} - If the request is invalid or the server returns an error */ async webSearch(request) { if (!request.query || request.query.length === 0) { throw new Error("Query is required"); } const response = await post(this.fetch, `https://ollama.com/api/web_search`, { ...request }, { headers: this.config.headers }); return await response.json(); } /** * Fetches a single page using the Ollama web fetch API * @param request {WebFetchRequest} - The fetch request containing a URL * @returns {Promise} - The fetch result * @throws {Error} - If the request is invalid or the server returns an error */ async webFetch(request) { if (!request.url || request.url.length === 0) { throw new Error("URL is required"); } const response = await post(this.fetch, `https://ollama.com/api/web_fetch`, { ...request }, { headers: this.config.headers }); return await response.json(); } }; browser = new Ollama$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/utils/model-discovery.js /** * Discover models from an Ollama server. * @param baseUrl - Base URL of the Ollama server (e.g., "http://localhost:11434") * @param apiKey - Optional API key (currently unused by Ollama) * @returns Array of discovered models */ async function discoverOllamaModels(baseUrl, _apiKey) { try { const ollama = new Ollama$1({ host: baseUrl }); const { models } = await ollama.list(); const ollamaModelPromises = models.map(async (model) => { try { const details = await ollama.show({ model: model.name }); const capabilities = details.capabilities || []; if (!capabilities.includes("tools")) { console.debug(`Skipping model ${model.name}: does not support tools`); return null; } const modelInfo = details.model_info || {}; const architecture = modelInfo["general.architecture"] || ""; const contextKey = `${architecture}.context_length`; const contextWindow = parseInt(modelInfo[contextKey] || "8192", 10); const maxTokens = contextWindow * 10; const ollamaModel = { id: model.name, name: model.name, api: "openai-completions", provider: "", baseUrl: `${baseUrl}/v1`, reasoning: capabilities.includes("thinking"), input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow, maxTokens }; return ollamaModel; } catch (err) { console.error(`Failed to fetch details for model ${model.name}:`, err); return null; } }); const results = await Promise.all(ollamaModelPromises); return results.filter((m$3) => m$3 !== null); } catch (err) { console.error("Failed to discover Ollama models:", err); throw new Error(`Ollama discovery failed: ${err instanceof Error ? err.message : String(err)}`); } } /** * Discover models from a llama.cpp server via OpenAI-compatible /v1/models endpoint. * @param baseUrl - Base URL of the llama.cpp server (e.g., "http://localhost:8080") * @param apiKey - Optional API key * @returns Array of discovered models */ async function discoverLlamaCppModels(baseUrl, apiKey) { try { const headers = { "Content-Type": "application/json" }; if (apiKey) { headers.Authorization = `Bearer ${apiKey}`; } const response = await fetch(`${baseUrl}/v1/models`, { method: "GET", headers }); if (!response.ok) { throw new Error(`HTTP ${response.status}: ${response.statusText}`); } const data = await response.json(); if (!data.data || !Array.isArray(data.data)) { throw new Error("Invalid response format from llama.cpp server"); } return data.data.map((model) => { const contextWindow = model.context_length || 8192; const maxTokens = model.max_tokens || 4096; const llamaModel = { id: model.id, name: model.id, api: "openai-completions", provider: "", baseUrl: `${baseUrl}/v1`, reasoning: false, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow, maxTokens }; return llamaModel; }); } catch (err) { console.error("Failed to discover llama.cpp models:", err); throw new Error(`llama.cpp discovery failed: ${err instanceof Error ? err.message : String(err)}`); } } /** * Discover models from a vLLM server via OpenAI-compatible /v1/models endpoint. * @param baseUrl - Base URL of the vLLM server (e.g., "http://localhost:8000") * @param apiKey - Optional API key * @returns Array of discovered models */ async function discoverVLLMModels(baseUrl, apiKey) { try { const headers = { "Content-Type": "application/json" }; if (apiKey) { headers.Authorization = `Bearer ${apiKey}`; } const response = await fetch(`${baseUrl}/v1/models`, { method: "GET", headers }); if (!response.ok) { throw new Error(`HTTP ${response.status}: ${response.statusText}`); } const data = await response.json(); if (!data.data || !Array.isArray(data.data)) { throw new Error("Invalid response format from vLLM server"); } return data.data.map((model) => { const contextWindow = model.max_model_len || 8192; const maxTokens = Math.min(contextWindow, 4096); const vllmModel = { id: model.id, name: model.id, api: "openai-completions", provider: "", baseUrl: `${baseUrl}/v1`, reasoning: false, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow, maxTokens }; return vllmModel; }); } catch (err) { console.error("Failed to discover vLLM models:", err); throw new Error(`vLLM discovery failed: ${err instanceof Error ? err.message : String(err)}`); } } /** * Discover models from an LM Studio server using the LM Studio SDK. * @param baseUrl - Base URL of the LM Studio server (e.g., "http://localhost:1234") * @param apiKey - Optional API key (unused for LM Studio SDK) * @returns Array of discovered models */ async function discoverLMStudioModels(baseUrl, _apiKey) { try { const url = new URL(baseUrl); const port = url.port ? parseInt(url.port, 10) : 1234; const client = new LMStudioClient({ baseUrl: `ws://${url.hostname}:${port}` }); const models = await client.system.listDownloadedModels(); return models.filter((model) => model.type === "llm").map((model) => { const contextWindow = model.maxContextLength; const maxTokens = contextWindow; const lmStudioModel = { id: model.path, name: model.displayName || model.path, api: "openai-completions", provider: "", baseUrl: `${baseUrl}/v1`, reasoning: model.trainedForToolUse || false, input: model.vision ? ["text", "image"] : ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow, maxTokens }; return lmStudioModel; }); } catch (err) { console.error("Failed to discover LM Studio models:", err); throw new Error(`LM Studio discovery failed: ${err instanceof Error ? err.message : String(err)}`); } } /** * Convenience function to discover models based on provider type. * @param type - Provider type * @param baseUrl - Base URL of the server * @param apiKey - Optional API key * @returns Array of discovered models */ async function discoverModels(type, baseUrl, apiKey) { switch (type) { case "ollama": return discoverOllamaModels(baseUrl, apiKey); case "llama.cpp": return discoverLlamaCppModels(baseUrl, apiKey); case "vllm": return discoverVLLMModels(baseUrl, apiKey); case "lmstudio": return discoverLMStudioModels(baseUrl, apiKey); } } var init_model_discovery = __esmMin((() => { init_lmstudio_sdk_stub(); init_browser(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/dialogs/ModelSelector.js var __decorate$27, ModelSelector_1, ModelSelector; var init_ModelSelector = __esmMin((() => { init_dist(); init_Badge(); init_Button(); init_Dialog(); init_DialogBase(); init_pi_ai_stub(); init_lit(); init_decorators(); init_ref$2(); init_lucide(); init_Input(); init_app_storage(); init_format$1(); init_i18n(); init_model_discovery(); __decorate$27 = void 0 && (void 0).__decorate || function(decorators, target, key, desc) { var c$7 = arguments.length, r$10 = c$7 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d$5; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r$10 = Reflect.decorate(decorators, target, key, desc); else for (var i$7 = decorators.length - 1; i$7 >= 0; i$7--) if (d$5 = decorators[i$7]) r$10 = (c$7 < 3 ? d$5(r$10) : c$7 > 3 ? d$5(target, key, r$10) : d$5(target, key)) || r$10; return c$7 > 3 && r$10 && Object.defineProperty(target, key, r$10), r$10; }; ; ModelSelector = ModelSelector_1 = class ModelSelector$1 extends DialogBase { constructor() { super(...arguments); this.currentModel = null; this.searchQuery = ""; this.filterThinking = false; this.filterVision = false; this.customProvidersLoading = false; this.selectedIndex = 0; this.navigationMode = "mouse"; this.customProviderModels = []; this.scrollContainerRef = e(); this.searchInputRef = e(); this.lastMousePosition = { x: 0, y: 0 }; this.modalWidth = "min(400px, 90vw)"; } static async open(currentModel, onSelect) { const selector = new ModelSelector_1(); selector.currentModel = currentModel; selector.onSelectCallback = onSelect; selector.open(); selector.loadCustomProviders(); } async firstUpdated(changedProperties) { super.firstUpdated(changedProperties); await this.updateComplete; this.searchInputRef.value?.focus(); this.addEventListener("mousemove", (e$10) => { if (e$10.clientX !== this.lastMousePosition.x || e$10.clientY !== this.lastMousePosition.y) { this.lastMousePosition = { x: e$10.clientX, y: e$10.clientY }; if (this.navigationMode === "keyboard") { this.navigationMode = "mouse"; const target = e$10.target; const modelItem = target.closest("[data-model-item]"); if (modelItem) { const allItems = this.scrollContainerRef.value?.querySelectorAll("[data-model-item]"); if (allItems) { const index = Array.from(allItems).indexOf(modelItem); if (index !== -1) { this.selectedIndex = index; } } } } } }); this.addEventListener("keydown", (e$10) => { const filteredModels = this.getFilteredModels(); if (e$10.key === "ArrowDown") { e$10.preventDefault(); this.navigationMode = "keyboard"; this.selectedIndex = Math.min(this.selectedIndex + 1, filteredModels.length - 1); this.scrollToSelected(); } else if (e$10.key === "ArrowUp") { e$10.preventDefault(); this.navigationMode = "keyboard"; this.selectedIndex = Math.max(this.selectedIndex - 1, 0); this.scrollToSelected(); } else if (e$10.key === "Enter") { e$10.preventDefault(); if (filteredModels[this.selectedIndex]) { this.handleSelect(filteredModels[this.selectedIndex].model); } } }); } async loadCustomProviders() { this.customProvidersLoading = true; const allCustomModels = []; try { const storage = getAppStorage(); const customProviders = await storage.customProviders.getAll(); for (const provider of customProviders) { const isAutoDiscovery = provider.type === "ollama" || provider.type === "llama.cpp" || provider.type === "vllm" || provider.type === "lmstudio"; if (isAutoDiscovery) { try { const models = await discoverModels(provider.type, provider.baseUrl, provider.apiKey); const modelsWithProvider = models.map((model) => ({ ...model, provider: provider.name })); allCustomModels.push(...modelsWithProvider); } catch (error$2) { console.debug(`Failed to load models from ${provider.name}:`, error$2); } } else if (provider.models) { allCustomModels.push(...provider.models); } } } catch (error$2) { console.error("Failed to load custom providers:", error$2); } finally { this.customProviderModels = allCustomModels; this.customProvidersLoading = false; this.requestUpdate(); } } formatTokens(tokens) { if (tokens >= 1e6) return `${(tokens / 1e6).toFixed(0)}M`; if (tokens >= 1e3) return `${(tokens / 1e3).toFixed(0)}`; return String(tokens); } handleSelect(model) { if (model) { this.onSelectCallback?.(model); this.close(); } } getFilteredModels() { const allModels = []; const knownProviders = getProviders(); for (const provider of knownProviders) { const models = getModels(provider); for (const model of models) { allModels.push({ provider, id: model.id, model }); } } for (const model of this.customProviderModels) { allModels.push({ provider: model.provider, id: model.id, model }); } let filteredModels = allModels; if (this.searchQuery) { filteredModels = filteredModels.filter(({ provider, id, model }) => { const searchTokens = this.searchQuery.split(/\s+/).filter((t$6) => t$6); const searchText = `${provider} ${id} ${model.name}`.toLowerCase(); return searchTokens.every((token) => searchText.includes(token)); }); } if (this.filterThinking) { filteredModels = filteredModels.filter(({ model }) => model.reasoning); } if (this.filterVision) { filteredModels = filteredModels.filter(({ model }) => model.input.includes("image")); } filteredModels.sort((a$2, b$3) => { const aIsCurrent = this.currentModel?.id === a$2.model.id; const bIsCurrent = this.currentModel?.id === b$3.model.id; if (aIsCurrent && !bIsCurrent) return -1; if (!aIsCurrent && bIsCurrent) return 1; return a$2.provider.localeCompare(b$3.provider); }); return filteredModels; } scrollToSelected() { requestAnimationFrame(() => { const scrollContainer = this.scrollContainerRef.value; const selectedElement = scrollContainer?.querySelectorAll("[data-model-item]")[this.selectedIndex]; if (selectedElement) { selectedElement.scrollIntoView({ block: "nearest", behavior: "smooth" }); } }); } renderContent() { const filteredModels = this.getFilteredModels(); return x`
${DialogHeader({ title: i18n("Select Model") })} ${Input({ placeholder: i18n("Search models..."), value: this.searchQuery, inputRef: this.searchInputRef, onInput: (e$10) => { this.searchQuery = e$10.target.value; this.selectedIndex = 0; if (this.scrollContainerRef.value) { this.scrollContainerRef.value.scrollTop = 0; } } })}
${Button({ variant: this.filterThinking ? "default" : "secondary", size: "sm", onClick: () => { this.filterThinking = !this.filterThinking; this.selectedIndex = 0; if (this.scrollContainerRef.value) { this.scrollContainerRef.value.scrollTop = 0; } }, className: "rounded-full", children: x`${icon(Brain, "sm")} ${i18n("Thinking")}` })} ${Button({ variant: this.filterVision ? "default" : "secondary", size: "sm", onClick: () => { this.filterVision = !this.filterVision; this.selectedIndex = 0; if (this.scrollContainerRef.value) { this.scrollContainerRef.value.scrollTop = 0; } }, className: "rounded-full", children: x`${icon(Image$1, "sm")} ${i18n("Vision")}` })}
${filteredModels.map(({ provider, id, model }, index) => { const isCurrent = this.currentModel?.id === model.id && this.currentModel?.provider === model.provider; const isSelected = index === this.selectedIndex; return x`
this.handleSelect(model)} @mouseenter=${() => { if (this.navigationMode === "mouse") { this.selectedIndex = index; } }} >
${id} ${isCurrent ? x`` : ""}
${Badge(provider, "outline")}
${icon(Brain, "sm")} ${icon(Image$1, "sm")} ${this.formatTokens(model.contextWindow)}K/${this.formatTokens(model.maxTokens)}K
${formatModelCost(model.cost)}
`; })}
`; } }; __decorate$27([r()], ModelSelector.prototype, "currentModel", void 0); __decorate$27([r()], ModelSelector.prototype, "searchQuery", void 0); __decorate$27([r()], ModelSelector.prototype, "filterThinking", void 0); __decorate$27([r()], ModelSelector.prototype, "filterVision", void 0); __decorate$27([r()], ModelSelector.prototype, "customProvidersLoading", void 0); __decorate$27([r()], ModelSelector.prototype, "selectedIndex", void 0); __decorate$27([r()], ModelSelector.prototype, "navigationMode", void 0); __decorate$27([r()], ModelSelector.prototype, "customProviderModels", void 0); ModelSelector = ModelSelector_1 = __decorate$27([t("agent-model-selector")], ModelSelector); })); //#endregion //#region node_modules/@mariozechner/mini-lit/dist/Select.js function Select(props) { const { value, placeholder = i18n("Select an option"), options, onChange, disabled = false, className = "", width = "180px", size = "md", variant = "default", fitContent = false } = props; const triggerRef = e(); const state$1 = { isOpen: false, focusedIndex: -1 }; const sizeClasses$1 = { sm: "h-8 px-2 text-xs", md: "h-9 px-3 text-sm", lg: "h-10 px-4 text-base" }; const variantClasses = { default: "text-foreground border-input bg-transparent hover:bg-accent/50 shadow-xs", ghost: "text-foreground border-transparent bg-transparent hover:bg-accent hover:text-accent-foreground", outline: "text-foreground border-input bg-transparent hover:bg-accent hover:text-accent-foreground" }; const flatOptions = []; const isGrouped = options.length > 0 && "options" in options[0]; if (isGrouped) { options.forEach((group) => { flatOptions.push(...group.options.filter((opt) => !opt.disabled)); }); } else { flatOptions.push(...options.filter((opt) => !opt.disabled)); } const selectedOption = flatOptions.find((opt) => opt.value === value); let portalContainer = null; const ensurePortalContainer = () => { if (!portalContainer) { portalContainer = document.createElement("div"); portalContainer.className = "select-portal-container"; portalContainer.style.cssText = "position: fixed; z-index: 50; pointer-events: none;"; document.body.appendChild(portalContainer); } return portalContainer; }; const updatePosition = () => { if (!triggerRef.value || !portalContainer) return; const rect = triggerRef.value.getBoundingClientRect(); state$1.triggerRect = rect; const spaceBelow = window.innerHeight - rect.bottom; const spaceAbove = rect.top; const dropdownHeight = 300; const showAbove = spaceBelow < dropdownHeight && spaceAbove > spaceBelow; portalContainer.style.cssText = ` position: fixed; left: ${rect.left}px; ${showAbove ? `bottom: ${window.innerHeight - rect.top}px` : `top: ${rect.bottom}px`}; min-width: ${rect.width}px; width: max-content; z-index: 50; pointer-events: ${state$1.isOpen ? "auto" : "none"}; `; }; const open$1 = () => { if (disabled || state$1.isOpen) return; if (activeSelect && activeSelect !== api) { activeSelect.close(); } state$1.isOpen = true; state$1.focusedIndex = selectedOption ? flatOptions.indexOf(selectedOption) : 0; ensurePortalContainer(); updatePosition(); renderPortal(); setTimeout(() => { document.addEventListener("click", handleOutsideClick); document.addEventListener("keydown", handleKeyDown); window.addEventListener("scroll", updatePosition, true); window.addEventListener("resize", updatePosition); }, 0); activeSelect = api; if (triggerRef.value) { triggerRef.value.setAttribute("aria-expanded", "true"); } }; const close$1 = () => { if (!state$1.isOpen) return; state$1.isOpen = false; state$1.focusedIndex = -1; document.removeEventListener("click", handleOutsideClick); document.removeEventListener("keydown", handleKeyDown); window.removeEventListener("scroll", updatePosition, true); window.removeEventListener("resize", updatePosition); if (portalContainer) { B$1(x``, portalContainer); } if (activeSelect === api) { activeSelect = null; } if (triggerRef.value) { triggerRef.value.setAttribute("aria-expanded", "false"); triggerRef.value.focus(); } }; const handleOutsideClick = (e$10) => { const target = e$10.target; if (triggerRef.value?.contains(target) || portalContainer?.contains(target)) { return; } close$1(); }; const handleKeyDown = (e$10) => { if (!state$1.isOpen) return; switch (e$10.key) { case "Escape": e$10.preventDefault(); close$1(); break; case "ArrowDown": e$10.preventDefault(); state$1.focusedIndex = Math.min(state$1.focusedIndex + 1, flatOptions.length - 1); renderPortal(); break; case "ArrowUp": e$10.preventDefault(); state$1.focusedIndex = Math.max(state$1.focusedIndex - 1, 0); renderPortal(); break; case "Enter": case " ": e$10.preventDefault(); if (state$1.focusedIndex >= 0 && state$1.focusedIndex < flatOptions.length) { selectOption(flatOptions[state$1.focusedIndex].value); } break; case "Home": e$10.preventDefault(); state$1.focusedIndex = 0; renderPortal(); break; case "End": e$10.preventDefault(); state$1.focusedIndex = flatOptions.length - 1; renderPortal(); break; } }; const selectOption = (optionValue) => { onChange(optionValue); close$1(); }; const renderPortal = () => { if (!portalContainer || !state$1.isOpen) return; const dropdownContent = x`
${isGrouped ? options.map((group, _groupIndex) => x`
${group.label ? x`
${group.label}
` : ""} ${group.options.map((option, _optionIndex) => { const globalIndex = flatOptions.indexOf(option); const isFocused = globalIndex === state$1.focusedIndex; const isSelected = option.value === value; return x`
selectOption(option.value)} @mouseenter=${() => { if (!option.disabled) { state$1.focusedIndex = globalIndex; renderPortal(); } }} > ${isSelected ? x` ` : ""} ${option.icon ? x`${option.icon}` : ""} ${option.label}
`; })}
`) : options.map((option, index) => { const isFocused = index === state$1.focusedIndex; const isSelected = option.value === value; return x`
selectOption(option.value)} @mouseenter=${() => { if (!option.disabled) { state$1.focusedIndex = index; renderPortal(); } }} > ${isSelected ? x` ` : ""} ${option.icon ? x`${option.icon}` : ""} ${option.label}
`; })}
`; B$1(dropdownContent, portalContainer); }; const api = { close: close$1 }; const handleTriggerClick = (e$10) => { e$10.preventDefault(); e$10.stopPropagation(); if (state$1.isOpen) { close$1(); } else { open$1(); } }; const buttonWidth = fitContent ? "auto" : width; const minWidth = fitContent ? width || "auto" : undefined; return x` `; } var activeSelect; var init_Select = __esmMin((() => { init_lit(); init_ref$2(); init_i18n$1(); activeSelect = null; })); //#endregion //#region node_modules/jszip/dist/jszip.min.js var require_jszip_min = /* @__PURE__ */ __commonJSMin(((exports, module) => { /*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files (c) 2009-2016 Stuart Knightley Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/main/LICENSE */ !function(e$10) { if ("object" == typeof exports && "undefined" != typeof module) module.exports = e$10(); else if ("function" == typeof define && define.amd) define([], e$10); else { ("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).JSZip = e$10(); } }(function() { return function s$5(a$2, o$10, h$5) { function u$4(r$10, e$11) { if (!o$10[r$10]) { if (!a$2[r$10]) { var t$6 = "function" == typeof __require && __require; if (!e$11 && t$6) return t$6(r$10, !0); if (l$3) return l$3(r$10, !0); var n$9 = new Error("Cannot find module '" + r$10 + "'"); throw n$9.code = "MODULE_NOT_FOUND", n$9; } var i$7 = o$10[r$10] = { exports: {} }; a$2[r$10][0].call(i$7.exports, function(e$12) { var t$7 = a$2[r$10][1][e$12]; return u$4(t$7 || e$12); }, i$7, i$7.exports, s$5, a$2, o$10, h$5); } return o$10[r$10].exports; } for (var l$3 = "function" == typeof __require && __require, e$10 = 0; e$10 < h$5.length; e$10++) u$4(h$5[e$10]); return u$4; }({ 1: [function(e$10, t$6, r$10) { "use strict"; var d$5 = e$10("./utils"), c$7 = e$10("./support"), p$3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; r$10.encode = function(e$11) { for (var t$7, r$11, n$9, i$7, s$5, a$2, o$10, h$5 = [], u$4 = 0, l$3 = e$11.length, f$4 = l$3, c$8 = "string" !== d$5.getTypeOf(e$11); u$4 < e$11.length;) f$4 = l$3 - u$4, n$9 = c$8 ? (t$7 = e$11[u$4++], r$11 = u$4 < l$3 ? e$11[u$4++] : 0, u$4 < l$3 ? e$11[u$4++] : 0) : (t$7 = e$11.charCodeAt(u$4++), r$11 = u$4 < l$3 ? e$11.charCodeAt(u$4++) : 0, u$4 < l$3 ? e$11.charCodeAt(u$4++) : 0), i$7 = t$7 >> 2, s$5 = (3 & t$7) << 4 | r$11 >> 4, a$2 = 1 < f$4 ? (15 & r$11) << 2 | n$9 >> 6 : 64, o$10 = 2 < f$4 ? 63 & n$9 : 64, h$5.push(p$3.charAt(i$7) + p$3.charAt(s$5) + p$3.charAt(a$2) + p$3.charAt(o$10)); return h$5.join(""); }, r$10.decode = function(e$11) { var t$7, r$11, n$9, i$7, s$5, a$2, o$10 = 0, h$5 = 0, u$4 = "data:"; if (e$11.substr(0, u$4.length) === u$4) throw new Error("Invalid base64 input, it looks like a data url."); var l$3, f$4 = 3 * (e$11 = e$11.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4; if (e$11.charAt(e$11.length - 1) === p$3.charAt(64) && f$4--, e$11.charAt(e$11.length - 2) === p$3.charAt(64) && f$4--, f$4 % 1 != 0) throw new Error("Invalid base64 input, bad content length."); for (l$3 = c$7.uint8array ? new Uint8Array(0 | f$4) : new Array(0 | f$4); o$10 < e$11.length;) t$7 = p$3.indexOf(e$11.charAt(o$10++)) << 2 | (i$7 = p$3.indexOf(e$11.charAt(o$10++))) >> 4, r$11 = (15 & i$7) << 4 | (s$5 = p$3.indexOf(e$11.charAt(o$10++))) >> 2, n$9 = (3 & s$5) << 6 | (a$2 = p$3.indexOf(e$11.charAt(o$10++))), l$3[h$5++] = t$7, 64 !== s$5 && (l$3[h$5++] = r$11), 64 !== a$2 && (l$3[h$5++] = n$9); return l$3; }; }, { "./support": 30, "./utils": 32 }], 2: [function(e$10, t$6, r$10) { "use strict"; var n$9 = e$10("./external"), i$7 = e$10("./stream/DataWorker"), s$5 = e$10("./stream/Crc32Probe"), a$2 = e$10("./stream/DataLengthProbe"); function o$10(e$11, t$7, r$11, n$10, i$8) { this.compressedSize = e$11, this.uncompressedSize = t$7, this.crc32 = r$11, this.compression = n$10, this.compressedContent = i$8; } o$10.prototype = { getContentWorker: function() { var e$11 = new i$7(n$9.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a$2("data_length")), t$7 = this; return e$11.on("end", function() { if (this.streamInfo.data_length !== t$7.uncompressedSize) throw new Error("Bug : uncompressed data size mismatch"); }), e$11; }, getCompressedWorker: function() { return new i$7(n$9.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression); } }, o$10.createWorkerFrom = function(e$11, t$7, r$11) { return e$11.pipe(new s$5()).pipe(new a$2("uncompressedSize")).pipe(t$7.compressWorker(r$11)).pipe(new a$2("compressedSize")).withStreamInfo("compression", t$7); }, t$6.exports = o$10; }, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(e$10, t$6, r$10) { "use strict"; var n$9 = e$10("./stream/GenericWorker"); r$10.STORE = { magic: "\0\0", compressWorker: function() { return new n$9("STORE compression"); }, uncompressWorker: function() { return new n$9("STORE decompression"); } }, r$10.DEFLATE = e$10("./flate"); }, { "./flate": 7, "./stream/GenericWorker": 28 }], 4: [function(e$10, t$6, r$10) { "use strict"; var n$9 = e$10("./utils"); var o$10 = function() { for (var e$11, t$7 = [], r$11 = 0; r$11 < 256; r$11++) { e$11 = r$11; for (var n$10 = 0; n$10 < 8; n$10++) e$11 = 1 & e$11 ? 3988292384 ^ e$11 >>> 1 : e$11 >>> 1; t$7[r$11] = e$11; } return t$7; }(); t$6.exports = function(e$11, t$7) { return void 0 !== e$11 && e$11.length ? "string" !== n$9.getTypeOf(e$11) ? function(e$12, t$8, r$11, n$10) { var i$7 = o$10, s$5 = n$10 + r$11; e$12 ^= -1; for (var a$2 = n$10; a$2 < s$5; a$2++) e$12 = e$12 >>> 8 ^ i$7[255 & (e$12 ^ t$8[a$2])]; return -1 ^ e$12; }(0 | t$7, e$11, e$11.length, 0) : function(e$12, t$8, r$11, n$10) { var i$7 = o$10, s$5 = n$10 + r$11; e$12 ^= -1; for (var a$2 = n$10; a$2 < s$5; a$2++) e$12 = e$12 >>> 8 ^ i$7[255 & (e$12 ^ t$8.charCodeAt(a$2))]; return -1 ^ e$12; }(0 | t$7, e$11, e$11.length, 0) : 0; }; }, { "./utils": 32 }], 5: [function(e$10, t$6, r$10) { "use strict"; r$10.base64 = !1, r$10.binary = !1, r$10.dir = !1, r$10.createFolders = !0, r$10.date = null, r$10.compression = null, r$10.compressionOptions = null, r$10.comment = null, r$10.unixPermissions = null, r$10.dosPermissions = null; }, {}], 6: [function(e$10, t$6, r$10) { "use strict"; var n$9 = null; n$9 = "undefined" != typeof Promise ? Promise : e$10("lie"), t$6.exports = { Promise: n$9 }; }, { lie: 37 }], 7: [function(e$10, t$6, r$10) { "use strict"; var n$9 = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Uint32Array, i$7 = e$10("pako"), s$5 = e$10("./utils"), a$2 = e$10("./stream/GenericWorker"), o$10 = n$9 ? "uint8array" : "array"; function h$5(e$11, t$7) { a$2.call(this, "FlateWorker/" + e$11), this._pako = null, this._pakoAction = e$11, this._pakoOptions = t$7, this.meta = {}; } r$10.magic = "\b\0", s$5.inherits(h$5, a$2), h$5.prototype.processChunk = function(e$11) { this.meta = e$11.meta, null === this._pako && this._createPako(), this._pako.push(s$5.transformTo(o$10, e$11.data), !1); }, h$5.prototype.flush = function() { a$2.prototype.flush.call(this), null === this._pako && this._createPako(), this._pako.push([], !0); }, h$5.prototype.cleanUp = function() { a$2.prototype.cleanUp.call(this), this._pako = null; }, h$5.prototype._createPako = function() { this._pako = new i$7[this._pakoAction]({ raw: !0, level: this._pakoOptions.level || -1 }); var t$7 = this; this._pako.onData = function(e$11) { t$7.push({ data: e$11, meta: t$7.meta }); }; }, r$10.compressWorker = function(e$11) { return new h$5("Deflate", e$11); }, r$10.uncompressWorker = function() { return new h$5("Inflate", {}); }; }, { "./stream/GenericWorker": 28, "./utils": 32, pako: 38 }], 8: [function(e$10, t$6, r$10) { "use strict"; function A$1(e$11, t$7) { var r$11, n$10 = ""; for (r$11 = 0; r$11 < t$7; r$11++) n$10 += String.fromCharCode(255 & e$11), e$11 >>>= 8; return n$10; } function n$9(e$11, t$7, r$11, n$10, i$8, s$6) { var a$2, o$10, h$5 = e$11.file, u$4 = e$11.compression, l$3 = s$6 !== O.utf8encode, f$4 = I$2.transformTo("string", s$6(h$5.name)), c$7 = I$2.transformTo("string", O.utf8encode(h$5.name)), d$5 = h$5.comment, p$3 = I$2.transformTo("string", s$6(d$5)), m$3 = I$2.transformTo("string", O.utf8encode(d$5)), _$2 = c$7.length !== h$5.name.length, g$1 = m$3.length !== d$5.length, b$3 = "", v$3 = "", y$3 = "", w$2 = h$5.dir, k$2 = h$5.date, x$2 = { crc32: 0, compressedSize: 0, uncompressedSize: 0 }; t$7 && !r$11 || (x$2.crc32 = e$11.crc32, x$2.compressedSize = e$11.compressedSize, x$2.uncompressedSize = e$11.uncompressedSize); var S$4 = 0; t$7 && (S$4 |= 8), l$3 || !_$2 && !g$1 || (S$4 |= 2048); var z$2 = 0, C$2 = 0; w$2 && (z$2 |= 16), "UNIX" === i$8 ? (C$2 = 798, z$2 |= function(e$12, t$8) { var r$12 = e$12; return e$12 || (r$12 = t$8 ? 16893 : 33204), (65535 & r$12) << 16; }(h$5.unixPermissions, w$2)) : (C$2 = 20, z$2 |= function(e$12) { return 63 & (e$12 || 0); }(h$5.dosPermissions)), a$2 = k$2.getUTCHours(), a$2 <<= 6, a$2 |= k$2.getUTCMinutes(), a$2 <<= 5, a$2 |= k$2.getUTCSeconds() / 2, o$10 = k$2.getUTCFullYear() - 1980, o$10 <<= 4, o$10 |= k$2.getUTCMonth() + 1, o$10 <<= 5, o$10 |= k$2.getUTCDate(), _$2 && (v$3 = A$1(1, 1) + A$1(B$2(f$4), 4) + c$7, b$3 += "up" + A$1(v$3.length, 2) + v$3), g$1 && (y$3 = A$1(1, 1) + A$1(B$2(p$3), 4) + m$3, b$3 += "uc" + A$1(y$3.length, 2) + y$3); var E$2 = ""; return E$2 += "\n\0", E$2 += A$1(S$4, 2), E$2 += u$4.magic, E$2 += A$1(a$2, 2), E$2 += A$1(o$10, 2), E$2 += A$1(x$2.crc32, 4), E$2 += A$1(x$2.compressedSize, 4), E$2 += A$1(x$2.uncompressedSize, 4), E$2 += A$1(f$4.length, 2), E$2 += A$1(b$3.length, 2), { fileRecord: R$1.LOCAL_FILE_HEADER + E$2 + f$4 + b$3, dirRecord: R$1.CENTRAL_FILE_HEADER + A$1(C$2, 2) + E$2 + A$1(p$3.length, 2) + "\0\0\0\0" + A$1(z$2, 4) + A$1(n$10, 4) + f$4 + b$3 + p$3 }; } var I$2 = e$10("../utils"), i$7 = e$10("../stream/GenericWorker"), O = e$10("../utf8"), B$2 = e$10("../crc32"), R$1 = e$10("../signature"); function s$5(e$11, t$7, r$11, n$10) { i$7.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = t$7, this.zipPlatform = r$11, this.encodeFileName = n$10, this.streamFiles = e$11, this.accumulate = !1, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = []; } I$2.inherits(s$5, i$7), s$5.prototype.push = function(e$11) { var t$7 = e$11.meta.percent || 0, r$11 = this.entriesCount, n$10 = this._sources.length; this.accumulate ? this.contentBuffer.push(e$11) : (this.bytesWritten += e$11.data.length, i$7.prototype.push.call(this, { data: e$11.data, meta: { currentFile: this.currentFile, percent: r$11 ? (t$7 + 100 * (r$11 - n$10 - 1)) / r$11 : 100 } })); }, s$5.prototype.openedSource = function(e$11) { this.currentSourceOffset = this.bytesWritten, this.currentFile = e$11.file.name; var t$7 = this.streamFiles && !e$11.file.dir; if (t$7) { var r$11 = n$9(e$11, t$7, !1, this.currentSourceOffset, this.zipPlatform, this.encodeFileName); this.push({ data: r$11.fileRecord, meta: { percent: 0 } }); } else this.accumulate = !0; }, s$5.prototype.closedSource = function(e$11) { this.accumulate = !1; var t$7 = this.streamFiles && !e$11.file.dir, r$11 = n$9(e$11, t$7, !0, this.currentSourceOffset, this.zipPlatform, this.encodeFileName); if (this.dirRecords.push(r$11.dirRecord), t$7) this.push({ data: function(e$12) { return R$1.DATA_DESCRIPTOR + A$1(e$12.crc32, 4) + A$1(e$12.compressedSize, 4) + A$1(e$12.uncompressedSize, 4); }(e$11), meta: { percent: 100 } }); else for (this.push({ data: r$11.fileRecord, meta: { percent: 0 } }); this.contentBuffer.length;) this.push(this.contentBuffer.shift()); this.currentFile = null; }, s$5.prototype.flush = function() { for (var e$11 = this.bytesWritten, t$7 = 0; t$7 < this.dirRecords.length; t$7++) this.push({ data: this.dirRecords[t$7], meta: { percent: 100 } }); var r$11 = this.bytesWritten - e$11, n$10 = function(e$12, t$8, r$12, n$11, i$8) { var s$6 = I$2.transformTo("string", i$8(n$11)); return R$1.CENTRAL_DIRECTORY_END + "\0\0\0\0" + A$1(e$12, 2) + A$1(e$12, 2) + A$1(t$8, 4) + A$1(r$12, 4) + A$1(s$6.length, 2) + s$6; }(this.dirRecords.length, r$11, e$11, this.zipComment, this.encodeFileName); this.push({ data: n$10, meta: { percent: 100 } }); }, s$5.prototype.prepareNextSource = function() { this.previous = this._sources.shift(), this.openedSource(this.previous.streamInfo), this.isPaused ? this.previous.pause() : this.previous.resume(); }, s$5.prototype.registerPrevious = function(e$11) { this._sources.push(e$11); var t$7 = this; return e$11.on("data", function(e$12) { t$7.processChunk(e$12); }), e$11.on("end", function() { t$7.closedSource(t$7.previous.streamInfo), t$7._sources.length ? t$7.prepareNextSource() : t$7.end(); }), e$11.on("error", function(e$12) { t$7.error(e$12); }), this; }, s$5.prototype.resume = function() { return !!i$7.prototype.resume.call(this) && (!this.previous && this._sources.length ? (this.prepareNextSource(), !0) : this.previous || this._sources.length || this.generatedError ? void 0 : (this.end(), !0)); }, s$5.prototype.error = function(e$11) { var t$7 = this._sources; if (!i$7.prototype.error.call(this, e$11)) return !1; for (var r$11 = 0; r$11 < t$7.length; r$11++) try { t$7[r$11].error(e$11); } catch (e$12) {} return !0; }, s$5.prototype.lock = function() { i$7.prototype.lock.call(this); for (var e$11 = this._sources, t$7 = 0; t$7 < e$11.length; t$7++) e$11[t$7].lock(); }, t$6.exports = s$5; }, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(e$10, t$6, r$10) { "use strict"; var u$4 = e$10("../compressions"), n$9 = e$10("./ZipFileWorker"); r$10.generateWorker = function(e$11, a$2, t$7) { var o$10 = new n$9(a$2.streamFiles, t$7, a$2.platform, a$2.encodeFileName), h$5 = 0; try { e$11.forEach(function(e$12, t$8) { h$5++; var r$11 = function(e$13, t$9) { var r$12 = e$13 || t$9, n$11 = u$4[r$12]; if (!n$11) throw new Error(r$12 + " is not a valid compression method !"); return n$11; }(t$8.options.compression, a$2.compression), n$10 = t$8.options.compressionOptions || a$2.compressionOptions || {}, i$7 = t$8.dir, s$5 = t$8.date; t$8._compressWorker(r$11, n$10).withStreamInfo("file", { name: e$12, dir: i$7, date: s$5, comment: t$8.comment || "", unixPermissions: t$8.unixPermissions, dosPermissions: t$8.dosPermissions }).pipe(o$10); }), o$10.entriesCount = h$5; } catch (e$12) { o$10.error(e$12); } return o$10; }; }, { "../compressions": 3, "./ZipFileWorker": 8 }], 10: [function(e$10, t$6, r$10) { "use strict"; function n$9() { if (!(this instanceof n$9)) return new n$9(); if (arguments.length) throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide."); this.files = Object.create(null), this.comment = null, this.root = "", this.clone = function() { var e$11 = new n$9(); for (var t$7 in this) "function" != typeof this[t$7] && (e$11[t$7] = this[t$7]); return e$11; }; } (n$9.prototype = e$10("./object")).loadAsync = e$10("./load"), n$9.support = e$10("./support"), n$9.defaults = e$10("./defaults"), n$9.version = "3.10.1", n$9.loadAsync = function(e$11, t$7) { return new n$9().loadAsync(e$11, t$7); }, n$9.external = e$10("./external"), t$6.exports = n$9; }, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(e$10, t$6, r$10) { "use strict"; var u$4 = e$10("./utils"), i$7 = e$10("./external"), n$9 = e$10("./utf8"), s$5 = e$10("./zipEntries"), a$2 = e$10("./stream/Crc32Probe"), l$3 = e$10("./nodejsUtils"); function f$4(n$10) { return new i$7.Promise(function(e$11, t$7) { var r$11 = n$10.decompressed.getContentWorker().pipe(new a$2()); r$11.on("error", function(e$12) { t$7(e$12); }).on("end", function() { r$11.streamInfo.crc32 !== n$10.decompressed.crc32 ? t$7(new Error("Corrupted zip : CRC32 mismatch")) : e$11(); }).resume(); }); } t$6.exports = function(e$11, o$10) { var h$5 = this; return o$10 = u$4.extend(o$10 || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: n$9.utf8decode }), l$3.isNode && l$3.isStream(e$11) ? i$7.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : u$4.prepareContent("the loaded zip file", e$11, !0, o$10.optimizedBinaryString, o$10.base64).then(function(e$12) { var t$7 = new s$5(o$10); return t$7.load(e$12), t$7; }).then(function(e$12) { var t$7 = [i$7.Promise.resolve(e$12)], r$11 = e$12.files; if (o$10.checkCRC32) for (var n$10 = 0; n$10 < r$11.length; n$10++) t$7.push(f$4(r$11[n$10])); return i$7.Promise.all(t$7); }).then(function(e$12) { for (var t$7 = e$12.shift(), r$11 = t$7.files, n$10 = 0; n$10 < r$11.length; n$10++) { var i$8 = r$11[n$10], s$6 = i$8.fileNameStr, a$3 = u$4.resolve(i$8.fileNameStr); h$5.file(a$3, i$8.decompressed, { binary: !0, optimizedBinaryString: !0, date: i$8.date, dir: i$8.dir, comment: i$8.fileCommentStr.length ? i$8.fileCommentStr : null, unixPermissions: i$8.unixPermissions, dosPermissions: i$8.dosPermissions, createFolders: o$10.createFolders }), i$8.dir || (h$5.file(a$3).unsafeOriginalName = s$6); } return t$7.zipComment.length && (h$5.comment = t$7.zipComment), h$5; }); }; }, { "./external": 6, "./nodejsUtils": 14, "./stream/Crc32Probe": 25, "./utf8": 31, "./utils": 32, "./zipEntries": 33 }], 12: [function(e$10, t$6, r$10) { "use strict"; var n$9 = e$10("../utils"), i$7 = e$10("../stream/GenericWorker"); function s$5(e$11, t$7) { i$7.call(this, "Nodejs stream input adapter for " + e$11), this._upstreamEnded = !1, this._bindStream(t$7); } n$9.inherits(s$5, i$7), s$5.prototype._bindStream = function(e$11) { var t$7 = this; (this._stream = e$11).pause(), e$11.on("data", function(e$12) { t$7.push({ data: e$12, meta: { percent: 0 } }); }).on("error", function(e$12) { t$7.isPaused ? this.generatedError = e$12 : t$7.error(e$12); }).on("end", function() { t$7.isPaused ? t$7._upstreamEnded = !0 : t$7.end(); }); }, s$5.prototype.pause = function() { return !!i$7.prototype.pause.call(this) && (this._stream.pause(), !0); }, s$5.prototype.resume = function() { return !!i$7.prototype.resume.call(this) && (this._upstreamEnded ? this.end() : this._stream.resume(), !0); }, t$6.exports = s$5; }, { "../stream/GenericWorker": 28, "../utils": 32 }], 13: [function(e$10, t$6, r$10) { "use strict"; var i$7 = e$10("readable-stream").Readable; function n$9(e$11, t$7, r$11) { i$7.call(this, t$7), this._helper = e$11; var n$10 = this; e$11.on("data", function(e$12, t$8) { n$10.push(e$12) || n$10._helper.pause(), r$11 && r$11(t$8); }).on("error", function(e$12) { n$10.emit("error", e$12); }).on("end", function() { n$10.push(null); }); } e$10("../utils").inherits(n$9, i$7), n$9.prototype._read = function() { this._helper.resume(); }, t$6.exports = n$9; }, { "../utils": 32, "readable-stream": 16 }], 14: [function(e$10, t$6, r$10) { "use strict"; t$6.exports = { isNode: "undefined" != typeof Buffer, newBufferFrom: function(e$11, t$7) { if (Buffer.from && Buffer.from !== Uint8Array.from) return Buffer.from(e$11, t$7); if ("number" == typeof e$11) throw new Error("The \"data\" argument must not be a number"); return new Buffer(e$11, t$7); }, allocBuffer: function(e$11) { if (Buffer.alloc) return Buffer.alloc(e$11); var t$7 = new Buffer(e$11); return t$7.fill(0), t$7; }, isBuffer: function(e$11) { return Buffer.isBuffer(e$11); }, isStream: function(e$11) { return e$11 && "function" == typeof e$11.on && "function" == typeof e$11.pause && "function" == typeof e$11.resume; } }; }, {}], 15: [function(e$10, t$6, r$10) { "use strict"; function s$5(e$11, t$7, r$11) { var n$10, i$8 = u$4.getTypeOf(t$7), s$6 = u$4.extend(r$11 || {}, f$4); s$6.date = s$6.date || new Date(), null !== s$6.compression && (s$6.compression = s$6.compression.toUpperCase()), "string" == typeof s$6.unixPermissions && (s$6.unixPermissions = parseInt(s$6.unixPermissions, 8)), s$6.unixPermissions && 16384 & s$6.unixPermissions && (s$6.dir = !0), s$6.dosPermissions && 16 & s$6.dosPermissions && (s$6.dir = !0), s$6.dir && (e$11 = g$1(e$11)), s$6.createFolders && (n$10 = _$2(e$11)) && b$3.call(this, n$10, !0); var a$3 = "string" === i$8 && !1 === s$6.binary && !1 === s$6.base64; r$11 && void 0 !== r$11.binary || (s$6.binary = !a$3), (t$7 instanceof c$7 && 0 === t$7.uncompressedSize || s$6.dir || !t$7 || 0 === t$7.length) && (s$6.base64 = !1, s$6.binary = !0, t$7 = "", s$6.compression = "STORE", i$8 = "string"); var o$11 = null; o$11 = t$7 instanceof c$7 || t$7 instanceof l$3 ? t$7 : p$3.isNode && p$3.isStream(t$7) ? new m$3(e$11, t$7) : u$4.prepareContent(e$11, t$7, s$6.binary, s$6.optimizedBinaryString, s$6.base64); var h$6 = new d$5(e$11, o$11, s$6); this.files[e$11] = h$6; } var i$7 = e$10("./utf8"), u$4 = e$10("./utils"), l$3 = e$10("./stream/GenericWorker"), a$2 = e$10("./stream/StreamHelper"), f$4 = e$10("./defaults"), c$7 = e$10("./compressedObject"), d$5 = e$10("./zipObject"), o$10 = e$10("./generate"), p$3 = e$10("./nodejsUtils"), m$3 = e$10("./nodejs/NodejsStreamInputAdapter"), _$2 = function(e$11) { "/" === e$11.slice(-1) && (e$11 = e$11.substring(0, e$11.length - 1)); var t$7 = e$11.lastIndexOf("/"); return 0 < t$7 ? e$11.substring(0, t$7) : ""; }, g$1 = function(e$11) { return "/" !== e$11.slice(-1) && (e$11 += "/"), e$11; }, b$3 = function(e$11, t$7) { return t$7 = void 0 !== t$7 ? t$7 : f$4.createFolders, e$11 = g$1(e$11), this.files[e$11] || s$5.call(this, e$11, null, { dir: !0, createFolders: t$7 }), this.files[e$11]; }; function h$5(e$11) { return "[object RegExp]" === Object.prototype.toString.call(e$11); } var n$9 = { load: function() { throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); }, forEach: function(e$11) { var t$7, r$11, n$10; for (t$7 in this.files) n$10 = this.files[t$7], (r$11 = t$7.slice(this.root.length, t$7.length)) && t$7.slice(0, this.root.length) === this.root && e$11(r$11, n$10); }, filter: function(r$11) { var n$10 = []; return this.forEach(function(e$11, t$7) { r$11(e$11, t$7) && n$10.push(t$7); }), n$10; }, file: function(e$11, t$7, r$11) { if (1 !== arguments.length) return e$11 = this.root + e$11, s$5.call(this, e$11, t$7, r$11), this; if (h$5(e$11)) { var n$10 = e$11; return this.filter(function(e$12, t$8) { return !t$8.dir && n$10.test(e$12); }); } var i$8 = this.files[this.root + e$11]; return i$8 && !i$8.dir ? i$8 : null; }, folder: function(r$11) { if (!r$11) return this; if (h$5(r$11)) return this.filter(function(e$12, t$8) { return t$8.dir && r$11.test(e$12); }); var e$11 = this.root + r$11, t$7 = b$3.call(this, e$11), n$10 = this.clone(); return n$10.root = t$7.name, n$10; }, remove: function(r$11) { r$11 = this.root + r$11; var e$11 = this.files[r$11]; if (e$11 || ("/" !== r$11.slice(-1) && (r$11 += "/"), e$11 = this.files[r$11]), e$11 && !e$11.dir) delete this.files[r$11]; else for (var t$7 = this.filter(function(e$12, t$8) { return t$8.name.slice(0, r$11.length) === r$11; }), n$10 = 0; n$10 < t$7.length; n$10++) delete this.files[t$7[n$10].name]; return this; }, generate: function() { throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); }, generateInternalStream: function(e$11) { var t$7, r$11 = {}; try { if ((r$11 = u$4.extend(e$11 || {}, { streamFiles: !1, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: i$7.utf8encode })).type = r$11.type.toLowerCase(), r$11.compression = r$11.compression.toUpperCase(), "binarystring" === r$11.type && (r$11.type = "string"), !r$11.type) throw new Error("No output type specified."); u$4.checkSupport(r$11.type), "darwin" !== r$11.platform && "freebsd" !== r$11.platform && "linux" !== r$11.platform && "sunos" !== r$11.platform || (r$11.platform = "UNIX"), "win32" === r$11.platform && (r$11.platform = "DOS"); var n$10 = r$11.comment || this.comment || ""; t$7 = o$10.generateWorker(this, r$11, n$10); } catch (e$12) { (t$7 = new l$3("error")).error(e$12); } return new a$2(t$7, r$11.type || "string", r$11.mimeType); }, generateAsync: function(e$11, t$7) { return this.generateInternalStream(e$11).accumulate(t$7); }, generateNodeStream: function(e$11, t$7) { return (e$11 = e$11 || {}).type || (e$11.type = "nodebuffer"), this.generateInternalStream(e$11).toNodejsStream(t$7); } }; t$6.exports = n$9; }, { "./compressedObject": 2, "./defaults": 5, "./generate": 9, "./nodejs/NodejsStreamInputAdapter": 12, "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31, "./utils": 32, "./zipObject": 35 }], 16: [function(e$10, t$6, r$10) { "use strict"; t$6.exports = e$10("stream"); }, { stream: void 0 }], 17: [function(e$10, t$6, r$10) { "use strict"; var n$9 = e$10("./DataReader"); function i$7(e$11) { n$9.call(this, e$11); for (var t$7 = 0; t$7 < this.data.length; t$7++) e$11[t$7] = 255 & e$11[t$7]; } e$10("../utils").inherits(i$7, n$9), i$7.prototype.byteAt = function(e$11) { return this.data[this.zero + e$11]; }, i$7.prototype.lastIndexOfSignature = function(e$11) { for (var t$7 = e$11.charCodeAt(0), r$11 = e$11.charCodeAt(1), n$10 = e$11.charCodeAt(2), i$8 = e$11.charCodeAt(3), s$5 = this.length - 4; 0 <= s$5; --s$5) if (this.data[s$5] === t$7 && this.data[s$5 + 1] === r$11 && this.data[s$5 + 2] === n$10 && this.data[s$5 + 3] === i$8) return s$5 - this.zero; return -1; }, i$7.prototype.readAndCheckSignature = function(e$11) { var t$7 = e$11.charCodeAt(0), r$11 = e$11.charCodeAt(1), n$10 = e$11.charCodeAt(2), i$8 = e$11.charCodeAt(3), s$5 = this.readData(4); return t$7 === s$5[0] && r$11 === s$5[1] && n$10 === s$5[2] && i$8 === s$5[3]; }, i$7.prototype.readData = function(e$11) { if (this.checkOffset(e$11), 0 === e$11) return []; var t$7 = this.data.slice(this.zero + this.index, this.zero + this.index + e$11); return this.index += e$11, t$7; }, t$6.exports = i$7; }, { "../utils": 32, "./DataReader": 18 }], 18: [function(e$10, t$6, r$10) { "use strict"; var n$9 = e$10("../utils"); function i$7(e$11) { this.data = e$11, this.length = e$11.length, this.index = 0, this.zero = 0; } i$7.prototype = { checkOffset: function(e$11) { this.checkIndex(this.index + e$11); }, checkIndex: function(e$11) { if (this.length < this.zero + e$11 || e$11 < 0) throw new Error("End of data reached (data length = " + this.length + ", asked index = " + e$11 + "). Corrupted zip ?"); }, setIndex: function(e$11) { this.checkIndex(e$11), this.index = e$11; }, skip: function(e$11) { this.setIndex(this.index + e$11); }, byteAt: function() {}, readInt: function(e$11) { var t$7, r$11 = 0; for (this.checkOffset(e$11), t$7 = this.index + e$11 - 1; t$7 >= this.index; t$7--) r$11 = (r$11 << 8) + this.byteAt(t$7); return this.index += e$11, r$11; }, readString: function(e$11) { return n$9.transformTo("string", this.readData(e$11)); }, readData: function() {}, lastIndexOfSignature: function() {}, readAndCheckSignature: function() {}, readDate: function() { var e$11 = this.readInt(4); return new Date(Date.UTC(1980 + (e$11 >> 25 & 127), (e$11 >> 21 & 15) - 1, e$11 >> 16 & 31, e$11 >> 11 & 31, e$11 >> 5 & 63, (31 & e$11) << 1)); } }, t$6.exports = i$7; }, { "../utils": 32 }], 19: [function(e$10, t$6, r$10) { "use strict"; var n$9 = e$10("./Uint8ArrayReader"); function i$7(e$11) { n$9.call(this, e$11); } e$10("../utils").inherits(i$7, n$9), i$7.prototype.readData = function(e$11) { this.checkOffset(e$11); var t$7 = this.data.slice(this.zero + this.index, this.zero + this.index + e$11); return this.index += e$11, t$7; }, t$6.exports = i$7; }, { "../utils": 32, "./Uint8ArrayReader": 21 }], 20: [function(e$10, t$6, r$10) { "use strict"; var n$9 = e$10("./DataReader"); function i$7(e$11) { n$9.call(this, e$11); } e$10("../utils").inherits(i$7, n$9), i$7.prototype.byteAt = function(e$11) { return this.data.charCodeAt(this.zero + e$11); }, i$7.prototype.lastIndexOfSignature = function(e$11) { return this.data.lastIndexOf(e$11) - this.zero; }, i$7.prototype.readAndCheckSignature = function(e$11) { return e$11 === this.readData(4); }, i$7.prototype.readData = function(e$11) { this.checkOffset(e$11); var t$7 = this.data.slice(this.zero + this.index, this.zero + this.index + e$11); return this.index += e$11, t$7; }, t$6.exports = i$7; }, { "../utils": 32, "./DataReader": 18 }], 21: [function(e$10, t$6, r$10) { "use strict"; var n$9 = e$10("./ArrayReader"); function i$7(e$11) { n$9.call(this, e$11); } e$10("../utils").inherits(i$7, n$9), i$7.prototype.readData = function(e$11) { if (this.checkOffset(e$11), 0 === e$11) return new Uint8Array(0); var t$7 = this.data.subarray(this.zero + this.index, this.zero + this.index + e$11); return this.index += e$11, t$7; }, t$6.exports = i$7; }, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(e$10, t$6, r$10) { "use strict"; var n$9 = e$10("../utils"), i$7 = e$10("../support"), s$5 = e$10("./ArrayReader"), a$2 = e$10("./StringReader"), o$10 = e$10("./NodeBufferReader"), h$5 = e$10("./Uint8ArrayReader"); t$6.exports = function(e$11) { var t$7 = n$9.getTypeOf(e$11); return n$9.checkSupport(t$7), "string" !== t$7 || i$7.uint8array ? "nodebuffer" === t$7 ? new o$10(e$11) : i$7.uint8array ? new h$5(n$9.transformTo("uint8array", e$11)) : new s$5(n$9.transformTo("array", e$11)) : new a$2(e$11); }; }, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(e$10, t$6, r$10) { "use strict"; r$10.LOCAL_FILE_HEADER = "PK", r$10.CENTRAL_FILE_HEADER = "PK", r$10.CENTRAL_DIRECTORY_END = "PK", r$10.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", r$10.ZIP64_CENTRAL_DIRECTORY_END = "PK", r$10.DATA_DESCRIPTOR = "PK\x07\b"; }, {}], 24: [function(e$10, t$6, r$10) { "use strict"; var n$9 = e$10("./GenericWorker"), i$7 = e$10("../utils"); function s$5(e$11) { n$9.call(this, "ConvertWorker to " + e$11), this.destType = e$11; } i$7.inherits(s$5, n$9), s$5.prototype.processChunk = function(e$11) { this.push({ data: i$7.transformTo(this.destType, e$11.data), meta: e$11.meta }); }, t$6.exports = s$5; }, { "../utils": 32, "./GenericWorker": 28 }], 25: [function(e$10, t$6, r$10) { "use strict"; var n$9 = e$10("./GenericWorker"), i$7 = e$10("../crc32"); function s$5() { n$9.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0); } e$10("../utils").inherits(s$5, n$9), s$5.prototype.processChunk = function(e$11) { this.streamInfo.crc32 = i$7(e$11.data, this.streamInfo.crc32 || 0), this.push(e$11); }, t$6.exports = s$5; }, { "../crc32": 4, "../utils": 32, "./GenericWorker": 28 }], 26: [function(e$10, t$6, r$10) { "use strict"; var n$9 = e$10("../utils"), i$7 = e$10("./GenericWorker"); function s$5(e$11) { i$7.call(this, "DataLengthProbe for " + e$11), this.propName = e$11, this.withStreamInfo(e$11, 0); } n$9.inherits(s$5, i$7), s$5.prototype.processChunk = function(e$11) { if (e$11) { var t$7 = this.streamInfo[this.propName] || 0; this.streamInfo[this.propName] = t$7 + e$11.data.length; } i$7.prototype.processChunk.call(this, e$11); }, t$6.exports = s$5; }, { "../utils": 32, "./GenericWorker": 28 }], 27: [function(e$10, t$6, r$10) { "use strict"; var n$9 = e$10("../utils"), i$7 = e$10("./GenericWorker"); function s$5(e$11) { i$7.call(this, "DataWorker"); var t$7 = this; this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, e$11.then(function(e$12) { t$7.dataIsReady = !0, t$7.data = e$12, t$7.max = e$12 && e$12.length || 0, t$7.type = n$9.getTypeOf(e$12), t$7.isPaused || t$7._tickAndRepeat(); }, function(e$12) { t$7.error(e$12); }); } n$9.inherits(s$5, i$7), s$5.prototype.cleanUp = function() { i$7.prototype.cleanUp.call(this), this.data = null; }, s$5.prototype.resume = function() { return !!i$7.prototype.resume.call(this) && (!this._tickScheduled && this.dataIsReady && (this._tickScheduled = !0, n$9.delay(this._tickAndRepeat, [], this)), !0); }, s$5.prototype._tickAndRepeat = function() { this._tickScheduled = !1, this.isPaused || this.isFinished || (this._tick(), this.isFinished || (n$9.delay(this._tickAndRepeat, [], this), this._tickScheduled = !0)); }, s$5.prototype._tick = function() { if (this.isPaused || this.isFinished) return !1; var e$11 = null, t$7 = Math.min(this.max, this.index + 16384); if (this.index >= this.max) return this.end(); switch (this.type) { case "string": e$11 = this.data.substring(this.index, t$7); break; case "uint8array": e$11 = this.data.subarray(this.index, t$7); break; case "array": case "nodebuffer": e$11 = this.data.slice(this.index, t$7); } return this.index = t$7, this.push({ data: e$11, meta: { percent: this.max ? this.index / this.max * 100 : 0 } }); }, t$6.exports = s$5; }, { "../utils": 32, "./GenericWorker": 28 }], 28: [function(e$10, t$6, r$10) { "use strict"; function n$9(e$11) { this.name = e$11 || "default", this.streamInfo = {}, this.generatedError = null, this.extraStreamInfo = {}, this.isPaused = !0, this.isFinished = !1, this.isLocked = !1, this._listeners = { data: [], end: [], error: [] }, this.previous = null; } n$9.prototype = { push: function(e$11) { this.emit("data", e$11); }, end: function() { if (this.isFinished) return !1; this.flush(); try { this.emit("end"), this.cleanUp(), this.isFinished = !0; } catch (e$11) { this.emit("error", e$11); } return !0; }, error: function(e$11) { return !this.isFinished && (this.isPaused ? this.generatedError = e$11 : (this.isFinished = !0, this.emit("error", e$11), this.previous && this.previous.error(e$11), this.cleanUp()), !0); }, on: function(e$11, t$7) { return this._listeners[e$11].push(t$7), this; }, cleanUp: function() { this.streamInfo = this.generatedError = this.extraStreamInfo = null, this._listeners = []; }, emit: function(e$11, t$7) { if (this._listeners[e$11]) for (var r$11 = 0; r$11 < this._listeners[e$11].length; r$11++) this._listeners[e$11][r$11].call(this, t$7); }, pipe: function(e$11) { return e$11.registerPrevious(this); }, registerPrevious: function(e$11) { if (this.isLocked) throw new Error("The stream '" + this + "' has already been used."); this.streamInfo = e$11.streamInfo, this.mergeStreamInfo(), this.previous = e$11; var t$7 = this; return e$11.on("data", function(e$12) { t$7.processChunk(e$12); }), e$11.on("end", function() { t$7.end(); }), e$11.on("error", function(e$12) { t$7.error(e$12); }), this; }, pause: function() { return !this.isPaused && !this.isFinished && (this.isPaused = !0, this.previous && this.previous.pause(), !0); }, resume: function() { if (!this.isPaused || this.isFinished) return !1; var e$11 = this.isPaused = !1; return this.generatedError && (this.error(this.generatedError), e$11 = !0), this.previous && this.previous.resume(), !e$11; }, flush: function() {}, processChunk: function(e$11) { this.push(e$11); }, withStreamInfo: function(e$11, t$7) { return this.extraStreamInfo[e$11] = t$7, this.mergeStreamInfo(), this; }, mergeStreamInfo: function() { for (var e$11 in this.extraStreamInfo) Object.prototype.hasOwnProperty.call(this.extraStreamInfo, e$11) && (this.streamInfo[e$11] = this.extraStreamInfo[e$11]); }, lock: function() { if (this.isLocked) throw new Error("The stream '" + this + "' has already been used."); this.isLocked = !0, this.previous && this.previous.lock(); }, toString: function() { var e$11 = "Worker " + this.name; return this.previous ? this.previous + " -> " + e$11 : e$11; } }, t$6.exports = n$9; }, {}], 29: [function(e$10, t$6, r$10) { "use strict"; var h$5 = e$10("../utils"), i$7 = e$10("./ConvertWorker"), s$5 = e$10("./GenericWorker"), u$4 = e$10("../base64"), n$9 = e$10("../support"), a$2 = e$10("../external"), o$10 = null; if (n$9.nodestream) try { o$10 = e$10("../nodejs/NodejsStreamOutputAdapter"); } catch (e$11) {} function l$3(e$11, o$11) { return new a$2.Promise(function(t$7, r$11) { var n$10 = [], i$8 = e$11._internalType, s$6 = e$11._outputType, a$3 = e$11._mimeType; e$11.on("data", function(e$12, t$8) { n$10.push(e$12), o$11 && o$11(t$8); }).on("error", function(e$12) { n$10 = [], r$11(e$12); }).on("end", function() { try { var e$12 = function(e$13, t$8, r$12) { switch (e$13) { case "blob": return h$5.newBlob(h$5.transformTo("arraybuffer", t$8), r$12); case "base64": return u$4.encode(t$8); default: return h$5.transformTo(e$13, t$8); } }(s$6, function(e$13, t$8) { var r$12, n$11 = 0, i$9 = null, s$7 = 0; for (r$12 = 0; r$12 < t$8.length; r$12++) s$7 += t$8[r$12].length; switch (e$13) { case "string": return t$8.join(""); case "array": return Array.prototype.concat.apply([], t$8); case "uint8array": for (i$9 = new Uint8Array(s$7), r$12 = 0; r$12 < t$8.length; r$12++) i$9.set(t$8[r$12], n$11), n$11 += t$8[r$12].length; return i$9; case "nodebuffer": return Buffer.concat(t$8); default: throw new Error("concat : unsupported type '" + e$13 + "'"); } }(i$8, n$10), a$3); t$7(e$12); } catch (e$13) { r$11(e$13); } n$10 = []; }).resume(); }); } function f$4(e$11, t$7, r$11) { var n$10 = t$7; switch (t$7) { case "blob": case "arraybuffer": n$10 = "uint8array"; break; case "base64": n$10 = "string"; } try { this._internalType = n$10, this._outputType = t$7, this._mimeType = r$11, h$5.checkSupport(n$10), this._worker = e$11.pipe(new i$7(n$10)), e$11.lock(); } catch (e$12) { this._worker = new s$5("error"), this._worker.error(e$12); } } f$4.prototype = { accumulate: function(e$11) { return l$3(this, e$11); }, on: function(e$11, t$7) { var r$11 = this; return "data" === e$11 ? this._worker.on(e$11, function(e$12) { t$7.call(r$11, e$12.data, e$12.meta); }) : this._worker.on(e$11, function() { h$5.delay(t$7, arguments, r$11); }), this; }, resume: function() { return h$5.delay(this._worker.resume, [], this._worker), this; }, pause: function() { return this._worker.pause(), this; }, toNodejsStream: function(e$11) { if (h$5.checkSupport("nodestream"), "nodebuffer" !== this._outputType) throw new Error(this._outputType + " is not supported by this method"); return new o$10(this, { objectMode: "nodebuffer" !== this._outputType }, e$11); } }, t$6.exports = f$4; }, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(e$10, t$6, r$10) { "use strict"; if (r$10.base64 = !0, r$10.array = !0, r$10.string = !0, r$10.arraybuffer = "undefined" != typeof ArrayBuffer && "undefined" != typeof Uint8Array, r$10.nodebuffer = "undefined" != typeof Buffer, r$10.uint8array = "undefined" != typeof Uint8Array, "undefined" == typeof ArrayBuffer) r$10.blob = !1; else { var n$9 = new ArrayBuffer(0); try { r$10.blob = 0 === new Blob([n$9], { type: "application/zip" }).size; } catch (e$11) { try { var i$7 = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)(); i$7.append(n$9), r$10.blob = 0 === i$7.getBlob("application/zip").size; } catch (e$12) { r$10.blob = !1; } } } try { r$10.nodestream = !!e$10("readable-stream").Readable; } catch (e$11) { r$10.nodestream = !1; } }, { "readable-stream": 16 }], 31: [function(e$10, t$6, s$5) { "use strict"; for (var o$10 = e$10("./utils"), h$5 = e$10("./support"), r$10 = e$10("./nodejsUtils"), n$9 = e$10("./stream/GenericWorker"), u$4 = new Array(256), i$7 = 0; i$7 < 256; i$7++) u$4[i$7] = 252 <= i$7 ? 6 : 248 <= i$7 ? 5 : 240 <= i$7 ? 4 : 224 <= i$7 ? 3 : 192 <= i$7 ? 2 : 1; u$4[254] = u$4[254] = 1; function a$2() { n$9.call(this, "utf-8 decode"), this.leftOver = null; } function l$3() { n$9.call(this, "utf-8 encode"); } s$5.utf8encode = function(e$11) { return h$5.nodebuffer ? r$10.newBufferFrom(e$11, "utf-8") : function(e$12) { var t$7, r$11, n$10, i$8, s$6, a$3 = e$12.length, o$11 = 0; for (i$8 = 0; i$8 < a$3; i$8++) 55296 == (64512 & (r$11 = e$12.charCodeAt(i$8))) && i$8 + 1 < a$3 && 56320 == (64512 & (n$10 = e$12.charCodeAt(i$8 + 1))) && (r$11 = 65536 + (r$11 - 55296 << 10) + (n$10 - 56320), i$8++), o$11 += r$11 < 128 ? 1 : r$11 < 2048 ? 2 : r$11 < 65536 ? 3 : 4; for (t$7 = h$5.uint8array ? new Uint8Array(o$11) : new Array(o$11), i$8 = s$6 = 0; s$6 < o$11; i$8++) 55296 == (64512 & (r$11 = e$12.charCodeAt(i$8))) && i$8 + 1 < a$3 && 56320 == (64512 & (n$10 = e$12.charCodeAt(i$8 + 1))) && (r$11 = 65536 + (r$11 - 55296 << 10) + (n$10 - 56320), i$8++), r$11 < 128 ? t$7[s$6++] = r$11 : (r$11 < 2048 ? t$7[s$6++] = 192 | r$11 >>> 6 : (r$11 < 65536 ? t$7[s$6++] = 224 | r$11 >>> 12 : (t$7[s$6++] = 240 | r$11 >>> 18, t$7[s$6++] = 128 | r$11 >>> 12 & 63), t$7[s$6++] = 128 | r$11 >>> 6 & 63), t$7[s$6++] = 128 | 63 & r$11); return t$7; }(e$11); }, s$5.utf8decode = function(e$11) { return h$5.nodebuffer ? o$10.transformTo("nodebuffer", e$11).toString("utf-8") : function(e$12) { var t$7, r$11, n$10, i$8, s$6 = e$12.length, a$3 = new Array(2 * s$6); for (t$7 = r$11 = 0; t$7 < s$6;) if ((n$10 = e$12[t$7++]) < 128) a$3[r$11++] = n$10; else if (4 < (i$8 = u$4[n$10])) a$3[r$11++] = 65533, t$7 += i$8 - 1; else { for (n$10 &= 2 === i$8 ? 31 : 3 === i$8 ? 15 : 7; 1 < i$8 && t$7 < s$6;) n$10 = n$10 << 6 | 63 & e$12[t$7++], i$8--; 1 < i$8 ? a$3[r$11++] = 65533 : n$10 < 65536 ? a$3[r$11++] = n$10 : (n$10 -= 65536, a$3[r$11++] = 55296 | n$10 >> 10 & 1023, a$3[r$11++] = 56320 | 1023 & n$10); } return a$3.length !== r$11 && (a$3.subarray ? a$3 = a$3.subarray(0, r$11) : a$3.length = r$11), o$10.applyFromCharCode(a$3); }(e$11 = o$10.transformTo(h$5.uint8array ? "uint8array" : "array", e$11)); }, o$10.inherits(a$2, n$9), a$2.prototype.processChunk = function(e$11) { var t$7 = o$10.transformTo(h$5.uint8array ? "uint8array" : "array", e$11.data); if (this.leftOver && this.leftOver.length) { if (h$5.uint8array) { var r$11 = t$7; (t$7 = new Uint8Array(r$11.length + this.leftOver.length)).set(this.leftOver, 0), t$7.set(r$11, this.leftOver.length); } else t$7 = this.leftOver.concat(t$7); this.leftOver = null; } var n$10 = function(e$12, t$8) { var r$12; for ((t$8 = t$8 || e$12.length) > e$12.length && (t$8 = e$12.length), r$12 = t$8 - 1; 0 <= r$12 && 128 == (192 & e$12[r$12]);) r$12--; return r$12 < 0 ? t$8 : 0 === r$12 ? t$8 : r$12 + u$4[e$12[r$12]] > t$8 ? r$12 : t$8; }(t$7), i$8 = t$7; n$10 !== t$7.length && (h$5.uint8array ? (i$8 = t$7.subarray(0, n$10), this.leftOver = t$7.subarray(n$10, t$7.length)) : (i$8 = t$7.slice(0, n$10), this.leftOver = t$7.slice(n$10, t$7.length))), this.push({ data: s$5.utf8decode(i$8), meta: e$11.meta }); }, a$2.prototype.flush = function() { this.leftOver && this.leftOver.length && (this.push({ data: s$5.utf8decode(this.leftOver), meta: {} }), this.leftOver = null); }, s$5.Utf8DecodeWorker = a$2, o$10.inherits(l$3, n$9), l$3.prototype.processChunk = function(e$11) { this.push({ data: s$5.utf8encode(e$11.data), meta: e$11.meta }); }, s$5.Utf8EncodeWorker = l$3; }, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(e$10, t$6, a$2) { "use strict"; var o$10 = e$10("./support"), h$5 = e$10("./base64"), r$10 = e$10("./nodejsUtils"), u$4 = e$10("./external"); function n$9(e$11) { return e$11; } function l$3(e$11, t$7) { for (var r$11 = 0; r$11 < e$11.length; ++r$11) t$7[r$11] = 255 & e$11.charCodeAt(r$11); return t$7; } e$10("setimmediate"), a$2.newBlob = function(t$7, r$11) { a$2.checkSupport("blob"); try { return new Blob([t$7], { type: r$11 }); } catch (e$11) { try { var n$10 = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)(); return n$10.append(t$7), n$10.getBlob(r$11); } catch (e$12) { throw new Error("Bug : can't construct the Blob."); } } }; var i$7 = { stringifyByChunk: function(e$11, t$7, r$11) { var n$10 = [], i$8 = 0, s$6 = e$11.length; if (s$6 <= r$11) return String.fromCharCode.apply(null, e$11); for (; i$8 < s$6;) "array" === t$7 || "nodebuffer" === t$7 ? n$10.push(String.fromCharCode.apply(null, e$11.slice(i$8, Math.min(i$8 + r$11, s$6)))) : n$10.push(String.fromCharCode.apply(null, e$11.subarray(i$8, Math.min(i$8 + r$11, s$6)))), i$8 += r$11; return n$10.join(""); }, stringifyByChar: function(e$11) { for (var t$7 = "", r$11 = 0; r$11 < e$11.length; r$11++) t$7 += String.fromCharCode(e$11[r$11]); return t$7; }, applyCanBeUsed: { uint8array: function() { try { return o$10.uint8array && 1 === String.fromCharCode.apply(null, new Uint8Array(1)).length; } catch (e$11) { return !1; } }(), nodebuffer: function() { try { return o$10.nodebuffer && 1 === String.fromCharCode.apply(null, r$10.allocBuffer(1)).length; } catch (e$11) { return !1; } }() } }; function s$5(e$11) { var t$7 = 65536, r$11 = a$2.getTypeOf(e$11), n$10 = !0; if ("uint8array" === r$11 ? n$10 = i$7.applyCanBeUsed.uint8array : "nodebuffer" === r$11 && (n$10 = i$7.applyCanBeUsed.nodebuffer), n$10) for (; 1 < t$7;) try { return i$7.stringifyByChunk(e$11, r$11, t$7); } catch (e$12) { t$7 = Math.floor(t$7 / 2); } return i$7.stringifyByChar(e$11); } function f$4(e$11, t$7) { for (var r$11 = 0; r$11 < e$11.length; r$11++) t$7[r$11] = e$11[r$11]; return t$7; } a$2.applyFromCharCode = s$5; var c$7 = {}; c$7.string = { string: n$9, array: function(e$11) { return l$3(e$11, new Array(e$11.length)); }, arraybuffer: function(e$11) { return c$7.string.uint8array(e$11).buffer; }, uint8array: function(e$11) { return l$3(e$11, new Uint8Array(e$11.length)); }, nodebuffer: function(e$11) { return l$3(e$11, r$10.allocBuffer(e$11.length)); } }, c$7.array = { string: s$5, array: n$9, arraybuffer: function(e$11) { return new Uint8Array(e$11).buffer; }, uint8array: function(e$11) { return new Uint8Array(e$11); }, nodebuffer: function(e$11) { return r$10.newBufferFrom(e$11); } }, c$7.arraybuffer = { string: function(e$11) { return s$5(new Uint8Array(e$11)); }, array: function(e$11) { return f$4(new Uint8Array(e$11), new Array(e$11.byteLength)); }, arraybuffer: n$9, uint8array: function(e$11) { return new Uint8Array(e$11); }, nodebuffer: function(e$11) { return r$10.newBufferFrom(new Uint8Array(e$11)); } }, c$7.uint8array = { string: s$5, array: function(e$11) { return f$4(e$11, new Array(e$11.length)); }, arraybuffer: function(e$11) { return e$11.buffer; }, uint8array: n$9, nodebuffer: function(e$11) { return r$10.newBufferFrom(e$11); } }, c$7.nodebuffer = { string: s$5, array: function(e$11) { return f$4(e$11, new Array(e$11.length)); }, arraybuffer: function(e$11) { return c$7.nodebuffer.uint8array(e$11).buffer; }, uint8array: function(e$11) { return f$4(e$11, new Uint8Array(e$11.length)); }, nodebuffer: n$9 }, a$2.transformTo = function(e$11, t$7) { if (t$7 = t$7 || "", !e$11) return t$7; a$2.checkSupport(e$11); var r$11 = a$2.getTypeOf(t$7); return c$7[r$11][e$11](t$7); }, a$2.resolve = function(e$11) { for (var t$7 = e$11.split("/"), r$11 = [], n$10 = 0; n$10 < t$7.length; n$10++) { var i$8 = t$7[n$10]; "." === i$8 || "" === i$8 && 0 !== n$10 && n$10 !== t$7.length - 1 || (".." === i$8 ? r$11.pop() : r$11.push(i$8)); } return r$11.join("/"); }, a$2.getTypeOf = function(e$11) { return "string" == typeof e$11 ? "string" : "[object Array]" === Object.prototype.toString.call(e$11) ? "array" : o$10.nodebuffer && r$10.isBuffer(e$11) ? "nodebuffer" : o$10.uint8array && e$11 instanceof Uint8Array ? "uint8array" : o$10.arraybuffer && e$11 instanceof ArrayBuffer ? "arraybuffer" : void 0; }, a$2.checkSupport = function(e$11) { if (!o$10[e$11.toLowerCase()]) throw new Error(e$11 + " is not supported by this platform"); }, a$2.MAX_VALUE_16BITS = 65535, a$2.MAX_VALUE_32BITS = -1, a$2.pretty = function(e$11) { var t$7, r$11, n$10 = ""; for (r$11 = 0; r$11 < (e$11 || "").length; r$11++) n$10 += "\\x" + ((t$7 = e$11.charCodeAt(r$11)) < 16 ? "0" : "") + t$7.toString(16).toUpperCase(); return n$10; }, a$2.delay = function(e$11, t$7, r$11) { setImmediate(function() { e$11.apply(r$11 || null, t$7 || []); }); }, a$2.inherits = function(e$11, t$7) { function r$11() {} r$11.prototype = t$7.prototype, e$11.prototype = new r$11(); }, a$2.extend = function() { var e$11, t$7, r$11 = {}; for (e$11 = 0; e$11 < arguments.length; e$11++) for (t$7 in arguments[e$11]) Object.prototype.hasOwnProperty.call(arguments[e$11], t$7) && void 0 === r$11[t$7] && (r$11[t$7] = arguments[e$11][t$7]); return r$11; }, a$2.prepareContent = function(r$11, e$11, n$10, i$8, s$6) { return u$4.Promise.resolve(e$11).then(function(n$11) { return o$10.blob && (n$11 instanceof Blob || -1 !== ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(n$11))) && "undefined" != typeof FileReader ? new u$4.Promise(function(t$7, r$12) { var e$12 = new FileReader(); e$12.onload = function(e$13) { t$7(e$13.target.result); }, e$12.onerror = function(e$13) { r$12(e$13.target.error); }, e$12.readAsArrayBuffer(n$11); }) : n$11; }).then(function(e$12) { var t$7 = a$2.getTypeOf(e$12); return t$7 ? ("arraybuffer" === t$7 ? e$12 = a$2.transformTo("uint8array", e$12) : "string" === t$7 && (s$6 ? e$12 = h$5.decode(e$12) : n$10 && !0 !== i$8 && (e$12 = function(e$13) { return l$3(e$13, o$10.uint8array ? new Uint8Array(e$13.length) : new Array(e$13.length)); }(e$12))), e$12) : u$4.Promise.reject(new Error("Can't read the data of '" + r$11 + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?")); }); }; }, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(e$10, t$6, r$10) { "use strict"; var n$9 = e$10("./reader/readerFor"), i$7 = e$10("./utils"), s$5 = e$10("./signature"), a$2 = e$10("./zipEntry"), o$10 = e$10("./support"); function h$5(e$11) { this.files = [], this.loadOptions = e$11; } h$5.prototype = { checkSignature: function(e$11) { if (!this.reader.readAndCheckSignature(e$11)) { this.reader.index -= 4; var t$7 = this.reader.readString(4); throw new Error("Corrupted zip or bug: unexpected signature (" + i$7.pretty(t$7) + ", expected " + i$7.pretty(e$11) + ")"); } }, isSignature: function(e$11, t$7) { var r$11 = this.reader.index; this.reader.setIndex(e$11); var n$10 = this.reader.readString(4) === t$7; return this.reader.setIndex(r$11), n$10; }, readBlockEndOfCentral: function() { this.diskNumber = this.reader.readInt(2), this.diskWithCentralDirStart = this.reader.readInt(2), this.centralDirRecordsOnThisDisk = this.reader.readInt(2), this.centralDirRecords = this.reader.readInt(2), this.centralDirSize = this.reader.readInt(4), this.centralDirOffset = this.reader.readInt(4), this.zipCommentLength = this.reader.readInt(2); var e$11 = this.reader.readData(this.zipCommentLength), t$7 = o$10.uint8array ? "uint8array" : "array", r$11 = i$7.transformTo(t$7, e$11); this.zipComment = this.loadOptions.decodeFileName(r$11); }, readBlockZip64EndOfCentral: function() { this.zip64EndOfCentralSize = this.reader.readInt(8), this.reader.skip(4), this.diskNumber = this.reader.readInt(4), this.diskWithCentralDirStart = this.reader.readInt(4), this.centralDirRecordsOnThisDisk = this.reader.readInt(8), this.centralDirRecords = this.reader.readInt(8), this.centralDirSize = this.reader.readInt(8), this.centralDirOffset = this.reader.readInt(8), this.zip64ExtensibleData = {}; for (var e$11, t$7, r$11, n$10 = this.zip64EndOfCentralSize - 44; 0 < n$10;) e$11 = this.reader.readInt(2), t$7 = this.reader.readInt(4), r$11 = this.reader.readData(t$7), this.zip64ExtensibleData[e$11] = { id: e$11, length: t$7, value: r$11 }; }, readBlockZip64EndOfCentralLocator: function() { if (this.diskWithZip64CentralDirStart = this.reader.readInt(4), this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8), this.disksCount = this.reader.readInt(4), 1 < this.disksCount) throw new Error("Multi-volumes zip are not supported"); }, readLocalFiles: function() { var e$11, t$7; for (e$11 = 0; e$11 < this.files.length; e$11++) t$7 = this.files[e$11], this.reader.setIndex(t$7.localHeaderOffset), this.checkSignature(s$5.LOCAL_FILE_HEADER), t$7.readLocalPart(this.reader), t$7.handleUTF8(), t$7.processAttributes(); }, readCentralDir: function() { var e$11; for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(s$5.CENTRAL_FILE_HEADER);) (e$11 = new a$2({ zip64: this.zip64 }, this.loadOptions)).readCentralPart(this.reader), this.files.push(e$11); if (this.centralDirRecords !== this.files.length && 0 !== this.centralDirRecords && 0 === this.files.length) throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length); }, readEndOfCentral: function() { var e$11 = this.reader.lastIndexOfSignature(s$5.CENTRAL_DIRECTORY_END); if (e$11 < 0) throw !this.isSignature(0, s$5.LOCAL_FILE_HEADER) ? new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html") : new Error("Corrupted zip: can't find end of central directory"); this.reader.setIndex(e$11); var t$7 = e$11; if (this.checkSignature(s$5.CENTRAL_DIRECTORY_END), this.readBlockEndOfCentral(), this.diskNumber === i$7.MAX_VALUE_16BITS || this.diskWithCentralDirStart === i$7.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === i$7.MAX_VALUE_16BITS || this.centralDirRecords === i$7.MAX_VALUE_16BITS || this.centralDirSize === i$7.MAX_VALUE_32BITS || this.centralDirOffset === i$7.MAX_VALUE_32BITS) { if (this.zip64 = !0, (e$11 = this.reader.lastIndexOfSignature(s$5.ZIP64_CENTRAL_DIRECTORY_LOCATOR)) < 0) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator"); if (this.reader.setIndex(e$11), this.checkSignature(s$5.ZIP64_CENTRAL_DIRECTORY_LOCATOR), this.readBlockZip64EndOfCentralLocator(), !this.isSignature(this.relativeOffsetEndOfZip64CentralDir, s$5.ZIP64_CENTRAL_DIRECTORY_END) && (this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(s$5.ZIP64_CENTRAL_DIRECTORY_END), this.relativeOffsetEndOfZip64CentralDir < 0)) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory"); this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), this.checkSignature(s$5.ZIP64_CENTRAL_DIRECTORY_END), this.readBlockZip64EndOfCentral(); } var r$11 = this.centralDirOffset + this.centralDirSize; this.zip64 && (r$11 += 20, r$11 += 12 + this.zip64EndOfCentralSize); var n$10 = t$7 - r$11; if (0 < n$10) this.isSignature(t$7, s$5.CENTRAL_FILE_HEADER) || (this.reader.zero = n$10); else if (n$10 < 0) throw new Error("Corrupted zip: missing " + Math.abs(n$10) + " bytes."); }, prepareReader: function(e$11) { this.reader = n$9(e$11); }, load: function(e$11) { this.prepareReader(e$11), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles(); } }, t$6.exports = h$5; }, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(e$10, t$6, r$10) { "use strict"; var n$9 = e$10("./reader/readerFor"), s$5 = e$10("./utils"), i$7 = e$10("./compressedObject"), a$2 = e$10("./crc32"), o$10 = e$10("./utf8"), h$5 = e$10("./compressions"), u$4 = e$10("./support"); function l$3(e$11, t$7) { this.options = e$11, this.loadOptions = t$7; } l$3.prototype = { isEncrypted: function() { return 1 == (1 & this.bitFlag); }, useUTF8: function() { return 2048 == (2048 & this.bitFlag); }, readLocalPart: function(e$11) { var t$7, r$11; if (e$11.skip(22), this.fileNameLength = e$11.readInt(2), r$11 = e$11.readInt(2), this.fileName = e$11.readData(this.fileNameLength), e$11.skip(r$11), -1 === this.compressedSize || -1 === this.uncompressedSize) throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)"); if (null === (t$7 = function(e$12) { for (var t$8 in h$5) if (Object.prototype.hasOwnProperty.call(h$5, t$8) && h$5[t$8].magic === e$12) return h$5[t$8]; return null; }(this.compressionMethod))) throw new Error("Corrupted zip : compression " + s$5.pretty(this.compressionMethod) + " unknown (inner file : " + s$5.transformTo("string", this.fileName) + ")"); this.decompressed = new i$7(this.compressedSize, this.uncompressedSize, this.crc32, t$7, e$11.readData(this.compressedSize)); }, readCentralPart: function(e$11) { this.versionMadeBy = e$11.readInt(2), e$11.skip(2), this.bitFlag = e$11.readInt(2), this.compressionMethod = e$11.readString(2), this.date = e$11.readDate(), this.crc32 = e$11.readInt(4), this.compressedSize = e$11.readInt(4), this.uncompressedSize = e$11.readInt(4); var t$7 = e$11.readInt(2); if (this.extraFieldsLength = e$11.readInt(2), this.fileCommentLength = e$11.readInt(2), this.diskNumberStart = e$11.readInt(2), this.internalFileAttributes = e$11.readInt(2), this.externalFileAttributes = e$11.readInt(4), this.localHeaderOffset = e$11.readInt(4), this.isEncrypted()) throw new Error("Encrypted zip are not supported"); e$11.skip(t$7), this.readExtraFields(e$11), this.parseZIP64ExtraField(e$11), this.fileComment = e$11.readData(this.fileCommentLength); }, processAttributes: function() { this.unixPermissions = null, this.dosPermissions = null; var e$11 = this.versionMadeBy >> 8; this.dir = !!(16 & this.externalFileAttributes), 0 == e$11 && (this.dosPermissions = 63 & this.externalFileAttributes), 3 == e$11 && (this.unixPermissions = this.externalFileAttributes >> 16 & 65535), this.dir || "/" !== this.fileNameStr.slice(-1) || (this.dir = !0); }, parseZIP64ExtraField: function() { if (this.extraFields[1]) { var e$11 = n$9(this.extraFields[1].value); this.uncompressedSize === s$5.MAX_VALUE_32BITS && (this.uncompressedSize = e$11.readInt(8)), this.compressedSize === s$5.MAX_VALUE_32BITS && (this.compressedSize = e$11.readInt(8)), this.localHeaderOffset === s$5.MAX_VALUE_32BITS && (this.localHeaderOffset = e$11.readInt(8)), this.diskNumberStart === s$5.MAX_VALUE_32BITS && (this.diskNumberStart = e$11.readInt(4)); } }, readExtraFields: function(e$11) { var t$7, r$11, n$10, i$8 = e$11.index + this.extraFieldsLength; for (this.extraFields || (this.extraFields = {}); e$11.index + 4 < i$8;) t$7 = e$11.readInt(2), r$11 = e$11.readInt(2), n$10 = e$11.readData(r$11), this.extraFields[t$7] = { id: t$7, length: r$11, value: n$10 }; e$11.setIndex(i$8); }, handleUTF8: function() { var e$11 = u$4.uint8array ? "uint8array" : "array"; if (this.useUTF8()) this.fileNameStr = o$10.utf8decode(this.fileName), this.fileCommentStr = o$10.utf8decode(this.fileComment); else { var t$7 = this.findExtraFieldUnicodePath(); if (null !== t$7) this.fileNameStr = t$7; else { var r$11 = s$5.transformTo(e$11, this.fileName); this.fileNameStr = this.loadOptions.decodeFileName(r$11); } var n$10 = this.findExtraFieldUnicodeComment(); if (null !== n$10) this.fileCommentStr = n$10; else { var i$8 = s$5.transformTo(e$11, this.fileComment); this.fileCommentStr = this.loadOptions.decodeFileName(i$8); } } }, findExtraFieldUnicodePath: function() { var e$11 = this.extraFields[28789]; if (e$11) { var t$7 = n$9(e$11.value); return 1 !== t$7.readInt(1) ? null : a$2(this.fileName) !== t$7.readInt(4) ? null : o$10.utf8decode(t$7.readData(e$11.length - 5)); } return null; }, findExtraFieldUnicodeComment: function() { var e$11 = this.extraFields[25461]; if (e$11) { var t$7 = n$9(e$11.value); return 1 !== t$7.readInt(1) ? null : a$2(this.fileComment) !== t$7.readInt(4) ? null : o$10.utf8decode(t$7.readData(e$11.length - 5)); } return null; } }, t$6.exports = l$3; }, { "./compressedObject": 2, "./compressions": 3, "./crc32": 4, "./reader/readerFor": 22, "./support": 30, "./utf8": 31, "./utils": 32 }], 35: [function(e$10, t$6, r$10) { "use strict"; function n$9(e$11, t$7, r$11) { this.name = e$11, this.dir = r$11.dir, this.date = r$11.date, this.comment = r$11.comment, this.unixPermissions = r$11.unixPermissions, this.dosPermissions = r$11.dosPermissions, this._data = t$7, this._dataBinary = r$11.binary, this.options = { compression: r$11.compression, compressionOptions: r$11.compressionOptions }; } var s$5 = e$10("./stream/StreamHelper"), i$7 = e$10("./stream/DataWorker"), a$2 = e$10("./utf8"), o$10 = e$10("./compressedObject"), h$5 = e$10("./stream/GenericWorker"); n$9.prototype = { internalStream: function(e$11) { var t$7 = null, r$11 = "string"; try { if (!e$11) throw new Error("No output type specified."); var n$10 = "string" === (r$11 = e$11.toLowerCase()) || "text" === r$11; "binarystring" !== r$11 && "text" !== r$11 || (r$11 = "string"), t$7 = this._decompressWorker(); var i$8 = !this._dataBinary; i$8 && !n$10 && (t$7 = t$7.pipe(new a$2.Utf8EncodeWorker())), !i$8 && n$10 && (t$7 = t$7.pipe(new a$2.Utf8DecodeWorker())); } catch (e$12) { (t$7 = new h$5("error")).error(e$12); } return new s$5(t$7, r$11, ""); }, async: function(e$11, t$7) { return this.internalStream(e$11).accumulate(t$7); }, nodeStream: function(e$11, t$7) { return this.internalStream(e$11 || "nodebuffer").toNodejsStream(t$7); }, _compressWorker: function(e$11, t$7) { if (this._data instanceof o$10 && this._data.compression.magic === e$11.magic) return this._data.getCompressedWorker(); var r$11 = this._decompressWorker(); return this._dataBinary || (r$11 = r$11.pipe(new a$2.Utf8EncodeWorker())), o$10.createWorkerFrom(r$11, e$11, t$7); }, _decompressWorker: function() { return this._data instanceof o$10 ? this._data.getContentWorker() : this._data instanceof h$5 ? this._data : new i$7(this._data); } }; for (var u$4 = [ "asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer" ], l$3 = function() { throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); }, f$4 = 0; f$4 < u$4.length; f$4++) n$9.prototype[u$4[f$4]] = l$3; t$6.exports = n$9; }, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(e$10, l$3, t$6) { (function(t$7) { "use strict"; var r$10, n$9, e$11 = t$7.MutationObserver || t$7.WebKitMutationObserver; if (e$11) { var i$7 = 0, s$5 = new e$11(u$4), a$2 = t$7.document.createTextNode(""); s$5.observe(a$2, { characterData: !0 }), r$10 = function() { a$2.data = i$7 = ++i$7 % 2; }; } else if (t$7.setImmediate || void 0 === t$7.MessageChannel) r$10 = "document" in t$7 && "onreadystatechange" in t$7.document.createElement("script") ? function() { var e$12 = t$7.document.createElement("script"); e$12.onreadystatechange = function() { u$4(), e$12.onreadystatechange = null, e$12.parentNode.removeChild(e$12), e$12 = null; }, t$7.document.documentElement.appendChild(e$12); } : function() { setTimeout(u$4, 0); }; else { var o$10 = new t$7.MessageChannel(); o$10.port1.onmessage = u$4, r$10 = function() { o$10.port2.postMessage(0); }; } var h$5 = []; function u$4() { var e$12, t$8; n$9 = !0; for (var r$11 = h$5.length; r$11;) { for (t$8 = h$5, h$5 = [], e$12 = -1; ++e$12 < r$11;) t$8[e$12](); r$11 = h$5.length; } n$9 = !1; } l$3.exports = function(e$12) { 1 !== h$5.push(e$12) || n$9 || r$10(); }; }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}); }, {}], 37: [function(e$10, t$6, r$10) { "use strict"; var i$7 = e$10("immediate"); function u$4() {} var l$3 = {}, s$5 = ["REJECTED"], a$2 = ["FULFILLED"], n$9 = ["PENDING"]; function o$10(e$11) { if ("function" != typeof e$11) throw new TypeError("resolver must be a function"); this.state = n$9, this.queue = [], this.outcome = void 0, e$11 !== u$4 && d$5(this, e$11); } function h$5(e$11, t$7, r$11) { this.promise = e$11, "function" == typeof t$7 && (this.onFulfilled = t$7, this.callFulfilled = this.otherCallFulfilled), "function" == typeof r$11 && (this.onRejected = r$11, this.callRejected = this.otherCallRejected); } function f$4(t$7, r$11, n$10) { i$7(function() { var e$11; try { e$11 = r$11(n$10); } catch (e$12) { return l$3.reject(t$7, e$12); } e$11 === t$7 ? l$3.reject(t$7, new TypeError("Cannot resolve promise with itself")) : l$3.resolve(t$7, e$11); }); } function c$7(e$11) { var t$7 = e$11 && e$11.then; if (e$11 && ("object" == typeof e$11 || "function" == typeof e$11) && "function" == typeof t$7) return function() { t$7.apply(e$11, arguments); }; } function d$5(t$7, e$11) { var r$11 = !1; function n$10(e$12) { r$11 || (r$11 = !0, l$3.reject(t$7, e$12)); } function i$8(e$12) { r$11 || (r$11 = !0, l$3.resolve(t$7, e$12)); } var s$6 = p$3(function() { e$11(i$8, n$10); }); "error" === s$6.status && n$10(s$6.value); } function p$3(e$11, t$7) { var r$11 = {}; try { r$11.value = e$11(t$7), r$11.status = "success"; } catch (e$12) { r$11.status = "error", r$11.value = e$12; } return r$11; } (t$6.exports = o$10).prototype.finally = function(t$7) { if ("function" != typeof t$7) return this; var r$11 = this.constructor; return this.then(function(e$11) { return r$11.resolve(t$7()).then(function() { return e$11; }); }, function(e$11) { return r$11.resolve(t$7()).then(function() { throw e$11; }); }); }, o$10.prototype.catch = function(e$11) { return this.then(null, e$11); }, o$10.prototype.then = function(e$11, t$7) { if ("function" != typeof e$11 && this.state === a$2 || "function" != typeof t$7 && this.state === s$5) return this; var r$11 = new this.constructor(u$4); this.state !== n$9 ? f$4(r$11, this.state === a$2 ? e$11 : t$7, this.outcome) : this.queue.push(new h$5(r$11, e$11, t$7)); return r$11; }, h$5.prototype.callFulfilled = function(e$11) { l$3.resolve(this.promise, e$11); }, h$5.prototype.otherCallFulfilled = function(e$11) { f$4(this.promise, this.onFulfilled, e$11); }, h$5.prototype.callRejected = function(e$11) { l$3.reject(this.promise, e$11); }, h$5.prototype.otherCallRejected = function(e$11) { f$4(this.promise, this.onRejected, e$11); }, l$3.resolve = function(e$11, t$7) { var r$11 = p$3(c$7, t$7); if ("error" === r$11.status) return l$3.reject(e$11, r$11.value); var n$10 = r$11.value; if (n$10) d$5(e$11, n$10); else { e$11.state = a$2, e$11.outcome = t$7; for (var i$8 = -1, s$6 = e$11.queue.length; ++i$8 < s$6;) e$11.queue[i$8].callFulfilled(t$7); } return e$11; }, l$3.reject = function(e$11, t$7) { e$11.state = s$5, e$11.outcome = t$7; for (var r$11 = -1, n$10 = e$11.queue.length; ++r$11 < n$10;) e$11.queue[r$11].callRejected(t$7); return e$11; }, o$10.resolve = function(e$11) { if (e$11 instanceof this) return e$11; return l$3.resolve(new this(u$4), e$11); }, o$10.reject = function(e$11) { var t$7 = new this(u$4); return l$3.reject(t$7, e$11); }, o$10.all = function(e$11) { var r$11 = this; if ("[object Array]" !== Object.prototype.toString.call(e$11)) return this.reject(new TypeError("must be an array")); var n$10 = e$11.length, i$8 = !1; if (!n$10) return this.resolve([]); var s$6 = new Array(n$10), a$3 = 0, t$7 = -1, o$11 = new this(u$4); for (; ++t$7 < n$10;) h$6(e$11[t$7], t$7); return o$11; function h$6(e$12, t$8) { r$11.resolve(e$12).then(function(e$13) { s$6[t$8] = e$13, ++a$3 !== n$10 || i$8 || (i$8 = !0, l$3.resolve(o$11, s$6)); }, function(e$13) { i$8 || (i$8 = !0, l$3.reject(o$11, e$13)); }); } }, o$10.race = function(e$11) { var t$7 = this; if ("[object Array]" !== Object.prototype.toString.call(e$11)) return this.reject(new TypeError("must be an array")); var r$11 = e$11.length, n$10 = !1; if (!r$11) return this.resolve([]); var i$8 = -1, s$6 = new this(u$4); for (; ++i$8 < r$11;) a$3 = e$11[i$8], t$7.resolve(a$3).then(function(e$12) { n$10 || (n$10 = !0, l$3.resolve(s$6, e$12)); }, function(e$12) { n$10 || (n$10 = !0, l$3.reject(s$6, e$12)); }); var a$3; return s$6; }; }, { immediate: 36 }], 38: [function(e$10, t$6, r$10) { "use strict"; var n$9 = {}; (0, e$10("./lib/utils/common").assign)(n$9, e$10("./lib/deflate"), e$10("./lib/inflate"), e$10("./lib/zlib/constants")), t$6.exports = n$9; }, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(e$10, t$6, r$10) { "use strict"; var a$2 = e$10("./zlib/deflate"), o$10 = e$10("./utils/common"), h$5 = e$10("./utils/strings"), i$7 = e$10("./zlib/messages"), s$5 = e$10("./zlib/zstream"), u$4 = Object.prototype.toString, l$3 = 0, f$4 = -1, c$7 = 0, d$5 = 8; function p$3(e$11) { if (!(this instanceof p$3)) return new p$3(e$11); this.options = o$10.assign({ level: f$4, method: d$5, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: c$7, to: "" }, e$11 || {}); var t$7 = this.options; t$7.raw && 0 < t$7.windowBits ? t$7.windowBits = -t$7.windowBits : t$7.gzip && 0 < t$7.windowBits && t$7.windowBits < 16 && (t$7.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new s$5(), this.strm.avail_out = 0; var r$11 = a$2.deflateInit2(this.strm, t$7.level, t$7.method, t$7.windowBits, t$7.memLevel, t$7.strategy); if (r$11 !== l$3) throw new Error(i$7[r$11]); if (t$7.header && a$2.deflateSetHeader(this.strm, t$7.header), t$7.dictionary) { var n$10; if (n$10 = "string" == typeof t$7.dictionary ? h$5.string2buf(t$7.dictionary) : "[object ArrayBuffer]" === u$4.call(t$7.dictionary) ? new Uint8Array(t$7.dictionary) : t$7.dictionary, (r$11 = a$2.deflateSetDictionary(this.strm, n$10)) !== l$3) throw new Error(i$7[r$11]); this._dict_set = !0; } } function n$9(e$11, t$7) { var r$11 = new p$3(t$7); if (r$11.push(e$11, !0), r$11.err) throw r$11.msg || i$7[r$11.err]; return r$11.result; } p$3.prototype.push = function(e$11, t$7) { var r$11, n$10, i$8 = this.strm, s$6 = this.options.chunkSize; if (this.ended) return !1; n$10 = t$7 === ~~t$7 ? t$7 : !0 === t$7 ? 4 : 0, "string" == typeof e$11 ? i$8.input = h$5.string2buf(e$11) : "[object ArrayBuffer]" === u$4.call(e$11) ? i$8.input = new Uint8Array(e$11) : i$8.input = e$11, i$8.next_in = 0, i$8.avail_in = i$8.input.length; do { if (0 === i$8.avail_out && (i$8.output = new o$10.Buf8(s$6), i$8.next_out = 0, i$8.avail_out = s$6), 1 !== (r$11 = a$2.deflate(i$8, n$10)) && r$11 !== l$3) return this.onEnd(r$11), !(this.ended = !0); 0 !== i$8.avail_out && (0 !== i$8.avail_in || 4 !== n$10 && 2 !== n$10) || ("string" === this.options.to ? this.onData(h$5.buf2binstring(o$10.shrinkBuf(i$8.output, i$8.next_out))) : this.onData(o$10.shrinkBuf(i$8.output, i$8.next_out))); } while ((0 < i$8.avail_in || 0 === i$8.avail_out) && 1 !== r$11); return 4 === n$10 ? (r$11 = a$2.deflateEnd(this.strm), this.onEnd(r$11), this.ended = !0, r$11 === l$3) : 2 !== n$10 || (this.onEnd(l$3), !(i$8.avail_out = 0)); }, p$3.prototype.onData = function(e$11) { this.chunks.push(e$11); }, p$3.prototype.onEnd = function(e$11) { e$11 === l$3 && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = o$10.flattenChunks(this.chunks)), this.chunks = [], this.err = e$11, this.msg = this.strm.msg; }, r$10.Deflate = p$3, r$10.deflate = n$9, r$10.deflateRaw = function(e$11, t$7) { return (t$7 = t$7 || {}).raw = !0, n$9(e$11, t$7); }, r$10.gzip = function(e$11, t$7) { return (t$7 = t$7 || {}).gzip = !0, n$9(e$11, t$7); }; }, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(e$10, t$6, r$10) { "use strict"; var c$7 = e$10("./zlib/inflate"), d$5 = e$10("./utils/common"), p$3 = e$10("./utils/strings"), m$3 = e$10("./zlib/constants"), n$9 = e$10("./zlib/messages"), i$7 = e$10("./zlib/zstream"), s$5 = e$10("./zlib/gzheader"), _$2 = Object.prototype.toString; function a$2(e$11) { if (!(this instanceof a$2)) return new a$2(e$11); this.options = d$5.assign({ chunkSize: 16384, windowBits: 0, to: "" }, e$11 || {}); var t$7 = this.options; t$7.raw && 0 <= t$7.windowBits && t$7.windowBits < 16 && (t$7.windowBits = -t$7.windowBits, 0 === t$7.windowBits && (t$7.windowBits = -15)), !(0 <= t$7.windowBits && t$7.windowBits < 16) || e$11 && e$11.windowBits || (t$7.windowBits += 32), 15 < t$7.windowBits && t$7.windowBits < 48 && 0 == (15 & t$7.windowBits) && (t$7.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new i$7(), this.strm.avail_out = 0; var r$11 = c$7.inflateInit2(this.strm, t$7.windowBits); if (r$11 !== m$3.Z_OK) throw new Error(n$9[r$11]); this.header = new s$5(), c$7.inflateGetHeader(this.strm, this.header); } function o$10(e$11, t$7) { var r$11 = new a$2(t$7); if (r$11.push(e$11, !0), r$11.err) throw r$11.msg || n$9[r$11.err]; return r$11.result; } a$2.prototype.push = function(e$11, t$7) { var r$11, n$10, i$8, s$6, a$3, o$11, h$5 = this.strm, u$4 = this.options.chunkSize, l$3 = this.options.dictionary, f$4 = !1; if (this.ended) return !1; n$10 = t$7 === ~~t$7 ? t$7 : !0 === t$7 ? m$3.Z_FINISH : m$3.Z_NO_FLUSH, "string" == typeof e$11 ? h$5.input = p$3.binstring2buf(e$11) : "[object ArrayBuffer]" === _$2.call(e$11) ? h$5.input = new Uint8Array(e$11) : h$5.input = e$11, h$5.next_in = 0, h$5.avail_in = h$5.input.length; do { if (0 === h$5.avail_out && (h$5.output = new d$5.Buf8(u$4), h$5.next_out = 0, h$5.avail_out = u$4), (r$11 = c$7.inflate(h$5, m$3.Z_NO_FLUSH)) === m$3.Z_NEED_DICT && l$3 && (o$11 = "string" == typeof l$3 ? p$3.string2buf(l$3) : "[object ArrayBuffer]" === _$2.call(l$3) ? new Uint8Array(l$3) : l$3, r$11 = c$7.inflateSetDictionary(this.strm, o$11)), r$11 === m$3.Z_BUF_ERROR && !0 === f$4 && (r$11 = m$3.Z_OK, f$4 = !1), r$11 !== m$3.Z_STREAM_END && r$11 !== m$3.Z_OK) return this.onEnd(r$11), !(this.ended = !0); h$5.next_out && (0 !== h$5.avail_out && r$11 !== m$3.Z_STREAM_END && (0 !== h$5.avail_in || n$10 !== m$3.Z_FINISH && n$10 !== m$3.Z_SYNC_FLUSH) || ("string" === this.options.to ? (i$8 = p$3.utf8border(h$5.output, h$5.next_out), s$6 = h$5.next_out - i$8, a$3 = p$3.buf2string(h$5.output, i$8), h$5.next_out = s$6, h$5.avail_out = u$4 - s$6, s$6 && d$5.arraySet(h$5.output, h$5.output, i$8, s$6, 0), this.onData(a$3)) : this.onData(d$5.shrinkBuf(h$5.output, h$5.next_out)))), 0 === h$5.avail_in && 0 === h$5.avail_out && (f$4 = !0); } while ((0 < h$5.avail_in || 0 === h$5.avail_out) && r$11 !== m$3.Z_STREAM_END); return r$11 === m$3.Z_STREAM_END && (n$10 = m$3.Z_FINISH), n$10 === m$3.Z_FINISH ? (r$11 = c$7.inflateEnd(this.strm), this.onEnd(r$11), this.ended = !0, r$11 === m$3.Z_OK) : n$10 !== m$3.Z_SYNC_FLUSH || (this.onEnd(m$3.Z_OK), !(h$5.avail_out = 0)); }, a$2.prototype.onData = function(e$11) { this.chunks.push(e$11); }, a$2.prototype.onEnd = function(e$11) { e$11 === m$3.Z_OK && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = d$5.flattenChunks(this.chunks)), this.chunks = [], this.err = e$11, this.msg = this.strm.msg; }, r$10.Inflate = a$2, r$10.inflate = o$10, r$10.inflateRaw = function(e$11, t$7) { return (t$7 = t$7 || {}).raw = !0, o$10(e$11, t$7); }, r$10.ungzip = o$10; }, { "./utils/common": 41, "./utils/strings": 42, "./zlib/constants": 44, "./zlib/gzheader": 47, "./zlib/inflate": 49, "./zlib/messages": 51, "./zlib/zstream": 53 }], 41: [function(e$10, t$6, r$10) { "use strict"; var n$9 = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Int32Array; r$10.assign = function(e$11) { for (var t$7 = Array.prototype.slice.call(arguments, 1); t$7.length;) { var r$11 = t$7.shift(); if (r$11) { if ("object" != typeof r$11) throw new TypeError(r$11 + "must be non-object"); for (var n$10 in r$11) r$11.hasOwnProperty(n$10) && (e$11[n$10] = r$11[n$10]); } } return e$11; }, r$10.shrinkBuf = function(e$11, t$7) { return e$11.length === t$7 ? e$11 : e$11.subarray ? e$11.subarray(0, t$7) : (e$11.length = t$7, e$11); }; var i$7 = { arraySet: function(e$11, t$7, r$11, n$10, i$8) { if (t$7.subarray && e$11.subarray) e$11.set(t$7.subarray(r$11, r$11 + n$10), i$8); else for (var s$6 = 0; s$6 < n$10; s$6++) e$11[i$8 + s$6] = t$7[r$11 + s$6]; }, flattenChunks: function(e$11) { var t$7, r$11, n$10, i$8, s$6, a$2; for (t$7 = n$10 = 0, r$11 = e$11.length; t$7 < r$11; t$7++) n$10 += e$11[t$7].length; for (a$2 = new Uint8Array(n$10), t$7 = i$8 = 0, r$11 = e$11.length; t$7 < r$11; t$7++) s$6 = e$11[t$7], a$2.set(s$6, i$8), i$8 += s$6.length; return a$2; } }, s$5 = { arraySet: function(e$11, t$7, r$11, n$10, i$8) { for (var s$6 = 0; s$6 < n$10; s$6++) e$11[i$8 + s$6] = t$7[r$11 + s$6]; }, flattenChunks: function(e$11) { return [].concat.apply([], e$11); } }; r$10.setTyped = function(e$11) { e$11 ? (r$10.Buf8 = Uint8Array, r$10.Buf16 = Uint16Array, r$10.Buf32 = Int32Array, r$10.assign(r$10, i$7)) : (r$10.Buf8 = Array, r$10.Buf16 = Array, r$10.Buf32 = Array, r$10.assign(r$10, s$5)); }, r$10.setTyped(n$9); }, {}], 42: [function(e$10, t$6, r$10) { "use strict"; var h$5 = e$10("./common"), i$7 = !0, s$5 = !0; try { String.fromCharCode.apply(null, [0]); } catch (e$11) { i$7 = !1; } try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (e$11) { s$5 = !1; } for (var u$4 = new h$5.Buf8(256), n$9 = 0; n$9 < 256; n$9++) u$4[n$9] = 252 <= n$9 ? 6 : 248 <= n$9 ? 5 : 240 <= n$9 ? 4 : 224 <= n$9 ? 3 : 192 <= n$9 ? 2 : 1; function l$3(e$11, t$7) { if (t$7 < 65537 && (e$11.subarray && s$5 || !e$11.subarray && i$7)) return String.fromCharCode.apply(null, h$5.shrinkBuf(e$11, t$7)); for (var r$11 = "", n$10 = 0; n$10 < t$7; n$10++) r$11 += String.fromCharCode(e$11[n$10]); return r$11; } u$4[254] = u$4[254] = 1, r$10.string2buf = function(e$11) { var t$7, r$11, n$10, i$8, s$6, a$2 = e$11.length, o$10 = 0; for (i$8 = 0; i$8 < a$2; i$8++) 55296 == (64512 & (r$11 = e$11.charCodeAt(i$8))) && i$8 + 1 < a$2 && 56320 == (64512 & (n$10 = e$11.charCodeAt(i$8 + 1))) && (r$11 = 65536 + (r$11 - 55296 << 10) + (n$10 - 56320), i$8++), o$10 += r$11 < 128 ? 1 : r$11 < 2048 ? 2 : r$11 < 65536 ? 3 : 4; for (t$7 = new h$5.Buf8(o$10), i$8 = s$6 = 0; s$6 < o$10; i$8++) 55296 == (64512 & (r$11 = e$11.charCodeAt(i$8))) && i$8 + 1 < a$2 && 56320 == (64512 & (n$10 = e$11.charCodeAt(i$8 + 1))) && (r$11 = 65536 + (r$11 - 55296 << 10) + (n$10 - 56320), i$8++), r$11 < 128 ? t$7[s$6++] = r$11 : (r$11 < 2048 ? t$7[s$6++] = 192 | r$11 >>> 6 : (r$11 < 65536 ? t$7[s$6++] = 224 | r$11 >>> 12 : (t$7[s$6++] = 240 | r$11 >>> 18, t$7[s$6++] = 128 | r$11 >>> 12 & 63), t$7[s$6++] = 128 | r$11 >>> 6 & 63), t$7[s$6++] = 128 | 63 & r$11); return t$7; }, r$10.buf2binstring = function(e$11) { return l$3(e$11, e$11.length); }, r$10.binstring2buf = function(e$11) { for (var t$7 = new h$5.Buf8(e$11.length), r$11 = 0, n$10 = t$7.length; r$11 < n$10; r$11++) t$7[r$11] = e$11.charCodeAt(r$11); return t$7; }, r$10.buf2string = function(e$11, t$7) { var r$11, n$10, i$8, s$6, a$2 = t$7 || e$11.length, o$10 = new Array(2 * a$2); for (r$11 = n$10 = 0; r$11 < a$2;) if ((i$8 = e$11[r$11++]) < 128) o$10[n$10++] = i$8; else if (4 < (s$6 = u$4[i$8])) o$10[n$10++] = 65533, r$11 += s$6 - 1; else { for (i$8 &= 2 === s$6 ? 31 : 3 === s$6 ? 15 : 7; 1 < s$6 && r$11 < a$2;) i$8 = i$8 << 6 | 63 & e$11[r$11++], s$6--; 1 < s$6 ? o$10[n$10++] = 65533 : i$8 < 65536 ? o$10[n$10++] = i$8 : (i$8 -= 65536, o$10[n$10++] = 55296 | i$8 >> 10 & 1023, o$10[n$10++] = 56320 | 1023 & i$8); } return l$3(o$10, n$10); }, r$10.utf8border = function(e$11, t$7) { var r$11; for ((t$7 = t$7 || e$11.length) > e$11.length && (t$7 = e$11.length), r$11 = t$7 - 1; 0 <= r$11 && 128 == (192 & e$11[r$11]);) r$11--; return r$11 < 0 ? t$7 : 0 === r$11 ? t$7 : r$11 + u$4[e$11[r$11]] > t$7 ? r$11 : t$7; }; }, { "./common": 41 }], 43: [function(e$10, t$6, r$10) { "use strict"; t$6.exports = function(e$11, t$7, r$11, n$9) { for (var i$7 = 65535 & e$11 | 0, s$5 = e$11 >>> 16 & 65535 | 0, a$2 = 0; 0 !== r$11;) { for (r$11 -= a$2 = 2e3 < r$11 ? 2e3 : r$11; s$5 = s$5 + (i$7 = i$7 + t$7[n$9++] | 0) | 0, --a$2;); i$7 %= 65521, s$5 %= 65521; } return i$7 | s$5 << 16 | 0; }; }, {}], 44: [function(e$10, t$6, r$10) { "use strict"; t$6.exports = { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_BUF_ERROR: -5, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, Z_BINARY: 0, Z_TEXT: 1, Z_UNKNOWN: 2, Z_DEFLATED: 8 }; }, {}], 45: [function(e$10, t$6, r$10) { "use strict"; var o$10 = function() { for (var e$11, t$7 = [], r$11 = 0; r$11 < 256; r$11++) { e$11 = r$11; for (var n$9 = 0; n$9 < 8; n$9++) e$11 = 1 & e$11 ? 3988292384 ^ e$11 >>> 1 : e$11 >>> 1; t$7[r$11] = e$11; } return t$7; }(); t$6.exports = function(e$11, t$7, r$11, n$9) { var i$7 = o$10, s$5 = n$9 + r$11; e$11 ^= -1; for (var a$2 = n$9; a$2 < s$5; a$2++) e$11 = e$11 >>> 8 ^ i$7[255 & (e$11 ^ t$7[a$2])]; return -1 ^ e$11; }; }, {}], 46: [function(e$10, t$6, r$10) { "use strict"; var h$5, c$7 = e$10("../utils/common"), u$4 = e$10("./trees"), d$5 = e$10("./adler32"), p$3 = e$10("./crc32"), n$9 = e$10("./messages"), l$3 = 0, f$4 = 4, m$3 = 0, _$2 = -2, g$1 = -1, b$3 = 4, i$7 = 2, v$3 = 8, y$3 = 9, s$5 = 286, a$2 = 30, o$10 = 19, w$2 = 2 * s$5 + 1, k$2 = 15, x$2 = 3, S$4 = 258, z$2 = S$4 + x$2 + 1, C$2 = 42, E$2 = 113, A$1 = 1, I$2 = 2, O = 3, B$2 = 4; function R$1(e$11, t$7) { return e$11.msg = n$9[t$7], t$7; } function T$3(e$11) { return (e$11 << 1) - (4 < e$11 ? 9 : 0); } function D$2(e$11) { for (var t$7 = e$11.length; 0 <= --t$7;) e$11[t$7] = 0; } function F$1(e$11) { var t$7 = e$11.state, r$11 = t$7.pending; r$11 > e$11.avail_out && (r$11 = e$11.avail_out), 0 !== r$11 && (c$7.arraySet(e$11.output, t$7.pending_buf, t$7.pending_out, r$11, e$11.next_out), e$11.next_out += r$11, t$7.pending_out += r$11, e$11.total_out += r$11, e$11.avail_out -= r$11, t$7.pending -= r$11, 0 === t$7.pending && (t$7.pending_out = 0)); } function N$2(e$11, t$7) { u$4._tr_flush_block(e$11, 0 <= e$11.block_start ? e$11.block_start : -1, e$11.strstart - e$11.block_start, t$7), e$11.block_start = e$11.strstart, F$1(e$11.strm); } function U$1(e$11, t$7) { e$11.pending_buf[e$11.pending++] = t$7; } function P$2(e$11, t$7) { e$11.pending_buf[e$11.pending++] = t$7 >>> 8 & 255, e$11.pending_buf[e$11.pending++] = 255 & t$7; } function L$2(e$11, t$7) { var r$11, n$10, i$8 = e$11.max_chain_length, s$6 = e$11.strstart, a$3 = e$11.prev_length, o$11 = e$11.nice_match, h$6 = e$11.strstart > e$11.w_size - z$2 ? e$11.strstart - (e$11.w_size - z$2) : 0, u$5 = e$11.window, l$4 = e$11.w_mask, f$5 = e$11.prev, c$8 = e$11.strstart + S$4, d$6 = u$5[s$6 + a$3 - 1], p$4 = u$5[s$6 + a$3]; e$11.prev_length >= e$11.good_match && (i$8 >>= 2), o$11 > e$11.lookahead && (o$11 = e$11.lookahead); do { if (u$5[(r$11 = t$7) + a$3] === p$4 && u$5[r$11 + a$3 - 1] === d$6 && u$5[r$11] === u$5[s$6] && u$5[++r$11] === u$5[s$6 + 1]) { s$6 += 2, r$11++; do {} while (u$5[++s$6] === u$5[++r$11] && u$5[++s$6] === u$5[++r$11] && u$5[++s$6] === u$5[++r$11] && u$5[++s$6] === u$5[++r$11] && u$5[++s$6] === u$5[++r$11] && u$5[++s$6] === u$5[++r$11] && u$5[++s$6] === u$5[++r$11] && u$5[++s$6] === u$5[++r$11] && s$6 < c$8); if (n$10 = S$4 - (c$8 - s$6), s$6 = c$8 - S$4, a$3 < n$10) { if (e$11.match_start = t$7, o$11 <= (a$3 = n$10)) break; d$6 = u$5[s$6 + a$3 - 1], p$4 = u$5[s$6 + a$3]; } } } while ((t$7 = f$5[t$7 & l$4]) > h$6 && 0 != --i$8); return a$3 <= e$11.lookahead ? a$3 : e$11.lookahead; } function j$2(e$11) { var t$7, r$11, n$10, i$8, s$6, a$3, o$11, h$6, u$5, l$4, f$5 = e$11.w_size; do { if (i$8 = e$11.window_size - e$11.lookahead - e$11.strstart, e$11.strstart >= f$5 + (f$5 - z$2)) { for (c$7.arraySet(e$11.window, e$11.window, f$5, f$5, 0), e$11.match_start -= f$5, e$11.strstart -= f$5, e$11.block_start -= f$5, t$7 = r$11 = e$11.hash_size; n$10 = e$11.head[--t$7], e$11.head[t$7] = f$5 <= n$10 ? n$10 - f$5 : 0, --r$11;); for (t$7 = r$11 = f$5; n$10 = e$11.prev[--t$7], e$11.prev[t$7] = f$5 <= n$10 ? n$10 - f$5 : 0, --r$11;); i$8 += f$5; } if (0 === e$11.strm.avail_in) break; if (a$3 = e$11.strm, o$11 = e$11.window, h$6 = e$11.strstart + e$11.lookahead, u$5 = i$8, l$4 = void 0, l$4 = a$3.avail_in, u$5 < l$4 && (l$4 = u$5), r$11 = 0 === l$4 ? 0 : (a$3.avail_in -= l$4, c$7.arraySet(o$11, a$3.input, a$3.next_in, l$4, h$6), 1 === a$3.state.wrap ? a$3.adler = d$5(a$3.adler, o$11, l$4, h$6) : 2 === a$3.state.wrap && (a$3.adler = p$3(a$3.adler, o$11, l$4, h$6)), a$3.next_in += l$4, a$3.total_in += l$4, l$4), e$11.lookahead += r$11, e$11.lookahead + e$11.insert >= x$2) for (s$6 = e$11.strstart - e$11.insert, e$11.ins_h = e$11.window[s$6], e$11.ins_h = (e$11.ins_h << e$11.hash_shift ^ e$11.window[s$6 + 1]) & e$11.hash_mask; e$11.insert && (e$11.ins_h = (e$11.ins_h << e$11.hash_shift ^ e$11.window[s$6 + x$2 - 1]) & e$11.hash_mask, e$11.prev[s$6 & e$11.w_mask] = e$11.head[e$11.ins_h], e$11.head[e$11.ins_h] = s$6, s$6++, e$11.insert--, !(e$11.lookahead + e$11.insert < x$2));); } while (e$11.lookahead < z$2 && 0 !== e$11.strm.avail_in); } function Z$1(e$11, t$7) { for (var r$11, n$10;;) { if (e$11.lookahead < z$2) { if (j$2(e$11), e$11.lookahead < z$2 && t$7 === l$3) return A$1; if (0 === e$11.lookahead) break; } if (r$11 = 0, e$11.lookahead >= x$2 && (e$11.ins_h = (e$11.ins_h << e$11.hash_shift ^ e$11.window[e$11.strstart + x$2 - 1]) & e$11.hash_mask, r$11 = e$11.prev[e$11.strstart & e$11.w_mask] = e$11.head[e$11.ins_h], e$11.head[e$11.ins_h] = e$11.strstart), 0 !== r$11 && e$11.strstart - r$11 <= e$11.w_size - z$2 && (e$11.match_length = L$2(e$11, r$11)), e$11.match_length >= x$2) if (n$10 = u$4._tr_tally(e$11, e$11.strstart - e$11.match_start, e$11.match_length - x$2), e$11.lookahead -= e$11.match_length, e$11.match_length <= e$11.max_lazy_match && e$11.lookahead >= x$2) { for (e$11.match_length--; e$11.strstart++, e$11.ins_h = (e$11.ins_h << e$11.hash_shift ^ e$11.window[e$11.strstart + x$2 - 1]) & e$11.hash_mask, r$11 = e$11.prev[e$11.strstart & e$11.w_mask] = e$11.head[e$11.ins_h], e$11.head[e$11.ins_h] = e$11.strstart, 0 != --e$11.match_length;); e$11.strstart++; } else e$11.strstart += e$11.match_length, e$11.match_length = 0, e$11.ins_h = e$11.window[e$11.strstart], e$11.ins_h = (e$11.ins_h << e$11.hash_shift ^ e$11.window[e$11.strstart + 1]) & e$11.hash_mask; else n$10 = u$4._tr_tally(e$11, 0, e$11.window[e$11.strstart]), e$11.lookahead--, e$11.strstart++; if (n$10 && (N$2(e$11, !1), 0 === e$11.strm.avail_out)) return A$1; } return e$11.insert = e$11.strstart < x$2 - 1 ? e$11.strstart : x$2 - 1, t$7 === f$4 ? (N$2(e$11, !0), 0 === e$11.strm.avail_out ? O : B$2) : e$11.last_lit && (N$2(e$11, !1), 0 === e$11.strm.avail_out) ? A$1 : I$2; } function W$1(e$11, t$7) { for (var r$11, n$10, i$8;;) { if (e$11.lookahead < z$2) { if (j$2(e$11), e$11.lookahead < z$2 && t$7 === l$3) return A$1; if (0 === e$11.lookahead) break; } if (r$11 = 0, e$11.lookahead >= x$2 && (e$11.ins_h = (e$11.ins_h << e$11.hash_shift ^ e$11.window[e$11.strstart + x$2 - 1]) & e$11.hash_mask, r$11 = e$11.prev[e$11.strstart & e$11.w_mask] = e$11.head[e$11.ins_h], e$11.head[e$11.ins_h] = e$11.strstart), e$11.prev_length = e$11.match_length, e$11.prev_match = e$11.match_start, e$11.match_length = x$2 - 1, 0 !== r$11 && e$11.prev_length < e$11.max_lazy_match && e$11.strstart - r$11 <= e$11.w_size - z$2 && (e$11.match_length = L$2(e$11, r$11), e$11.match_length <= 5 && (1 === e$11.strategy || e$11.match_length === x$2 && 4096 < e$11.strstart - e$11.match_start) && (e$11.match_length = x$2 - 1)), e$11.prev_length >= x$2 && e$11.match_length <= e$11.prev_length) { for (i$8 = e$11.strstart + e$11.lookahead - x$2, n$10 = u$4._tr_tally(e$11, e$11.strstart - 1 - e$11.prev_match, e$11.prev_length - x$2), e$11.lookahead -= e$11.prev_length - 1, e$11.prev_length -= 2; ++e$11.strstart <= i$8 && (e$11.ins_h = (e$11.ins_h << e$11.hash_shift ^ e$11.window[e$11.strstart + x$2 - 1]) & e$11.hash_mask, r$11 = e$11.prev[e$11.strstart & e$11.w_mask] = e$11.head[e$11.ins_h], e$11.head[e$11.ins_h] = e$11.strstart), 0 != --e$11.prev_length;); if (e$11.match_available = 0, e$11.match_length = x$2 - 1, e$11.strstart++, n$10 && (N$2(e$11, !1), 0 === e$11.strm.avail_out)) return A$1; } else if (e$11.match_available) { if ((n$10 = u$4._tr_tally(e$11, 0, e$11.window[e$11.strstart - 1])) && N$2(e$11, !1), e$11.strstart++, e$11.lookahead--, 0 === e$11.strm.avail_out) return A$1; } else e$11.match_available = 1, e$11.strstart++, e$11.lookahead--; } return e$11.match_available && (n$10 = u$4._tr_tally(e$11, 0, e$11.window[e$11.strstart - 1]), e$11.match_available = 0), e$11.insert = e$11.strstart < x$2 - 1 ? e$11.strstart : x$2 - 1, t$7 === f$4 ? (N$2(e$11, !0), 0 === e$11.strm.avail_out ? O : B$2) : e$11.last_lit && (N$2(e$11, !1), 0 === e$11.strm.avail_out) ? A$1 : I$2; } function M$3(e$11, t$7, r$11, n$10, i$8) { this.good_length = e$11, this.max_lazy = t$7, this.nice_length = r$11, this.max_chain = n$10, this.func = i$8; } function H$1() { this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = v$3, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new c$7.Buf16(2 * w$2), this.dyn_dtree = new c$7.Buf16(2 * (2 * a$2 + 1)), this.bl_tree = new c$7.Buf16(2 * (2 * o$10 + 1)), D$2(this.dyn_ltree), D$2(this.dyn_dtree), D$2(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new c$7.Buf16(k$2 + 1), this.heap = new c$7.Buf16(2 * s$5 + 1), D$2(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new c$7.Buf16(2 * s$5 + 1), D$2(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0; } function G$1(e$11) { var t$7; return e$11 && e$11.state ? (e$11.total_in = e$11.total_out = 0, e$11.data_type = i$7, (t$7 = e$11.state).pending = 0, t$7.pending_out = 0, t$7.wrap < 0 && (t$7.wrap = -t$7.wrap), t$7.status = t$7.wrap ? C$2 : E$2, e$11.adler = 2 === t$7.wrap ? 0 : 1, t$7.last_flush = l$3, u$4._tr_init(t$7), m$3) : R$1(e$11, _$2); } function K$1(e$11) { var t$7 = G$1(e$11); return t$7 === m$3 && function(e$12) { e$12.window_size = 2 * e$12.w_size, D$2(e$12.head), e$12.max_lazy_match = h$5[e$12.level].max_lazy, e$12.good_match = h$5[e$12.level].good_length, e$12.nice_match = h$5[e$12.level].nice_length, e$12.max_chain_length = h$5[e$12.level].max_chain, e$12.strstart = 0, e$12.block_start = 0, e$12.lookahead = 0, e$12.insert = 0, e$12.match_length = e$12.prev_length = x$2 - 1, e$12.match_available = 0, e$12.ins_h = 0; }(e$11.state), t$7; } function Y(e$11, t$7, r$11, n$10, i$8, s$6) { if (!e$11) return _$2; var a$3 = 1; if (t$7 === g$1 && (t$7 = 6), n$10 < 0 ? (a$3 = 0, n$10 = -n$10) : 15 < n$10 && (a$3 = 2, n$10 -= 16), i$8 < 1 || y$3 < i$8 || r$11 !== v$3 || n$10 < 8 || 15 < n$10 || t$7 < 0 || 9 < t$7 || s$6 < 0 || b$3 < s$6) return R$1(e$11, _$2); 8 === n$10 && (n$10 = 9); var o$11 = new H$1(); return (e$11.state = o$11).strm = e$11, o$11.wrap = a$3, o$11.gzhead = null, o$11.w_bits = n$10, o$11.w_size = 1 << o$11.w_bits, o$11.w_mask = o$11.w_size - 1, o$11.hash_bits = i$8 + 7, o$11.hash_size = 1 << o$11.hash_bits, o$11.hash_mask = o$11.hash_size - 1, o$11.hash_shift = ~~((o$11.hash_bits + x$2 - 1) / x$2), o$11.window = new c$7.Buf8(2 * o$11.w_size), o$11.head = new c$7.Buf16(o$11.hash_size), o$11.prev = new c$7.Buf16(o$11.w_size), o$11.lit_bufsize = 1 << i$8 + 6, o$11.pending_buf_size = 4 * o$11.lit_bufsize, o$11.pending_buf = new c$7.Buf8(o$11.pending_buf_size), o$11.d_buf = 1 * o$11.lit_bufsize, o$11.l_buf = 3 * o$11.lit_bufsize, o$11.level = t$7, o$11.strategy = s$6, o$11.method = r$11, K$1(e$11); } h$5 = [ new M$3(0, 0, 0, 0, function(e$11, t$7) { var r$11 = 65535; for (r$11 > e$11.pending_buf_size - 5 && (r$11 = e$11.pending_buf_size - 5);;) { if (e$11.lookahead <= 1) { if (j$2(e$11), 0 === e$11.lookahead && t$7 === l$3) return A$1; if (0 === e$11.lookahead) break; } e$11.strstart += e$11.lookahead, e$11.lookahead = 0; var n$10 = e$11.block_start + r$11; if ((0 === e$11.strstart || e$11.strstart >= n$10) && (e$11.lookahead = e$11.strstart - n$10, e$11.strstart = n$10, N$2(e$11, !1), 0 === e$11.strm.avail_out)) return A$1; if (e$11.strstart - e$11.block_start >= e$11.w_size - z$2 && (N$2(e$11, !1), 0 === e$11.strm.avail_out)) return A$1; } return e$11.insert = 0, t$7 === f$4 ? (N$2(e$11, !0), 0 === e$11.strm.avail_out ? O : B$2) : (e$11.strstart > e$11.block_start && (N$2(e$11, !1), e$11.strm.avail_out), A$1); }), new M$3(4, 4, 8, 4, Z$1), new M$3(4, 5, 16, 8, Z$1), new M$3(4, 6, 32, 32, Z$1), new M$3(4, 4, 16, 16, W$1), new M$3(8, 16, 32, 32, W$1), new M$3(8, 16, 128, 128, W$1), new M$3(8, 32, 128, 256, W$1), new M$3(32, 128, 258, 1024, W$1), new M$3(32, 258, 258, 4096, W$1) ], r$10.deflateInit = function(e$11, t$7) { return Y(e$11, t$7, v$3, 15, 8, 0); }, r$10.deflateInit2 = Y, r$10.deflateReset = K$1, r$10.deflateResetKeep = G$1, r$10.deflateSetHeader = function(e$11, t$7) { return e$11 && e$11.state ? 2 !== e$11.state.wrap ? _$2 : (e$11.state.gzhead = t$7, m$3) : _$2; }, r$10.deflate = function(e$11, t$7) { var r$11, n$10, i$8, s$6; if (!e$11 || !e$11.state || 5 < t$7 || t$7 < 0) return e$11 ? R$1(e$11, _$2) : _$2; if (n$10 = e$11.state, !e$11.output || !e$11.input && 0 !== e$11.avail_in || 666 === n$10.status && t$7 !== f$4) return R$1(e$11, 0 === e$11.avail_out ? -5 : _$2); if (n$10.strm = e$11, r$11 = n$10.last_flush, n$10.last_flush = t$7, n$10.status === C$2) if (2 === n$10.wrap) e$11.adler = 0, U$1(n$10, 31), U$1(n$10, 139), U$1(n$10, 8), n$10.gzhead ? (U$1(n$10, (n$10.gzhead.text ? 1 : 0) + (n$10.gzhead.hcrc ? 2 : 0) + (n$10.gzhead.extra ? 4 : 0) + (n$10.gzhead.name ? 8 : 0) + (n$10.gzhead.comment ? 16 : 0)), U$1(n$10, 255 & n$10.gzhead.time), U$1(n$10, n$10.gzhead.time >> 8 & 255), U$1(n$10, n$10.gzhead.time >> 16 & 255), U$1(n$10, n$10.gzhead.time >> 24 & 255), U$1(n$10, 9 === n$10.level ? 2 : 2 <= n$10.strategy || n$10.level < 2 ? 4 : 0), U$1(n$10, 255 & n$10.gzhead.os), n$10.gzhead.extra && n$10.gzhead.extra.length && (U$1(n$10, 255 & n$10.gzhead.extra.length), U$1(n$10, n$10.gzhead.extra.length >> 8 & 255)), n$10.gzhead.hcrc && (e$11.adler = p$3(e$11.adler, n$10.pending_buf, n$10.pending, 0)), n$10.gzindex = 0, n$10.status = 69) : (U$1(n$10, 0), U$1(n$10, 0), U$1(n$10, 0), U$1(n$10, 0), U$1(n$10, 0), U$1(n$10, 9 === n$10.level ? 2 : 2 <= n$10.strategy || n$10.level < 2 ? 4 : 0), U$1(n$10, 3), n$10.status = E$2); else { var a$3 = v$3 + (n$10.w_bits - 8 << 4) << 8; a$3 |= (2 <= n$10.strategy || n$10.level < 2 ? 0 : n$10.level < 6 ? 1 : 6 === n$10.level ? 2 : 3) << 6, 0 !== n$10.strstart && (a$3 |= 32), a$3 += 31 - a$3 % 31, n$10.status = E$2, P$2(n$10, a$3), 0 !== n$10.strstart && (P$2(n$10, e$11.adler >>> 16), P$2(n$10, 65535 & e$11.adler)), e$11.adler = 1; } if (69 === n$10.status) if (n$10.gzhead.extra) { for (i$8 = n$10.pending; n$10.gzindex < (65535 & n$10.gzhead.extra.length) && (n$10.pending !== n$10.pending_buf_size || (n$10.gzhead.hcrc && n$10.pending > i$8 && (e$11.adler = p$3(e$11.adler, n$10.pending_buf, n$10.pending - i$8, i$8)), F$1(e$11), i$8 = n$10.pending, n$10.pending !== n$10.pending_buf_size));) U$1(n$10, 255 & n$10.gzhead.extra[n$10.gzindex]), n$10.gzindex++; n$10.gzhead.hcrc && n$10.pending > i$8 && (e$11.adler = p$3(e$11.adler, n$10.pending_buf, n$10.pending - i$8, i$8)), n$10.gzindex === n$10.gzhead.extra.length && (n$10.gzindex = 0, n$10.status = 73); } else n$10.status = 73; if (73 === n$10.status) if (n$10.gzhead.name) { i$8 = n$10.pending; do { if (n$10.pending === n$10.pending_buf_size && (n$10.gzhead.hcrc && n$10.pending > i$8 && (e$11.adler = p$3(e$11.adler, n$10.pending_buf, n$10.pending - i$8, i$8)), F$1(e$11), i$8 = n$10.pending, n$10.pending === n$10.pending_buf_size)) { s$6 = 1; break; } s$6 = n$10.gzindex < n$10.gzhead.name.length ? 255 & n$10.gzhead.name.charCodeAt(n$10.gzindex++) : 0, U$1(n$10, s$6); } while (0 !== s$6); n$10.gzhead.hcrc && n$10.pending > i$8 && (e$11.adler = p$3(e$11.adler, n$10.pending_buf, n$10.pending - i$8, i$8)), 0 === s$6 && (n$10.gzindex = 0, n$10.status = 91); } else n$10.status = 91; if (91 === n$10.status) if (n$10.gzhead.comment) { i$8 = n$10.pending; do { if (n$10.pending === n$10.pending_buf_size && (n$10.gzhead.hcrc && n$10.pending > i$8 && (e$11.adler = p$3(e$11.adler, n$10.pending_buf, n$10.pending - i$8, i$8)), F$1(e$11), i$8 = n$10.pending, n$10.pending === n$10.pending_buf_size)) { s$6 = 1; break; } s$6 = n$10.gzindex < n$10.gzhead.comment.length ? 255 & n$10.gzhead.comment.charCodeAt(n$10.gzindex++) : 0, U$1(n$10, s$6); } while (0 !== s$6); n$10.gzhead.hcrc && n$10.pending > i$8 && (e$11.adler = p$3(e$11.adler, n$10.pending_buf, n$10.pending - i$8, i$8)), 0 === s$6 && (n$10.status = 103); } else n$10.status = 103; if (103 === n$10.status && (n$10.gzhead.hcrc ? (n$10.pending + 2 > n$10.pending_buf_size && F$1(e$11), n$10.pending + 2 <= n$10.pending_buf_size && (U$1(n$10, 255 & e$11.adler), U$1(n$10, e$11.adler >> 8 & 255), e$11.adler = 0, n$10.status = E$2)) : n$10.status = E$2), 0 !== n$10.pending) { if (F$1(e$11), 0 === e$11.avail_out) return n$10.last_flush = -1, m$3; } else if (0 === e$11.avail_in && T$3(t$7) <= T$3(r$11) && t$7 !== f$4) return R$1(e$11, -5); if (666 === n$10.status && 0 !== e$11.avail_in) return R$1(e$11, -5); if (0 !== e$11.avail_in || 0 !== n$10.lookahead || t$7 !== l$3 && 666 !== n$10.status) { var o$11 = 2 === n$10.strategy ? function(e$12, t$8) { for (var r$12;;) { if (0 === e$12.lookahead && (j$2(e$12), 0 === e$12.lookahead)) { if (t$8 === l$3) return A$1; break; } if (e$12.match_length = 0, r$12 = u$4._tr_tally(e$12, 0, e$12.window[e$12.strstart]), e$12.lookahead--, e$12.strstart++, r$12 && (N$2(e$12, !1), 0 === e$12.strm.avail_out)) return A$1; } return e$12.insert = 0, t$8 === f$4 ? (N$2(e$12, !0), 0 === e$12.strm.avail_out ? O : B$2) : e$12.last_lit && (N$2(e$12, !1), 0 === e$12.strm.avail_out) ? A$1 : I$2; }(n$10, t$7) : 3 === n$10.strategy ? function(e$12, t$8) { for (var r$12, n$11, i$9, s$7, a$4 = e$12.window;;) { if (e$12.lookahead <= S$4) { if (j$2(e$12), e$12.lookahead <= S$4 && t$8 === l$3) return A$1; if (0 === e$12.lookahead) break; } if (e$12.match_length = 0, e$12.lookahead >= x$2 && 0 < e$12.strstart && (n$11 = a$4[i$9 = e$12.strstart - 1]) === a$4[++i$9] && n$11 === a$4[++i$9] && n$11 === a$4[++i$9]) { s$7 = e$12.strstart + S$4; do {} while (n$11 === a$4[++i$9] && n$11 === a$4[++i$9] && n$11 === a$4[++i$9] && n$11 === a$4[++i$9] && n$11 === a$4[++i$9] && n$11 === a$4[++i$9] && n$11 === a$4[++i$9] && n$11 === a$4[++i$9] && i$9 < s$7); e$12.match_length = S$4 - (s$7 - i$9), e$12.match_length > e$12.lookahead && (e$12.match_length = e$12.lookahead); } if (e$12.match_length >= x$2 ? (r$12 = u$4._tr_tally(e$12, 1, e$12.match_length - x$2), e$12.lookahead -= e$12.match_length, e$12.strstart += e$12.match_length, e$12.match_length = 0) : (r$12 = u$4._tr_tally(e$12, 0, e$12.window[e$12.strstart]), e$12.lookahead--, e$12.strstart++), r$12 && (N$2(e$12, !1), 0 === e$12.strm.avail_out)) return A$1; } return e$12.insert = 0, t$8 === f$4 ? (N$2(e$12, !0), 0 === e$12.strm.avail_out ? O : B$2) : e$12.last_lit && (N$2(e$12, !1), 0 === e$12.strm.avail_out) ? A$1 : I$2; }(n$10, t$7) : h$5[n$10.level].func(n$10, t$7); if (o$11 !== O && o$11 !== B$2 || (n$10.status = 666), o$11 === A$1 || o$11 === O) return 0 === e$11.avail_out && (n$10.last_flush = -1), m$3; if (o$11 === I$2 && (1 === t$7 ? u$4._tr_align(n$10) : 5 !== t$7 && (u$4._tr_stored_block(n$10, 0, 0, !1), 3 === t$7 && (D$2(n$10.head), 0 === n$10.lookahead && (n$10.strstart = 0, n$10.block_start = 0, n$10.insert = 0))), F$1(e$11), 0 === e$11.avail_out)) return n$10.last_flush = -1, m$3; } return t$7 !== f$4 ? m$3 : n$10.wrap <= 0 ? 1 : (2 === n$10.wrap ? (U$1(n$10, 255 & e$11.adler), U$1(n$10, e$11.adler >> 8 & 255), U$1(n$10, e$11.adler >> 16 & 255), U$1(n$10, e$11.adler >> 24 & 255), U$1(n$10, 255 & e$11.total_in), U$1(n$10, e$11.total_in >> 8 & 255), U$1(n$10, e$11.total_in >> 16 & 255), U$1(n$10, e$11.total_in >> 24 & 255)) : (P$2(n$10, e$11.adler >>> 16), P$2(n$10, 65535 & e$11.adler)), F$1(e$11), 0 < n$10.wrap && (n$10.wrap = -n$10.wrap), 0 !== n$10.pending ? m$3 : 1); }, r$10.deflateEnd = function(e$11) { var t$7; return e$11 && e$11.state ? (t$7 = e$11.state.status) !== C$2 && 69 !== t$7 && 73 !== t$7 && 91 !== t$7 && 103 !== t$7 && t$7 !== E$2 && 666 !== t$7 ? R$1(e$11, _$2) : (e$11.state = null, t$7 === E$2 ? R$1(e$11, -3) : m$3) : _$2; }, r$10.deflateSetDictionary = function(e$11, t$7) { var r$11, n$10, i$8, s$6, a$3, o$11, h$6, u$5, l$4 = t$7.length; if (!e$11 || !e$11.state) return _$2; if (2 === (s$6 = (r$11 = e$11.state).wrap) || 1 === s$6 && r$11.status !== C$2 || r$11.lookahead) return _$2; for (1 === s$6 && (e$11.adler = d$5(e$11.adler, t$7, l$4, 0)), r$11.wrap = 0, l$4 >= r$11.w_size && (0 === s$6 && (D$2(r$11.head), r$11.strstart = 0, r$11.block_start = 0, r$11.insert = 0), u$5 = new c$7.Buf8(r$11.w_size), c$7.arraySet(u$5, t$7, l$4 - r$11.w_size, r$11.w_size, 0), t$7 = u$5, l$4 = r$11.w_size), a$3 = e$11.avail_in, o$11 = e$11.next_in, h$6 = e$11.input, e$11.avail_in = l$4, e$11.next_in = 0, e$11.input = t$7, j$2(r$11); r$11.lookahead >= x$2;) { for (n$10 = r$11.strstart, i$8 = r$11.lookahead - (x$2 - 1); r$11.ins_h = (r$11.ins_h << r$11.hash_shift ^ r$11.window[n$10 + x$2 - 1]) & r$11.hash_mask, r$11.prev[n$10 & r$11.w_mask] = r$11.head[r$11.ins_h], r$11.head[r$11.ins_h] = n$10, n$10++, --i$8;); r$11.strstart = n$10, r$11.lookahead = x$2 - 1, j$2(r$11); } return r$11.strstart += r$11.lookahead, r$11.block_start = r$11.strstart, r$11.insert = r$11.lookahead, r$11.lookahead = 0, r$11.match_length = r$11.prev_length = x$2 - 1, r$11.match_available = 0, e$11.next_in = o$11, e$11.input = h$6, e$11.avail_in = a$3, r$11.wrap = s$6, m$3; }, r$10.deflateInfo = "pako deflate (from Nodeca project)"; }, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(e$10, t$6, r$10) { "use strict"; t$6.exports = function() { this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = !1; }; }, {}], 48: [function(e$10, t$6, r$10) { "use strict"; t$6.exports = function(e$11, t$7) { var r$11, n$9, i$7, s$5, a$2, o$10, h$5, u$4, l$3, f$4, c$7, d$5, p$3, m$3, _$2, g$1, b$3, v$3, y$3, w$2, k$2, x$2, S$4, z$2, C$2; r$11 = e$11.state, n$9 = e$11.next_in, z$2 = e$11.input, i$7 = n$9 + (e$11.avail_in - 5), s$5 = e$11.next_out, C$2 = e$11.output, a$2 = s$5 - (t$7 - e$11.avail_out), o$10 = s$5 + (e$11.avail_out - 257), h$5 = r$11.dmax, u$4 = r$11.wsize, l$3 = r$11.whave, f$4 = r$11.wnext, c$7 = r$11.window, d$5 = r$11.hold, p$3 = r$11.bits, m$3 = r$11.lencode, _$2 = r$11.distcode, g$1 = (1 << r$11.lenbits) - 1, b$3 = (1 << r$11.distbits) - 1; e: do { p$3 < 15 && (d$5 += z$2[n$9++] << p$3, p$3 += 8, d$5 += z$2[n$9++] << p$3, p$3 += 8), v$3 = m$3[d$5 & g$1]; t: for (;;) { if (d$5 >>>= y$3 = v$3 >>> 24, p$3 -= y$3, 0 === (y$3 = v$3 >>> 16 & 255)) C$2[s$5++] = 65535 & v$3; else { if (!(16 & y$3)) { if (0 == (64 & y$3)) { v$3 = m$3[(65535 & v$3) + (d$5 & (1 << y$3) - 1)]; continue t; } if (32 & y$3) { r$11.mode = 12; break e; } e$11.msg = "invalid literal/length code", r$11.mode = 30; break e; } w$2 = 65535 & v$3, (y$3 &= 15) && (p$3 < y$3 && (d$5 += z$2[n$9++] << p$3, p$3 += 8), w$2 += d$5 & (1 << y$3) - 1, d$5 >>>= y$3, p$3 -= y$3), p$3 < 15 && (d$5 += z$2[n$9++] << p$3, p$3 += 8, d$5 += z$2[n$9++] << p$3, p$3 += 8), v$3 = _$2[d$5 & b$3]; r: for (;;) { if (d$5 >>>= y$3 = v$3 >>> 24, p$3 -= y$3, !(16 & (y$3 = v$3 >>> 16 & 255))) { if (0 == (64 & y$3)) { v$3 = _$2[(65535 & v$3) + (d$5 & (1 << y$3) - 1)]; continue r; } e$11.msg = "invalid distance code", r$11.mode = 30; break e; } if (k$2 = 65535 & v$3, p$3 < (y$3 &= 15) && (d$5 += z$2[n$9++] << p$3, (p$3 += 8) < y$3 && (d$5 += z$2[n$9++] << p$3, p$3 += 8)), h$5 < (k$2 += d$5 & (1 << y$3) - 1)) { e$11.msg = "invalid distance too far back", r$11.mode = 30; break e; } if (d$5 >>>= y$3, p$3 -= y$3, (y$3 = s$5 - a$2) < k$2) { if (l$3 < (y$3 = k$2 - y$3) && r$11.sane) { e$11.msg = "invalid distance too far back", r$11.mode = 30; break e; } if (S$4 = c$7, (x$2 = 0) === f$4) { if (x$2 += u$4 - y$3, y$3 < w$2) { for (w$2 -= y$3; C$2[s$5++] = c$7[x$2++], --y$3;); x$2 = s$5 - k$2, S$4 = C$2; } } else if (f$4 < y$3) { if (x$2 += u$4 + f$4 - y$3, (y$3 -= f$4) < w$2) { for (w$2 -= y$3; C$2[s$5++] = c$7[x$2++], --y$3;); if (x$2 = 0, f$4 < w$2) { for (w$2 -= y$3 = f$4; C$2[s$5++] = c$7[x$2++], --y$3;); x$2 = s$5 - k$2, S$4 = C$2; } } } else if (x$2 += f$4 - y$3, y$3 < w$2) { for (w$2 -= y$3; C$2[s$5++] = c$7[x$2++], --y$3;); x$2 = s$5 - k$2, S$4 = C$2; } for (; 2 < w$2;) C$2[s$5++] = S$4[x$2++], C$2[s$5++] = S$4[x$2++], C$2[s$5++] = S$4[x$2++], w$2 -= 3; w$2 && (C$2[s$5++] = S$4[x$2++], 1 < w$2 && (C$2[s$5++] = S$4[x$2++])); } else { for (x$2 = s$5 - k$2; C$2[s$5++] = C$2[x$2++], C$2[s$5++] = C$2[x$2++], C$2[s$5++] = C$2[x$2++], 2 < (w$2 -= 3);); w$2 && (C$2[s$5++] = C$2[x$2++], 1 < w$2 && (C$2[s$5++] = C$2[x$2++])); } break; } } break; } } while (n$9 < i$7 && s$5 < o$10); n$9 -= w$2 = p$3 >> 3, d$5 &= (1 << (p$3 -= w$2 << 3)) - 1, e$11.next_in = n$9, e$11.next_out = s$5, e$11.avail_in = n$9 < i$7 ? i$7 - n$9 + 5 : 5 - (n$9 - i$7), e$11.avail_out = s$5 < o$10 ? o$10 - s$5 + 257 : 257 - (s$5 - o$10), r$11.hold = d$5, r$11.bits = p$3; }; }, {}], 49: [function(e$10, t$6, r$10) { "use strict"; var I$2 = e$10("../utils/common"), O = e$10("./adler32"), B$2 = e$10("./crc32"), R$1 = e$10("./inffast"), T$3 = e$10("./inftrees"), D$2 = 1, F$1 = 2, N$2 = 0, U$1 = -2, P$2 = 1, n$9 = 852, i$7 = 592; function L$2(e$11) { return (e$11 >>> 24 & 255) + (e$11 >>> 8 & 65280) + ((65280 & e$11) << 8) + ((255 & e$11) << 24); } function s$5() { this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new I$2.Buf16(320), this.work = new I$2.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0; } function a$2(e$11) { var t$7; return e$11 && e$11.state ? (t$7 = e$11.state, e$11.total_in = e$11.total_out = t$7.total = 0, e$11.msg = "", t$7.wrap && (e$11.adler = 1 & t$7.wrap), t$7.mode = P$2, t$7.last = 0, t$7.havedict = 0, t$7.dmax = 32768, t$7.head = null, t$7.hold = 0, t$7.bits = 0, t$7.lencode = t$7.lendyn = new I$2.Buf32(n$9), t$7.distcode = t$7.distdyn = new I$2.Buf32(i$7), t$7.sane = 1, t$7.back = -1, N$2) : U$1; } function o$10(e$11) { var t$7; return e$11 && e$11.state ? ((t$7 = e$11.state).wsize = 0, t$7.whave = 0, t$7.wnext = 0, a$2(e$11)) : U$1; } function h$5(e$11, t$7) { var r$11, n$10; return e$11 && e$11.state ? (n$10 = e$11.state, t$7 < 0 ? (r$11 = 0, t$7 = -t$7) : (r$11 = 1 + (t$7 >> 4), t$7 < 48 && (t$7 &= 15)), t$7 && (t$7 < 8 || 15 < t$7) ? U$1 : (null !== n$10.window && n$10.wbits !== t$7 && (n$10.window = null), n$10.wrap = r$11, n$10.wbits = t$7, o$10(e$11))) : U$1; } function u$4(e$11, t$7) { var r$11, n$10; return e$11 ? (n$10 = new s$5(), (e$11.state = n$10).window = null, (r$11 = h$5(e$11, t$7)) !== N$2 && (e$11.state = null), r$11) : U$1; } var l$3, f$4, c$7 = !0; function j$2(e$11) { if (c$7) { var t$7; for (l$3 = new I$2.Buf32(512), f$4 = new I$2.Buf32(32), t$7 = 0; t$7 < 144;) e$11.lens[t$7++] = 8; for (; t$7 < 256;) e$11.lens[t$7++] = 9; for (; t$7 < 280;) e$11.lens[t$7++] = 7; for (; t$7 < 288;) e$11.lens[t$7++] = 8; for (T$3(D$2, e$11.lens, 0, 288, l$3, 0, e$11.work, { bits: 9 }), t$7 = 0; t$7 < 32;) e$11.lens[t$7++] = 5; T$3(F$1, e$11.lens, 0, 32, f$4, 0, e$11.work, { bits: 5 }), c$7 = !1; } e$11.lencode = l$3, e$11.lenbits = 9, e$11.distcode = f$4, e$11.distbits = 5; } function Z$1(e$11, t$7, r$11, n$10) { var i$8, s$6 = e$11.state; return null === s$6.window && (s$6.wsize = 1 << s$6.wbits, s$6.wnext = 0, s$6.whave = 0, s$6.window = new I$2.Buf8(s$6.wsize)), n$10 >= s$6.wsize ? (I$2.arraySet(s$6.window, t$7, r$11 - s$6.wsize, s$6.wsize, 0), s$6.wnext = 0, s$6.whave = s$6.wsize) : (n$10 < (i$8 = s$6.wsize - s$6.wnext) && (i$8 = n$10), I$2.arraySet(s$6.window, t$7, r$11 - n$10, i$8, s$6.wnext), (n$10 -= i$8) ? (I$2.arraySet(s$6.window, t$7, r$11 - n$10, n$10, 0), s$6.wnext = n$10, s$6.whave = s$6.wsize) : (s$6.wnext += i$8, s$6.wnext === s$6.wsize && (s$6.wnext = 0), s$6.whave < s$6.wsize && (s$6.whave += i$8))), 0; } r$10.inflateReset = o$10, r$10.inflateReset2 = h$5, r$10.inflateResetKeep = a$2, r$10.inflateInit = function(e$11) { return u$4(e$11, 15); }, r$10.inflateInit2 = u$4, r$10.inflate = function(e$11, t$7) { var r$11, n$10, i$8, s$6, a$3, o$11, h$6, u$5, l$4, f$5, c$8, d$5, p$3, m$3, _$2, g$1, b$3, v$3, y$3, w$2, k$2, x$2, S$4, z$2, C$2 = 0, E$2 = new I$2.Buf8(4), A$1 = [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; if (!e$11 || !e$11.state || !e$11.output || !e$11.input && 0 !== e$11.avail_in) return U$1; 12 === (r$11 = e$11.state).mode && (r$11.mode = 13), a$3 = e$11.next_out, i$8 = e$11.output, h$6 = e$11.avail_out, s$6 = e$11.next_in, n$10 = e$11.input, o$11 = e$11.avail_in, u$5 = r$11.hold, l$4 = r$11.bits, f$5 = o$11, c$8 = h$6, x$2 = N$2; e: for (;;) switch (r$11.mode) { case P$2: if (0 === r$11.wrap) { r$11.mode = 13; break; } for (; l$4 < 16;) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } if (2 & r$11.wrap && 35615 === u$5) { E$2[r$11.check = 0] = 255 & u$5, E$2[1] = u$5 >>> 8 & 255, r$11.check = B$2(r$11.check, E$2, 2, 0), l$4 = u$5 = 0, r$11.mode = 2; break; } if (r$11.flags = 0, r$11.head && (r$11.head.done = !1), !(1 & r$11.wrap) || (((255 & u$5) << 8) + (u$5 >> 8)) % 31) { e$11.msg = "incorrect header check", r$11.mode = 30; break; } if (8 != (15 & u$5)) { e$11.msg = "unknown compression method", r$11.mode = 30; break; } if (l$4 -= 4, k$2 = 8 + (15 & (u$5 >>>= 4)), 0 === r$11.wbits) r$11.wbits = k$2; else if (k$2 > r$11.wbits) { e$11.msg = "invalid window size", r$11.mode = 30; break; } r$11.dmax = 1 << k$2, e$11.adler = r$11.check = 1, r$11.mode = 512 & u$5 ? 10 : 12, l$4 = u$5 = 0; break; case 2: for (; l$4 < 16;) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } if (r$11.flags = u$5, 8 != (255 & r$11.flags)) { e$11.msg = "unknown compression method", r$11.mode = 30; break; } if (57344 & r$11.flags) { e$11.msg = "unknown header flags set", r$11.mode = 30; break; } r$11.head && (r$11.head.text = u$5 >> 8 & 1), 512 & r$11.flags && (E$2[0] = 255 & u$5, E$2[1] = u$5 >>> 8 & 255, r$11.check = B$2(r$11.check, E$2, 2, 0)), l$4 = u$5 = 0, r$11.mode = 3; case 3: for (; l$4 < 32;) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } r$11.head && (r$11.head.time = u$5), 512 & r$11.flags && (E$2[0] = 255 & u$5, E$2[1] = u$5 >>> 8 & 255, E$2[2] = u$5 >>> 16 & 255, E$2[3] = u$5 >>> 24 & 255, r$11.check = B$2(r$11.check, E$2, 4, 0)), l$4 = u$5 = 0, r$11.mode = 4; case 4: for (; l$4 < 16;) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } r$11.head && (r$11.head.xflags = 255 & u$5, r$11.head.os = u$5 >> 8), 512 & r$11.flags && (E$2[0] = 255 & u$5, E$2[1] = u$5 >>> 8 & 255, r$11.check = B$2(r$11.check, E$2, 2, 0)), l$4 = u$5 = 0, r$11.mode = 5; case 5: if (1024 & r$11.flags) { for (; l$4 < 16;) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } r$11.length = u$5, r$11.head && (r$11.head.extra_len = u$5), 512 & r$11.flags && (E$2[0] = 255 & u$5, E$2[1] = u$5 >>> 8 & 255, r$11.check = B$2(r$11.check, E$2, 2, 0)), l$4 = u$5 = 0; } else r$11.head && (r$11.head.extra = null); r$11.mode = 6; case 6: if (1024 & r$11.flags && (o$11 < (d$5 = r$11.length) && (d$5 = o$11), d$5 && (r$11.head && (k$2 = r$11.head.extra_len - r$11.length, r$11.head.extra || (r$11.head.extra = new Array(r$11.head.extra_len)), I$2.arraySet(r$11.head.extra, n$10, s$6, d$5, k$2)), 512 & r$11.flags && (r$11.check = B$2(r$11.check, n$10, d$5, s$6)), o$11 -= d$5, s$6 += d$5, r$11.length -= d$5), r$11.length)) break e; r$11.length = 0, r$11.mode = 7; case 7: if (2048 & r$11.flags) { if (0 === o$11) break e; for (d$5 = 0; k$2 = n$10[s$6 + d$5++], r$11.head && k$2 && r$11.length < 65536 && (r$11.head.name += String.fromCharCode(k$2)), k$2 && d$5 < o$11;); if (512 & r$11.flags && (r$11.check = B$2(r$11.check, n$10, d$5, s$6)), o$11 -= d$5, s$6 += d$5, k$2) break e; } else r$11.head && (r$11.head.name = null); r$11.length = 0, r$11.mode = 8; case 8: if (4096 & r$11.flags) { if (0 === o$11) break e; for (d$5 = 0; k$2 = n$10[s$6 + d$5++], r$11.head && k$2 && r$11.length < 65536 && (r$11.head.comment += String.fromCharCode(k$2)), k$2 && d$5 < o$11;); if (512 & r$11.flags && (r$11.check = B$2(r$11.check, n$10, d$5, s$6)), o$11 -= d$5, s$6 += d$5, k$2) break e; } else r$11.head && (r$11.head.comment = null); r$11.mode = 9; case 9: if (512 & r$11.flags) { for (; l$4 < 16;) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } if (u$5 !== (65535 & r$11.check)) { e$11.msg = "header crc mismatch", r$11.mode = 30; break; } l$4 = u$5 = 0; } r$11.head && (r$11.head.hcrc = r$11.flags >> 9 & 1, r$11.head.done = !0), e$11.adler = r$11.check = 0, r$11.mode = 12; break; case 10: for (; l$4 < 32;) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } e$11.adler = r$11.check = L$2(u$5), l$4 = u$5 = 0, r$11.mode = 11; case 11: if (0 === r$11.havedict) return e$11.next_out = a$3, e$11.avail_out = h$6, e$11.next_in = s$6, e$11.avail_in = o$11, r$11.hold = u$5, r$11.bits = l$4, 2; e$11.adler = r$11.check = 1, r$11.mode = 12; case 12: if (5 === t$7 || 6 === t$7) break e; case 13: if (r$11.last) { u$5 >>>= 7 & l$4, l$4 -= 7 & l$4, r$11.mode = 27; break; } for (; l$4 < 3;) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } switch (r$11.last = 1 & u$5, l$4 -= 1, 3 & (u$5 >>>= 1)) { case 0: r$11.mode = 14; break; case 1: if (j$2(r$11), r$11.mode = 20, 6 !== t$7) break; u$5 >>>= 2, l$4 -= 2; break e; case 2: r$11.mode = 17; break; case 3: e$11.msg = "invalid block type", r$11.mode = 30; } u$5 >>>= 2, l$4 -= 2; break; case 14: for (u$5 >>>= 7 & l$4, l$4 -= 7 & l$4; l$4 < 32;) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } if ((65535 & u$5) != (u$5 >>> 16 ^ 65535)) { e$11.msg = "invalid stored block lengths", r$11.mode = 30; break; } if (r$11.length = 65535 & u$5, l$4 = u$5 = 0, r$11.mode = 15, 6 === t$7) break e; case 15: r$11.mode = 16; case 16: if (d$5 = r$11.length) { if (o$11 < d$5 && (d$5 = o$11), h$6 < d$5 && (d$5 = h$6), 0 === d$5) break e; I$2.arraySet(i$8, n$10, s$6, d$5, a$3), o$11 -= d$5, s$6 += d$5, h$6 -= d$5, a$3 += d$5, r$11.length -= d$5; break; } r$11.mode = 12; break; case 17: for (; l$4 < 14;) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } if (r$11.nlen = 257 + (31 & u$5), u$5 >>>= 5, l$4 -= 5, r$11.ndist = 1 + (31 & u$5), u$5 >>>= 5, l$4 -= 5, r$11.ncode = 4 + (15 & u$5), u$5 >>>= 4, l$4 -= 4, 286 < r$11.nlen || 30 < r$11.ndist) { e$11.msg = "too many length or distance symbols", r$11.mode = 30; break; } r$11.have = 0, r$11.mode = 18; case 18: for (; r$11.have < r$11.ncode;) { for (; l$4 < 3;) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } r$11.lens[A$1[r$11.have++]] = 7 & u$5, u$5 >>>= 3, l$4 -= 3; } for (; r$11.have < 19;) r$11.lens[A$1[r$11.have++]] = 0; if (r$11.lencode = r$11.lendyn, r$11.lenbits = 7, S$4 = { bits: r$11.lenbits }, x$2 = T$3(0, r$11.lens, 0, 19, r$11.lencode, 0, r$11.work, S$4), r$11.lenbits = S$4.bits, x$2) { e$11.msg = "invalid code lengths set", r$11.mode = 30; break; } r$11.have = 0, r$11.mode = 19; case 19: for (; r$11.have < r$11.nlen + r$11.ndist;) { for (; g$1 = (C$2 = r$11.lencode[u$5 & (1 << r$11.lenbits) - 1]) >>> 16 & 255, b$3 = 65535 & C$2, !((_$2 = C$2 >>> 24) <= l$4);) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } if (b$3 < 16) u$5 >>>= _$2, l$4 -= _$2, r$11.lens[r$11.have++] = b$3; else { if (16 === b$3) { for (z$2 = _$2 + 2; l$4 < z$2;) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } if (u$5 >>>= _$2, l$4 -= _$2, 0 === r$11.have) { e$11.msg = "invalid bit length repeat", r$11.mode = 30; break; } k$2 = r$11.lens[r$11.have - 1], d$5 = 3 + (3 & u$5), u$5 >>>= 2, l$4 -= 2; } else if (17 === b$3) { for (z$2 = _$2 + 3; l$4 < z$2;) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } l$4 -= _$2, k$2 = 0, d$5 = 3 + (7 & (u$5 >>>= _$2)), u$5 >>>= 3, l$4 -= 3; } else { for (z$2 = _$2 + 7; l$4 < z$2;) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } l$4 -= _$2, k$2 = 0, d$5 = 11 + (127 & (u$5 >>>= _$2)), u$5 >>>= 7, l$4 -= 7; } if (r$11.have + d$5 > r$11.nlen + r$11.ndist) { e$11.msg = "invalid bit length repeat", r$11.mode = 30; break; } for (; d$5--;) r$11.lens[r$11.have++] = k$2; } } if (30 === r$11.mode) break; if (0 === r$11.lens[256]) { e$11.msg = "invalid code -- missing end-of-block", r$11.mode = 30; break; } if (r$11.lenbits = 9, S$4 = { bits: r$11.lenbits }, x$2 = T$3(D$2, r$11.lens, 0, r$11.nlen, r$11.lencode, 0, r$11.work, S$4), r$11.lenbits = S$4.bits, x$2) { e$11.msg = "invalid literal/lengths set", r$11.mode = 30; break; } if (r$11.distbits = 6, r$11.distcode = r$11.distdyn, S$4 = { bits: r$11.distbits }, x$2 = T$3(F$1, r$11.lens, r$11.nlen, r$11.ndist, r$11.distcode, 0, r$11.work, S$4), r$11.distbits = S$4.bits, x$2) { e$11.msg = "invalid distances set", r$11.mode = 30; break; } if (r$11.mode = 20, 6 === t$7) break e; case 20: r$11.mode = 21; case 21: if (6 <= o$11 && 258 <= h$6) { e$11.next_out = a$3, e$11.avail_out = h$6, e$11.next_in = s$6, e$11.avail_in = o$11, r$11.hold = u$5, r$11.bits = l$4, R$1(e$11, c$8), a$3 = e$11.next_out, i$8 = e$11.output, h$6 = e$11.avail_out, s$6 = e$11.next_in, n$10 = e$11.input, o$11 = e$11.avail_in, u$5 = r$11.hold, l$4 = r$11.bits, 12 === r$11.mode && (r$11.back = -1); break; } for (r$11.back = 0; g$1 = (C$2 = r$11.lencode[u$5 & (1 << r$11.lenbits) - 1]) >>> 16 & 255, b$3 = 65535 & C$2, !((_$2 = C$2 >>> 24) <= l$4);) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } if (g$1 && 0 == (240 & g$1)) { for (v$3 = _$2, y$3 = g$1, w$2 = b$3; g$1 = (C$2 = r$11.lencode[w$2 + ((u$5 & (1 << v$3 + y$3) - 1) >> v$3)]) >>> 16 & 255, b$3 = 65535 & C$2, !(v$3 + (_$2 = C$2 >>> 24) <= l$4);) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } u$5 >>>= v$3, l$4 -= v$3, r$11.back += v$3; } if (u$5 >>>= _$2, l$4 -= _$2, r$11.back += _$2, r$11.length = b$3, 0 === g$1) { r$11.mode = 26; break; } if (32 & g$1) { r$11.back = -1, r$11.mode = 12; break; } if (64 & g$1) { e$11.msg = "invalid literal/length code", r$11.mode = 30; break; } r$11.extra = 15 & g$1, r$11.mode = 22; case 22: if (r$11.extra) { for (z$2 = r$11.extra; l$4 < z$2;) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } r$11.length += u$5 & (1 << r$11.extra) - 1, u$5 >>>= r$11.extra, l$4 -= r$11.extra, r$11.back += r$11.extra; } r$11.was = r$11.length, r$11.mode = 23; case 23: for (; g$1 = (C$2 = r$11.distcode[u$5 & (1 << r$11.distbits) - 1]) >>> 16 & 255, b$3 = 65535 & C$2, !((_$2 = C$2 >>> 24) <= l$4);) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } if (0 == (240 & g$1)) { for (v$3 = _$2, y$3 = g$1, w$2 = b$3; g$1 = (C$2 = r$11.distcode[w$2 + ((u$5 & (1 << v$3 + y$3) - 1) >> v$3)]) >>> 16 & 255, b$3 = 65535 & C$2, !(v$3 + (_$2 = C$2 >>> 24) <= l$4);) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } u$5 >>>= v$3, l$4 -= v$3, r$11.back += v$3; } if (u$5 >>>= _$2, l$4 -= _$2, r$11.back += _$2, 64 & g$1) { e$11.msg = "invalid distance code", r$11.mode = 30; break; } r$11.offset = b$3, r$11.extra = 15 & g$1, r$11.mode = 24; case 24: if (r$11.extra) { for (z$2 = r$11.extra; l$4 < z$2;) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } r$11.offset += u$5 & (1 << r$11.extra) - 1, u$5 >>>= r$11.extra, l$4 -= r$11.extra, r$11.back += r$11.extra; } if (r$11.offset > r$11.dmax) { e$11.msg = "invalid distance too far back", r$11.mode = 30; break; } r$11.mode = 25; case 25: if (0 === h$6) break e; if (d$5 = c$8 - h$6, r$11.offset > d$5) { if ((d$5 = r$11.offset - d$5) > r$11.whave && r$11.sane) { e$11.msg = "invalid distance too far back", r$11.mode = 30; break; } p$3 = d$5 > r$11.wnext ? (d$5 -= r$11.wnext, r$11.wsize - d$5) : r$11.wnext - d$5, d$5 > r$11.length && (d$5 = r$11.length), m$3 = r$11.window; } else m$3 = i$8, p$3 = a$3 - r$11.offset, d$5 = r$11.length; for (h$6 < d$5 && (d$5 = h$6), h$6 -= d$5, r$11.length -= d$5; i$8[a$3++] = m$3[p$3++], --d$5;); 0 === r$11.length && (r$11.mode = 21); break; case 26: if (0 === h$6) break e; i$8[a$3++] = r$11.length, h$6--, r$11.mode = 21; break; case 27: if (r$11.wrap) { for (; l$4 < 32;) { if (0 === o$11) break e; o$11--, u$5 |= n$10[s$6++] << l$4, l$4 += 8; } if (c$8 -= h$6, e$11.total_out += c$8, r$11.total += c$8, c$8 && (e$11.adler = r$11.check = r$11.flags ? B$2(r$11.check, i$8, c$8, a$3 - c$8) : O(r$11.check, i$8, c$8, a$3 - c$8)), c$8 = h$6, (r$11.flags ? u$5 : L$2(u$5)) !== r$11.check) { e$11.msg = "incorrect data check", r$11.mode = 30; break; } l$4 = u$5 = 0; } r$11.mode = 28; case 28: if (r$11.wrap && r$11.flags) { for (; l$4 < 32;) { if (0 === o$11) break e; o$11--, u$5 += n$10[s$6++] << l$4, l$4 += 8; } if (u$5 !== (4294967295 & r$11.total)) { e$11.msg = "incorrect length check", r$11.mode = 30; break; } l$4 = u$5 = 0; } r$11.mode = 29; case 29: x$2 = 1; break e; case 30: x$2 = -3; break e; case 31: return -4; case 32: default: return U$1; } return e$11.next_out = a$3, e$11.avail_out = h$6, e$11.next_in = s$6, e$11.avail_in = o$11, r$11.hold = u$5, r$11.bits = l$4, (r$11.wsize || c$8 !== e$11.avail_out && r$11.mode < 30 && (r$11.mode < 27 || 4 !== t$7)) && Z$1(e$11, e$11.output, e$11.next_out, c$8 - e$11.avail_out) ? (r$11.mode = 31, -4) : (f$5 -= e$11.avail_in, c$8 -= e$11.avail_out, e$11.total_in += f$5, e$11.total_out += c$8, r$11.total += c$8, r$11.wrap && c$8 && (e$11.adler = r$11.check = r$11.flags ? B$2(r$11.check, i$8, c$8, e$11.next_out - c$8) : O(r$11.check, i$8, c$8, e$11.next_out - c$8)), e$11.data_type = r$11.bits + (r$11.last ? 64 : 0) + (12 === r$11.mode ? 128 : 0) + (20 === r$11.mode || 15 === r$11.mode ? 256 : 0), (0 == f$5 && 0 === c$8 || 4 === t$7) && x$2 === N$2 && (x$2 = -5), x$2); }, r$10.inflateEnd = function(e$11) { if (!e$11 || !e$11.state) return U$1; var t$7 = e$11.state; return t$7.window && (t$7.window = null), e$11.state = null, N$2; }, r$10.inflateGetHeader = function(e$11, t$7) { var r$11; return e$11 && e$11.state ? 0 == (2 & (r$11 = e$11.state).wrap) ? U$1 : ((r$11.head = t$7).done = !1, N$2) : U$1; }, r$10.inflateSetDictionary = function(e$11, t$7) { var r$11, n$10 = t$7.length; return e$11 && e$11.state ? 0 !== (r$11 = e$11.state).wrap && 11 !== r$11.mode ? U$1 : 11 === r$11.mode && O(1, t$7, n$10, 0) !== r$11.check ? -3 : Z$1(e$11, t$7, n$10, n$10) ? (r$11.mode = 31, -4) : (r$11.havedict = 1, N$2) : U$1; }, r$10.inflateInfo = "pako inflate (from Nodeca project)"; }, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(e$10, t$6, r$10) { "use strict"; var D$2 = e$10("../utils/common"), F$1 = [ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 ], N$2 = [ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 ], U$1 = [ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0 ], P$2 = [ 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64 ]; t$6.exports = function(e$11, t$7, r$11, n$9, i$7, s$5, a$2, o$10) { var h$5, u$4, l$3, f$4, c$7, d$5, p$3, m$3, _$2, g$1 = o$10.bits, b$3 = 0, v$3 = 0, y$3 = 0, w$2 = 0, k$2 = 0, x$2 = 0, S$4 = 0, z$2 = 0, C$2 = 0, E$2 = 0, A$1 = null, I$2 = 0, O = new D$2.Buf16(16), B$2 = new D$2.Buf16(16), R$1 = null, T$3 = 0; for (b$3 = 0; b$3 <= 15; b$3++) O[b$3] = 0; for (v$3 = 0; v$3 < n$9; v$3++) O[t$7[r$11 + v$3]]++; for (k$2 = g$1, w$2 = 15; 1 <= w$2 && 0 === O[w$2]; w$2--); if (w$2 < k$2 && (k$2 = w$2), 0 === w$2) return i$7[s$5++] = 20971520, i$7[s$5++] = 20971520, o$10.bits = 1, 0; for (y$3 = 1; y$3 < w$2 && 0 === O[y$3]; y$3++); for (k$2 < y$3 && (k$2 = y$3), b$3 = z$2 = 1; b$3 <= 15; b$3++) if (z$2 <<= 1, (z$2 -= O[b$3]) < 0) return -1; if (0 < z$2 && (0 === e$11 || 1 !== w$2)) return -1; for (B$2[1] = 0, b$3 = 1; b$3 < 15; b$3++) B$2[b$3 + 1] = B$2[b$3] + O[b$3]; for (v$3 = 0; v$3 < n$9; v$3++) 0 !== t$7[r$11 + v$3] && (a$2[B$2[t$7[r$11 + v$3]]++] = v$3); if (d$5 = 0 === e$11 ? (A$1 = R$1 = a$2, 19) : 1 === e$11 ? (A$1 = F$1, I$2 -= 257, R$1 = N$2, T$3 -= 257, 256) : (A$1 = U$1, R$1 = P$2, -1), b$3 = y$3, c$7 = s$5, S$4 = v$3 = E$2 = 0, l$3 = -1, f$4 = (C$2 = 1 << (x$2 = k$2)) - 1, 1 === e$11 && 852 < C$2 || 2 === e$11 && 592 < C$2) return 1; for (;;) { for (p$3 = b$3 - S$4, _$2 = a$2[v$3] < d$5 ? (m$3 = 0, a$2[v$3]) : a$2[v$3] > d$5 ? (m$3 = R$1[T$3 + a$2[v$3]], A$1[I$2 + a$2[v$3]]) : (m$3 = 96, 0), h$5 = 1 << b$3 - S$4, y$3 = u$4 = 1 << x$2; i$7[c$7 + (E$2 >> S$4) + (u$4 -= h$5)] = p$3 << 24 | m$3 << 16 | _$2 | 0, 0 !== u$4;); for (h$5 = 1 << b$3 - 1; E$2 & h$5;) h$5 >>= 1; if (0 !== h$5 ? (E$2 &= h$5 - 1, E$2 += h$5) : E$2 = 0, v$3++, 0 == --O[b$3]) { if (b$3 === w$2) break; b$3 = t$7[r$11 + a$2[v$3]]; } if (k$2 < b$3 && (E$2 & f$4) !== l$3) { for (0 === S$4 && (S$4 = k$2), c$7 += y$3, z$2 = 1 << (x$2 = b$3 - S$4); x$2 + S$4 < w$2 && !((z$2 -= O[x$2 + S$4]) <= 0);) x$2++, z$2 <<= 1; if (C$2 += 1 << x$2, 1 === e$11 && 852 < C$2 || 2 === e$11 && 592 < C$2) return 1; i$7[l$3 = E$2 & f$4] = k$2 << 24 | x$2 << 16 | c$7 - s$5 | 0; } } return 0 !== E$2 && (i$7[c$7 + E$2] = b$3 - S$4 << 24 | 64 << 16 | 0), o$10.bits = k$2, 0; }; }, { "../utils/common": 41 }], 51: [function(e$10, t$6, r$10) { "use strict"; t$6.exports = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" }; }, {}], 52: [function(e$10, t$6, r$10) { "use strict"; var i$7 = e$10("../utils/common"), o$10 = 0, h$5 = 1; function n$9(e$11) { for (var t$7 = e$11.length; 0 <= --t$7;) e$11[t$7] = 0; } var s$5 = 0, a$2 = 29, u$4 = 256, l$3 = u$4 + 1 + a$2, f$4 = 30, c$7 = 19, _$2 = 2 * l$3 + 1, g$1 = 15, d$5 = 16, p$3 = 7, m$3 = 256, b$3 = 16, v$3 = 17, y$3 = 18, w$2 = [ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0 ], k$2 = [ 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13 ], x$2 = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7 ], S$4 = [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ], z$2 = new Array(2 * (l$3 + 2)); n$9(z$2); var C$2 = new Array(2 * f$4); n$9(C$2); var E$2 = new Array(512); n$9(E$2); var A$1 = new Array(256); n$9(A$1); var I$2 = new Array(a$2); n$9(I$2); var O, B$2, R$1, T$3 = new Array(f$4); function D$2(e$11, t$7, r$11, n$10, i$8) { this.static_tree = e$11, this.extra_bits = t$7, this.extra_base = r$11, this.elems = n$10, this.max_length = i$8, this.has_stree = e$11 && e$11.length; } function F$1(e$11, t$7) { this.dyn_tree = e$11, this.max_code = 0, this.stat_desc = t$7; } function N$2(e$11) { return e$11 < 256 ? E$2[e$11] : E$2[256 + (e$11 >>> 7)]; } function U$1(e$11, t$7) { e$11.pending_buf[e$11.pending++] = 255 & t$7, e$11.pending_buf[e$11.pending++] = t$7 >>> 8 & 255; } function P$2(e$11, t$7, r$11) { e$11.bi_valid > d$5 - r$11 ? (e$11.bi_buf |= t$7 << e$11.bi_valid & 65535, U$1(e$11, e$11.bi_buf), e$11.bi_buf = t$7 >> d$5 - e$11.bi_valid, e$11.bi_valid += r$11 - d$5) : (e$11.bi_buf |= t$7 << e$11.bi_valid & 65535, e$11.bi_valid += r$11); } function L$2(e$11, t$7, r$11) { P$2(e$11, r$11[2 * t$7], r$11[2 * t$7 + 1]); } function j$2(e$11, t$7) { for (var r$11 = 0; r$11 |= 1 & e$11, e$11 >>>= 1, r$11 <<= 1, 0 < --t$7;); return r$11 >>> 1; } function Z$1(e$11, t$7, r$11) { var n$10, i$8, s$6 = new Array(g$1 + 1), a$3 = 0; for (n$10 = 1; n$10 <= g$1; n$10++) s$6[n$10] = a$3 = a$3 + r$11[n$10 - 1] << 1; for (i$8 = 0; i$8 <= t$7; i$8++) { var o$11 = e$11[2 * i$8 + 1]; 0 !== o$11 && (e$11[2 * i$8] = j$2(s$6[o$11]++, o$11)); } } function W$1(e$11) { var t$7; for (t$7 = 0; t$7 < l$3; t$7++) e$11.dyn_ltree[2 * t$7] = 0; for (t$7 = 0; t$7 < f$4; t$7++) e$11.dyn_dtree[2 * t$7] = 0; for (t$7 = 0; t$7 < c$7; t$7++) e$11.bl_tree[2 * t$7] = 0; e$11.dyn_ltree[2 * m$3] = 1, e$11.opt_len = e$11.static_len = 0, e$11.last_lit = e$11.matches = 0; } function M$3(e$11) { 8 < e$11.bi_valid ? U$1(e$11, e$11.bi_buf) : 0 < e$11.bi_valid && (e$11.pending_buf[e$11.pending++] = e$11.bi_buf), e$11.bi_buf = 0, e$11.bi_valid = 0; } function H$1(e$11, t$7, r$11, n$10) { var i$8 = 2 * t$7, s$6 = 2 * r$11; return e$11[i$8] < e$11[s$6] || e$11[i$8] === e$11[s$6] && n$10[t$7] <= n$10[r$11]; } function G$1(e$11, t$7, r$11) { for (var n$10 = e$11.heap[r$11], i$8 = r$11 << 1; i$8 <= e$11.heap_len && (i$8 < e$11.heap_len && H$1(t$7, e$11.heap[i$8 + 1], e$11.heap[i$8], e$11.depth) && i$8++, !H$1(t$7, n$10, e$11.heap[i$8], e$11.depth));) e$11.heap[r$11] = e$11.heap[i$8], r$11 = i$8, i$8 <<= 1; e$11.heap[r$11] = n$10; } function K$1(e$11, t$7, r$11) { var n$10, i$8, s$6, a$3, o$11 = 0; if (0 !== e$11.last_lit) for (; n$10 = e$11.pending_buf[e$11.d_buf + 2 * o$11] << 8 | e$11.pending_buf[e$11.d_buf + 2 * o$11 + 1], i$8 = e$11.pending_buf[e$11.l_buf + o$11], o$11++, 0 === n$10 ? L$2(e$11, i$8, t$7) : (L$2(e$11, (s$6 = A$1[i$8]) + u$4 + 1, t$7), 0 !== (a$3 = w$2[s$6]) && P$2(e$11, i$8 -= I$2[s$6], a$3), L$2(e$11, s$6 = N$2(--n$10), r$11), 0 !== (a$3 = k$2[s$6]) && P$2(e$11, n$10 -= T$3[s$6], a$3)), o$11 < e$11.last_lit;); L$2(e$11, m$3, t$7); } function Y(e$11, t$7) { var r$11, n$10, i$8, s$6 = t$7.dyn_tree, a$3 = t$7.stat_desc.static_tree, o$11 = t$7.stat_desc.has_stree, h$6 = t$7.stat_desc.elems, u$5 = -1; for (e$11.heap_len = 0, e$11.heap_max = _$2, r$11 = 0; r$11 < h$6; r$11++) 0 !== s$6[2 * r$11] ? (e$11.heap[++e$11.heap_len] = u$5 = r$11, e$11.depth[r$11] = 0) : s$6[2 * r$11 + 1] = 0; for (; e$11.heap_len < 2;) s$6[2 * (i$8 = e$11.heap[++e$11.heap_len] = u$5 < 2 ? ++u$5 : 0)] = 1, e$11.depth[i$8] = 0, e$11.opt_len--, o$11 && (e$11.static_len -= a$3[2 * i$8 + 1]); for (t$7.max_code = u$5, r$11 = e$11.heap_len >> 1; 1 <= r$11; r$11--) G$1(e$11, s$6, r$11); for (i$8 = h$6; r$11 = e$11.heap[1], e$11.heap[1] = e$11.heap[e$11.heap_len--], G$1(e$11, s$6, 1), n$10 = e$11.heap[1], e$11.heap[--e$11.heap_max] = r$11, e$11.heap[--e$11.heap_max] = n$10, s$6[2 * i$8] = s$6[2 * r$11] + s$6[2 * n$10], e$11.depth[i$8] = (e$11.depth[r$11] >= e$11.depth[n$10] ? e$11.depth[r$11] : e$11.depth[n$10]) + 1, s$6[2 * r$11 + 1] = s$6[2 * n$10 + 1] = i$8, e$11.heap[1] = i$8++, G$1(e$11, s$6, 1), 2 <= e$11.heap_len;); e$11.heap[--e$11.heap_max] = e$11.heap[1], function(e$12, t$8) { var r$12, n$11, i$9, s$7, a$4, o$12, h$7 = t$8.dyn_tree, u$6 = t$8.max_code, l$4 = t$8.stat_desc.static_tree, f$5 = t$8.stat_desc.has_stree, c$8 = t$8.stat_desc.extra_bits, d$6 = t$8.stat_desc.extra_base, p$4 = t$8.stat_desc.max_length, m$4 = 0; for (s$7 = 0; s$7 <= g$1; s$7++) e$12.bl_count[s$7] = 0; for (h$7[2 * e$12.heap[e$12.heap_max] + 1] = 0, r$12 = e$12.heap_max + 1; r$12 < _$2; r$12++) p$4 < (s$7 = h$7[2 * h$7[2 * (n$11 = e$12.heap[r$12]) + 1] + 1] + 1) && (s$7 = p$4, m$4++), h$7[2 * n$11 + 1] = s$7, u$6 < n$11 || (e$12.bl_count[s$7]++, a$4 = 0, d$6 <= n$11 && (a$4 = c$8[n$11 - d$6]), o$12 = h$7[2 * n$11], e$12.opt_len += o$12 * (s$7 + a$4), f$5 && (e$12.static_len += o$12 * (l$4[2 * n$11 + 1] + a$4))); if (0 !== m$4) { do { for (s$7 = p$4 - 1; 0 === e$12.bl_count[s$7];) s$7--; e$12.bl_count[s$7]--, e$12.bl_count[s$7 + 1] += 2, e$12.bl_count[p$4]--, m$4 -= 2; } while (0 < m$4); for (s$7 = p$4; 0 !== s$7; s$7--) for (n$11 = e$12.bl_count[s$7]; 0 !== n$11;) u$6 < (i$9 = e$12.heap[--r$12]) || (h$7[2 * i$9 + 1] !== s$7 && (e$12.opt_len += (s$7 - h$7[2 * i$9 + 1]) * h$7[2 * i$9], h$7[2 * i$9 + 1] = s$7), n$11--); } }(e$11, t$7), Z$1(s$6, u$5, e$11.bl_count); } function X$2(e$11, t$7, r$11) { var n$10, i$8, s$6 = -1, a$3 = t$7[1], o$11 = 0, h$6 = 7, u$5 = 4; for (0 === a$3 && (h$6 = 138, u$5 = 3), t$7[2 * (r$11 + 1) + 1] = 65535, n$10 = 0; n$10 <= r$11; n$10++) i$8 = a$3, a$3 = t$7[2 * (n$10 + 1) + 1], ++o$11 < h$6 && i$8 === a$3 || (o$11 < u$5 ? e$11.bl_tree[2 * i$8] += o$11 : 0 !== i$8 ? (i$8 !== s$6 && e$11.bl_tree[2 * i$8]++, e$11.bl_tree[2 * b$3]++) : o$11 <= 10 ? e$11.bl_tree[2 * v$3]++ : e$11.bl_tree[2 * y$3]++, s$6 = i$8, u$5 = (o$11 = 0) === a$3 ? (h$6 = 138, 3) : i$8 === a$3 ? (h$6 = 6, 3) : (h$6 = 7, 4)); } function V$2(e$11, t$7, r$11) { var n$10, i$8, s$6 = -1, a$3 = t$7[1], o$11 = 0, h$6 = 7, u$5 = 4; for (0 === a$3 && (h$6 = 138, u$5 = 3), n$10 = 0; n$10 <= r$11; n$10++) if (i$8 = a$3, a$3 = t$7[2 * (n$10 + 1) + 1], !(++o$11 < h$6 && i$8 === a$3)) { if (o$11 < u$5) for (; L$2(e$11, i$8, e$11.bl_tree), 0 != --o$11;); else 0 !== i$8 ? (i$8 !== s$6 && (L$2(e$11, i$8, e$11.bl_tree), o$11--), L$2(e$11, b$3, e$11.bl_tree), P$2(e$11, o$11 - 3, 2)) : o$11 <= 10 ? (L$2(e$11, v$3, e$11.bl_tree), P$2(e$11, o$11 - 3, 3)) : (L$2(e$11, y$3, e$11.bl_tree), P$2(e$11, o$11 - 11, 7)); s$6 = i$8, u$5 = (o$11 = 0) === a$3 ? (h$6 = 138, 3) : i$8 === a$3 ? (h$6 = 6, 3) : (h$6 = 7, 4); } } n$9(T$3); var q$2 = !1; function J$1(e$11, t$7, r$11, n$10) { P$2(e$11, (s$5 << 1) + (n$10 ? 1 : 0), 3), function(e$12, t$8, r$12, n$11) { M$3(e$12), n$11 && (U$1(e$12, r$12), U$1(e$12, ~r$12)), i$7.arraySet(e$12.pending_buf, e$12.window, t$8, r$12, e$12.pending), e$12.pending += r$12; }(e$11, t$7, r$11, !0); } r$10._tr_init = function(e$11) { q$2 || (function() { var e$12, t$7, r$11, n$10, i$8, s$6 = new Array(g$1 + 1); for (n$10 = r$11 = 0; n$10 < a$2 - 1; n$10++) for (I$2[n$10] = r$11, e$12 = 0; e$12 < 1 << w$2[n$10]; e$12++) A$1[r$11++] = n$10; for (A$1[r$11 - 1] = n$10, n$10 = i$8 = 0; n$10 < 16; n$10++) for (T$3[n$10] = i$8, e$12 = 0; e$12 < 1 << k$2[n$10]; e$12++) E$2[i$8++] = n$10; for (i$8 >>= 7; n$10 < f$4; n$10++) for (T$3[n$10] = i$8 << 7, e$12 = 0; e$12 < 1 << k$2[n$10] - 7; e$12++) E$2[256 + i$8++] = n$10; for (t$7 = 0; t$7 <= g$1; t$7++) s$6[t$7] = 0; for (e$12 = 0; e$12 <= 143;) z$2[2 * e$12 + 1] = 8, e$12++, s$6[8]++; for (; e$12 <= 255;) z$2[2 * e$12 + 1] = 9, e$12++, s$6[9]++; for (; e$12 <= 279;) z$2[2 * e$12 + 1] = 7, e$12++, s$6[7]++; for (; e$12 <= 287;) z$2[2 * e$12 + 1] = 8, e$12++, s$6[8]++; for (Z$1(z$2, l$3 + 1, s$6), e$12 = 0; e$12 < f$4; e$12++) C$2[2 * e$12 + 1] = 5, C$2[2 * e$12] = j$2(e$12, 5); O = new D$2(z$2, w$2, u$4 + 1, l$3, g$1), B$2 = new D$2(C$2, k$2, 0, f$4, g$1), R$1 = new D$2(new Array(0), x$2, 0, c$7, p$3); }(), q$2 = !0), e$11.l_desc = new F$1(e$11.dyn_ltree, O), e$11.d_desc = new F$1(e$11.dyn_dtree, B$2), e$11.bl_desc = new F$1(e$11.bl_tree, R$1), e$11.bi_buf = 0, e$11.bi_valid = 0, W$1(e$11); }, r$10._tr_stored_block = J$1, r$10._tr_flush_block = function(e$11, t$7, r$11, n$10) { var i$8, s$6, a$3 = 0; 0 < e$11.level ? (2 === e$11.strm.data_type && (e$11.strm.data_type = function(e$12) { var t$8, r$12 = 4093624447; for (t$8 = 0; t$8 <= 31; t$8++, r$12 >>>= 1) if (1 & r$12 && 0 !== e$12.dyn_ltree[2 * t$8]) return o$10; if (0 !== e$12.dyn_ltree[18] || 0 !== e$12.dyn_ltree[20] || 0 !== e$12.dyn_ltree[26]) return h$5; for (t$8 = 32; t$8 < u$4; t$8++) if (0 !== e$12.dyn_ltree[2 * t$8]) return h$5; return o$10; }(e$11)), Y(e$11, e$11.l_desc), Y(e$11, e$11.d_desc), a$3 = function(e$12) { var t$8; for (X$2(e$12, e$12.dyn_ltree, e$12.l_desc.max_code), X$2(e$12, e$12.dyn_dtree, e$12.d_desc.max_code), Y(e$12, e$12.bl_desc), t$8 = c$7 - 1; 3 <= t$8 && 0 === e$12.bl_tree[2 * S$4[t$8] + 1]; t$8--); return e$12.opt_len += 3 * (t$8 + 1) + 5 + 5 + 4, t$8; }(e$11), i$8 = e$11.opt_len + 3 + 7 >>> 3, (s$6 = e$11.static_len + 3 + 7 >>> 3) <= i$8 && (i$8 = s$6)) : i$8 = s$6 = r$11 + 5, r$11 + 4 <= i$8 && -1 !== t$7 ? J$1(e$11, t$7, r$11, n$10) : 4 === e$11.strategy || s$6 === i$8 ? (P$2(e$11, 2 + (n$10 ? 1 : 0), 3), K$1(e$11, z$2, C$2)) : (P$2(e$11, 4 + (n$10 ? 1 : 0), 3), function(e$12, t$8, r$12, n$11) { var i$9; for (P$2(e$12, t$8 - 257, 5), P$2(e$12, r$12 - 1, 5), P$2(e$12, n$11 - 4, 4), i$9 = 0; i$9 < n$11; i$9++) P$2(e$12, e$12.bl_tree[2 * S$4[i$9] + 1], 3); V$2(e$12, e$12.dyn_ltree, t$8 - 1), V$2(e$12, e$12.dyn_dtree, r$12 - 1); }(e$11, e$11.l_desc.max_code + 1, e$11.d_desc.max_code + 1, a$3 + 1), K$1(e$11, e$11.dyn_ltree, e$11.dyn_dtree)), W$1(e$11), n$10 && M$3(e$11); }, r$10._tr_tally = function(e$11, t$7, r$11) { return e$11.pending_buf[e$11.d_buf + 2 * e$11.last_lit] = t$7 >>> 8 & 255, e$11.pending_buf[e$11.d_buf + 2 * e$11.last_lit + 1] = 255 & t$7, e$11.pending_buf[e$11.l_buf + e$11.last_lit] = 255 & r$11, e$11.last_lit++, 0 === t$7 ? e$11.dyn_ltree[2 * r$11]++ : (e$11.matches++, t$7--, e$11.dyn_ltree[2 * (A$1[r$11] + u$4 + 1)]++, e$11.dyn_dtree[2 * N$2(t$7)]++), e$11.last_lit === e$11.lit_bufsize - 1; }, r$10._tr_align = function(e$11) { P$2(e$11, 2, 3), L$2(e$11, m$3, z$2), function(e$12) { 16 === e$12.bi_valid ? (U$1(e$12, e$12.bi_buf), e$12.bi_buf = 0, e$12.bi_valid = 0) : 8 <= e$12.bi_valid && (e$12.pending_buf[e$12.pending++] = 255 & e$12.bi_buf, e$12.bi_buf >>= 8, e$12.bi_valid -= 8); }(e$11); }; }, { "../utils/common": 41 }], 53: [function(e$10, t$6, r$10) { "use strict"; t$6.exports = function() { this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0; }; }, {}], 54: [function(e$10, t$6, r$10) { (function(e$11) { !function(r$11, n$9) { "use strict"; if (!r$11.setImmediate) { var i$7, s$5, t$7, a$2, o$10 = 1, h$5 = {}, u$4 = !1, l$3 = r$11.document, e$12 = Object.getPrototypeOf && Object.getPrototypeOf(r$11); e$12 = e$12 && e$12.setTimeout ? e$12 : r$11, i$7 = "[object process]" === {}.toString.call(r$11.process) ? function(e$13) { process.nextTick(function() { c$7(e$13); }); } : function() { if (r$11.postMessage && !r$11.importScripts) { var e$13 = !0, t$8 = r$11.onmessage; return r$11.onmessage = function() { e$13 = !1; }, r$11.postMessage("", "*"), r$11.onmessage = t$8, e$13; } }() ? (a$2 = "setImmediate$" + Math.random() + "$", r$11.addEventListener ? r$11.addEventListener("message", d$5, !1) : r$11.attachEvent("onmessage", d$5), function(e$13) { r$11.postMessage(a$2 + e$13, "*"); }) : r$11.MessageChannel ? ((t$7 = new MessageChannel()).port1.onmessage = function(e$13) { c$7(e$13.data); }, function(e$13) { t$7.port2.postMessage(e$13); }) : l$3 && "onreadystatechange" in l$3.createElement("script") ? (s$5 = l$3.documentElement, function(e$13) { var t$8 = l$3.createElement("script"); t$8.onreadystatechange = function() { c$7(e$13), t$8.onreadystatechange = null, s$5.removeChild(t$8), t$8 = null; }, s$5.appendChild(t$8); }) : function(e$13) { setTimeout(c$7, 0, e$13); }, e$12.setImmediate = function(e$13) { "function" != typeof e$13 && (e$13 = new Function("" + e$13)); for (var t$8 = new Array(arguments.length - 1), r$12 = 0; r$12 < t$8.length; r$12++) t$8[r$12] = arguments[r$12 + 1]; var n$10 = { callback: e$13, args: t$8 }; return h$5[o$10] = n$10, i$7(o$10), o$10++; }, e$12.clearImmediate = f$4; } function f$4(e$13) { delete h$5[e$13]; } function c$7(e$13) { if (u$4) setTimeout(c$7, 0, e$13); else { var t$8 = h$5[e$13]; if (t$8) { u$4 = !0; try { !function(e$14) { var t$9 = e$14.callback, r$12 = e$14.args; switch (r$12.length) { case 0: t$9(); break; case 1: t$9(r$12[0]); break; case 2: t$9(r$12[0], r$12[1]); break; case 3: t$9(r$12[0], r$12[1], r$12[2]); break; default: t$9.apply(n$9, r$12); } }(t$8); } finally { f$4(e$13), u$4 = !1; } } } } function d$5(e$13) { e$13.source === r$11 && "string" == typeof e$13.data && 0 === e$13.data.indexOf(a$2) && c$7(+e$13.data.slice(a$2.length)); } }("undefined" == typeof self ? void 0 === e$11 ? this : e$11 : self); }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}); }, {}] }, {}, [10])(10); }); })); //#endregion //#region node_modules/docx-preview/dist/docx-preview.js var require_docx_preview = /* @__PURE__ */ __commonJSMin(((exports, module) => { /* * @license * docx-preview * Released under Apache License 2.0 * Copyright Volodymyr Baydalka */ (function(global$1, factory) { typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require_jszip_min()) : typeof define === "function" && define.amd ? define(["exports", "jszip"], factory) : (global$1 = typeof globalThis !== "undefined" ? globalThis : global$1 || self, factory(global$1.docx = {}, global$1.JSZip)); })(exports, (function(exports$1, JSZip$1) { "use strict"; var RelationshipTypes; (function(RelationshipTypes$1) { RelationshipTypes$1["OfficeDocument"] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"; RelationshipTypes$1["FontTable"] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable"; RelationshipTypes$1["Image"] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"; RelationshipTypes$1["Numbering"] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering"; RelationshipTypes$1["Styles"] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"; RelationshipTypes$1["StylesWithEffects"] = "http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects"; RelationshipTypes$1["Theme"] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"; RelationshipTypes$1["Settings"] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings"; RelationshipTypes$1["WebSettings"] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings"; RelationshipTypes$1["Hyperlink"] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"; RelationshipTypes$1["Footnotes"] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes"; RelationshipTypes$1["Endnotes"] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes"; RelationshipTypes$1["Footer"] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer"; RelationshipTypes$1["Header"] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header"; RelationshipTypes$1["ExtendedProperties"] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"; RelationshipTypes$1["CoreProperties"] = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"; RelationshipTypes$1["CustomProperties"] = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/custom-properties"; RelationshipTypes$1["Comments"] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments"; RelationshipTypes$1["CommentsExtended"] = "http://schemas.microsoft.com/office/2011/relationships/commentsExtended"; RelationshipTypes$1["AltChunk"] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk"; })(RelationshipTypes || (RelationshipTypes = {})); function parseRelationships(root, xml$2) { return xml$2.elements(root).map((e$10) => ({ id: xml$2.attr(e$10, "Id"), type: xml$2.attr(e$10, "Type"), target: xml$2.attr(e$10, "Target"), targetMode: xml$2.attr(e$10, "TargetMode") })); } function escapeClassName(className) { return className?.replace(/[ .]+/g, "-").replace(/[&]+/g, "and").toLowerCase(); } function encloseFontFamily(fontFamily) { return /^[^"'].*\s.*[^"']$/.test(fontFamily) ? `'${fontFamily}'` : fontFamily; } function splitPath(path$1) { let si = path$1.lastIndexOf("/") + 1; let folder = si == 0 ? "" : path$1.substring(0, si); let fileName = si == 0 ? path$1 : path$1.substring(si); return [folder, fileName]; } function resolvePath(path$1, base) { try { const prefix = "http://docx/"; const url = new URL(path$1, prefix + base).toString(); return url.substring(prefix.length); } catch { return `${base}${path$1}`; } } function keyBy(array, by) { return array.reduce((a$2, x$2) => { a$2[by(x$2)] = x$2; return a$2; }, {}); } function blobToBase64(blob) { return new Promise((resolve, reject) => { const reader = new FileReader(); reader.onloadend = () => resolve(reader.result); reader.onerror = () => reject(); reader.readAsDataURL(blob); }); } function isObject(item) { return item && typeof item === "object" && !Array.isArray(item); } function isString(item) { return typeof item === "string" || item instanceof String; } function mergeDeep(target, ...sources) { if (!sources.length) return target; const source$4 = sources.shift(); if (isObject(target) && isObject(source$4)) { for (const key in source$4) { if (isObject(source$4[key])) { const val$1 = target[key] ?? (target[key] = {}); mergeDeep(val$1, source$4[key]); } else { target[key] = source$4[key]; } } } return mergeDeep(target, ...sources); } function asArray(val$1) { return Array.isArray(val$1) ? val$1 : [val$1]; } function clamp(val$1, min, max) { return min > val$1 ? min : max < val$1 ? max : val$1; } const ns$1 = { wordml: "http://schemas.openxmlformats.org/wordprocessingml/2006/main" }; const LengthUsage = { Dxa: { mul: .05, unit: "pt" }, Emu: { mul: 1 / 12700, unit: "pt" }, FontSize: { mul: .5, unit: "pt" }, Border: { mul: .125, unit: "pt", min: .25, max: 12 }, Point: { mul: 1, unit: "pt" }, Percent: { mul: .02, unit: "%" } }; function convertLength(val$1, usage = LengthUsage.Dxa) { if (val$1 == null || /.+(p[xt]|[%])$/.test(val$1)) { return val$1; } var num = parseInt(val$1) * usage.mul; if (usage.min && usage.max) num = clamp(num, usage.min, usage.max); return `${num.toFixed(2)}${usage.unit}`; } function convertBoolean(v$3, defaultValue = false) { switch (v$3) { case "1": return true; case "0": return false; case "on": return true; case "off": return false; case "true": return true; case "false": return false; default: return defaultValue; } } function parseCommonProperty(elem, props, xml$2) { if (elem.namespaceURI != ns$1.wordml) return false; switch (elem.localName) { case "color": props.color = xml$2.attr(elem, "val"); break; case "sz": props.fontSize = xml$2.lengthAttr(elem, "val", LengthUsage.FontSize); break; default: return false; } return true; } function parseXmlString(xmlString, trimXmlDeclaration = false) { if (trimXmlDeclaration) xmlString = xmlString.replace(/<[?].*[?]>/, ""); xmlString = removeUTF8BOM(xmlString); const result = new DOMParser().parseFromString(xmlString, "application/xml"); const errorText = hasXmlParserError(result); if (errorText) throw new Error(errorText); return result; } function hasXmlParserError(doc) { return doc.getElementsByTagName("parsererror")[0]?.textContent; } function removeUTF8BOM(data) { return data.charCodeAt(0) === 65279 ? data.substring(1) : data; } function serializeXmlString(elem) { return new XMLSerializer().serializeToString(elem); } class XmlParser { elements(elem, localName = null) { const result = []; for (let i$7 = 0, l$3 = elem.childNodes.length; i$7 < l$3; i$7++) { let c$7 = elem.childNodes.item(i$7); if (c$7.nodeType == Node.ELEMENT_NODE && (localName == null || c$7.localName == localName)) result.push(c$7); } return result; } element(elem, localName) { for (let i$7 = 0, l$3 = elem.childNodes.length; i$7 < l$3; i$7++) { let c$7 = elem.childNodes.item(i$7); if (c$7.nodeType == 1 && c$7.localName == localName) return c$7; } return null; } elementAttr(elem, localName, attrLocalName) { var el = this.element(elem, localName); return el ? this.attr(el, attrLocalName) : undefined; } attrs(elem) { return Array.from(elem.attributes); } attr(elem, localName) { for (let i$7 = 0, l$3 = elem.attributes.length; i$7 < l$3; i$7++) { let a$2 = elem.attributes.item(i$7); if (a$2.localName == localName) return a$2.value; } return null; } intAttr(node, attrName, defaultValue = null) { var val$1 = this.attr(node, attrName); return val$1 ? parseInt(val$1) : defaultValue; } hexAttr(node, attrName, defaultValue = null) { var val$1 = this.attr(node, attrName); return val$1 ? parseInt(val$1, 16) : defaultValue; } floatAttr(node, attrName, defaultValue = null) { var val$1 = this.attr(node, attrName); return val$1 ? parseFloat(val$1) : defaultValue; } boolAttr(node, attrName, defaultValue = null) { return convertBoolean(this.attr(node, attrName), defaultValue); } lengthAttr(node, attrName, usage = LengthUsage.Dxa) { return convertLength(this.attr(node, attrName), usage); } } const globalXmlParser = new XmlParser(); class Part { constructor(_package, path$1) { this._package = _package; this.path = path$1; } async load() { this.rels = await this._package.loadRelationships(this.path); const xmlText = await this._package.load(this.path); const xmlDoc = this._package.parseXmlDocument(xmlText); if (this._package.options.keepOrigin) { this._xmlDocument = xmlDoc; } this.parseXml(xmlDoc.firstElementChild); } save() { this._package.update(this.path, serializeXmlString(this._xmlDocument)); } parseXml(root) {} } const embedFontTypeMap = { embedRegular: "regular", embedBold: "bold", embedItalic: "italic", embedBoldItalic: "boldItalic" }; function parseFonts(root, xml$2) { return xml$2.elements(root).map((el) => parseFont(el, xml$2)); } function parseFont(elem, xml$2) { let result = { name: xml$2.attr(elem, "name"), embedFontRefs: [] }; for (let el of xml$2.elements(elem)) { switch (el.localName) { case "family": result.family = xml$2.attr(el, "val"); break; case "altName": result.altName = xml$2.attr(el, "val"); break; case "embedRegular": case "embedBold": case "embedItalic": case "embedBoldItalic": result.embedFontRefs.push(parseEmbedFontRef(el, xml$2)); break; } } return result; } function parseEmbedFontRef(elem, xml$2) { return { id: xml$2.attr(elem, "id"), key: xml$2.attr(elem, "fontKey"), type: embedFontTypeMap[elem.localName] }; } class FontTablePart extends Part { parseXml(root) { this.fonts = parseFonts(root, this._package.xmlParser); } } class OpenXmlPackage { constructor(_zip, options) { this._zip = _zip; this.options = options; this.xmlParser = new XmlParser(); } get(path$1) { const p$3 = normalizePath(path$1); return this._zip.files[p$3] ?? this._zip.files[p$3.replace(/\//g, "\\")]; } update(path$1, content) { this._zip.file(path$1, content); } static async load(input, options) { const zip = await JSZip$1.loadAsync(input); return new OpenXmlPackage(zip, options); } save(type = "blob") { return this._zip.generateAsync({ type }); } load(path$1, type = "string") { return this.get(path$1)?.async(type) ?? Promise.resolve(null); } async loadRelationships(path$1 = null) { let relsPath = `_rels/.rels`; if (path$1 != null) { const [f$4, fn] = splitPath(path$1); relsPath = `${f$4}_rels/${fn}.rels`; } const txt = await this.load(relsPath); return txt ? parseRelationships(this.parseXmlDocument(txt).firstElementChild, this.xmlParser) : null; } parseXmlDocument(txt) { return parseXmlString(txt, this.options.trimXmlDeclaration); } } function normalizePath(path$1) { return path$1.startsWith("/") ? path$1.substr(1) : path$1; } class DocumentPart extends Part { constructor(pkg, path$1, parser) { super(pkg, path$1); this._documentParser = parser; } parseXml(root) { this.body = this._documentParser.parseDocumentFile(root); } } function parseBorder(elem, xml$2) { return { type: xml$2.attr(elem, "val"), color: xml$2.attr(elem, "color"), size: xml$2.lengthAttr(elem, "sz", LengthUsage.Border), offset: xml$2.lengthAttr(elem, "space", LengthUsage.Point), frame: xml$2.boolAttr(elem, "frame"), shadow: xml$2.boolAttr(elem, "shadow") }; } function parseBorders(elem, xml$2) { var result = {}; for (let e$10 of xml$2.elements(elem)) { switch (e$10.localName) { case "left": result.left = parseBorder(e$10, xml$2); break; case "top": result.top = parseBorder(e$10, xml$2); break; case "right": result.right = parseBorder(e$10, xml$2); break; case "bottom": result.bottom = parseBorder(e$10, xml$2); break; } } return result; } var SectionType; (function(SectionType$1) { SectionType$1["Continuous"] = "continuous"; SectionType$1["NextPage"] = "nextPage"; SectionType$1["NextColumn"] = "nextColumn"; SectionType$1["EvenPage"] = "evenPage"; SectionType$1["OddPage"] = "oddPage"; })(SectionType || (SectionType = {})); function parseSectionProperties(elem, xml$2 = globalXmlParser) { var section = {}; for (let e$10 of xml$2.elements(elem)) { switch (e$10.localName) { case "pgSz": section.pageSize = { width: xml$2.lengthAttr(e$10, "w"), height: xml$2.lengthAttr(e$10, "h"), orientation: xml$2.attr(e$10, "orient") }; break; case "type": section.type = xml$2.attr(e$10, "val"); break; case "pgMar": section.pageMargins = { left: xml$2.lengthAttr(e$10, "left"), right: xml$2.lengthAttr(e$10, "right"), top: xml$2.lengthAttr(e$10, "top"), bottom: xml$2.lengthAttr(e$10, "bottom"), header: xml$2.lengthAttr(e$10, "header"), footer: xml$2.lengthAttr(e$10, "footer"), gutter: xml$2.lengthAttr(e$10, "gutter") }; break; case "cols": section.columns = parseColumns(e$10, xml$2); break; case "headerReference": (section.headerRefs ?? (section.headerRefs = [])).push(parseFooterHeaderReference(e$10, xml$2)); break; case "footerReference": (section.footerRefs ?? (section.footerRefs = [])).push(parseFooterHeaderReference(e$10, xml$2)); break; case "titlePg": section.titlePage = xml$2.boolAttr(e$10, "val", true); break; case "pgBorders": section.pageBorders = parseBorders(e$10, xml$2); break; case "pgNumType": section.pageNumber = parsePageNumber(e$10, xml$2); break; } } return section; } function parseColumns(elem, xml$2) { return { numberOfColumns: xml$2.intAttr(elem, "num"), space: xml$2.lengthAttr(elem, "space"), separator: xml$2.boolAttr(elem, "sep"), equalWidth: xml$2.boolAttr(elem, "equalWidth", true), columns: xml$2.elements(elem, "col").map((e$10) => ({ width: xml$2.lengthAttr(e$10, "w"), space: xml$2.lengthAttr(e$10, "space") })) }; } function parsePageNumber(elem, xml$2) { return { chapSep: xml$2.attr(elem, "chapSep"), chapStyle: xml$2.attr(elem, "chapStyle"), format: xml$2.attr(elem, "fmt"), start: xml$2.intAttr(elem, "start") }; } function parseFooterHeaderReference(elem, xml$2) { return { id: xml$2.attr(elem, "id"), type: xml$2.attr(elem, "type") }; } function parseLineSpacing(elem, xml$2) { return { before: xml$2.lengthAttr(elem, "before"), after: xml$2.lengthAttr(elem, "after"), line: xml$2.intAttr(elem, "line"), lineRule: xml$2.attr(elem, "lineRule") }; } function parseRunProperties(elem, xml$2) { let result = {}; for (let el of xml$2.elements(elem)) { parseRunProperty(el, result, xml$2); } return result; } function parseRunProperty(elem, props, xml$2) { if (parseCommonProperty(elem, props, xml$2)) return true; return false; } function parseParagraphProperties(elem, xml$2) { let result = {}; for (let el of xml$2.elements(elem)) { parseParagraphProperty(el, result, xml$2); } return result; } function parseParagraphProperty(elem, props, xml$2) { if (elem.namespaceURI != ns$1.wordml) return false; if (parseCommonProperty(elem, props, xml$2)) return true; switch (elem.localName) { case "tabs": props.tabs = parseTabs(elem, xml$2); break; case "sectPr": props.sectionProps = parseSectionProperties(elem, xml$2); break; case "numPr": props.numbering = parseNumbering$1(elem, xml$2); break; case "spacing": props.lineSpacing = parseLineSpacing(elem, xml$2); return false; case "textAlignment": props.textAlignment = xml$2.attr(elem, "val"); return false; case "keepLines": props.keepLines = xml$2.boolAttr(elem, "val", true); break; case "keepNext": props.keepNext = xml$2.boolAttr(elem, "val", true); break; case "pageBreakBefore": props.pageBreakBefore = xml$2.boolAttr(elem, "val", true); break; case "outlineLvl": props.outlineLevel = xml$2.intAttr(elem, "val"); break; case "pStyle": props.styleName = xml$2.attr(elem, "val"); break; case "rPr": props.runProps = parseRunProperties(elem, xml$2); break; default: return false; } return true; } function parseTabs(elem, xml$2) { return xml$2.elements(elem, "tab").map((e$10) => ({ position: xml$2.lengthAttr(e$10, "pos"), leader: xml$2.attr(e$10, "leader"), style: xml$2.attr(e$10, "val") })); } function parseNumbering$1(elem, xml$2) { var result = {}; for (let e$10 of xml$2.elements(elem)) { switch (e$10.localName) { case "numId": result.id = xml$2.attr(e$10, "val"); break; case "ilvl": result.level = xml$2.intAttr(e$10, "val"); break; } } return result; } function parseNumberingPart(elem, xml$2) { let result = { numberings: [], abstractNumberings: [], bulletPictures: [] }; for (let e$10 of xml$2.elements(elem)) { switch (e$10.localName) { case "num": result.numberings.push(parseNumbering(e$10, xml$2)); break; case "abstractNum": result.abstractNumberings.push(parseAbstractNumbering(e$10, xml$2)); break; case "numPicBullet": result.bulletPictures.push(parseNumberingBulletPicture(e$10, xml$2)); break; } } return result; } function parseNumbering(elem, xml$2) { let result = { id: xml$2.attr(elem, "numId"), overrides: [] }; for (let e$10 of xml$2.elements(elem)) { switch (e$10.localName) { case "abstractNumId": result.abstractId = xml$2.attr(e$10, "val"); break; case "lvlOverride": result.overrides.push(parseNumberingLevelOverrride(e$10, xml$2)); break; } } return result; } function parseAbstractNumbering(elem, xml$2) { let result = { id: xml$2.attr(elem, "abstractNumId"), levels: [] }; for (let e$10 of xml$2.elements(elem)) { switch (e$10.localName) { case "name": result.name = xml$2.attr(e$10, "val"); break; case "multiLevelType": result.multiLevelType = xml$2.attr(e$10, "val"); break; case "numStyleLink": result.numberingStyleLink = xml$2.attr(e$10, "val"); break; case "styleLink": result.styleLink = xml$2.attr(e$10, "val"); break; case "lvl": result.levels.push(parseNumberingLevel(e$10, xml$2)); break; } } return result; } function parseNumberingLevel(elem, xml$2) { let result = { level: xml$2.intAttr(elem, "ilvl") }; for (let e$10 of xml$2.elements(elem)) { switch (e$10.localName) { case "start": result.start = xml$2.attr(e$10, "val"); break; case "lvlRestart": result.restart = xml$2.intAttr(e$10, "val"); break; case "numFmt": result.format = xml$2.attr(e$10, "val"); break; case "lvlText": result.text = xml$2.attr(e$10, "val"); break; case "lvlJc": result.justification = xml$2.attr(e$10, "val"); break; case "lvlPicBulletId": result.bulletPictureId = xml$2.attr(e$10, "val"); break; case "pStyle": result.paragraphStyle = xml$2.attr(e$10, "val"); break; case "pPr": result.paragraphProps = parseParagraphProperties(e$10, xml$2); break; case "rPr": result.runProps = parseRunProperties(e$10, xml$2); break; } } return result; } function parseNumberingLevelOverrride(elem, xml$2) { let result = { level: xml$2.intAttr(elem, "ilvl") }; for (let e$10 of xml$2.elements(elem)) { switch (e$10.localName) { case "startOverride": result.start = xml$2.intAttr(e$10, "val"); break; case "lvl": result.numberingLevel = parseNumberingLevel(e$10, xml$2); break; } } return result; } function parseNumberingBulletPicture(elem, xml$2) { var pict = xml$2.element(elem, "pict"); var shape = pict && xml$2.element(pict, "shape"); var imagedata = shape && xml$2.element(shape, "imagedata"); return imagedata ? { id: xml$2.attr(elem, "numPicBulletId"), referenceId: xml$2.attr(imagedata, "id"), style: xml$2.attr(shape, "style") } : null; } class NumberingPart extends Part { constructor(pkg, path$1, parser) { super(pkg, path$1); this._documentParser = parser; } parseXml(root) { Object.assign(this, parseNumberingPart(root, this._package.xmlParser)); this.domNumberings = this._documentParser.parseNumberingFile(root); } } class StylesPart extends Part { constructor(pkg, path$1, parser) { super(pkg, path$1); this._documentParser = parser; } parseXml(root) { this.styles = this._documentParser.parseStylesFile(root); } } var DomType; (function(DomType$1) { DomType$1["Document"] = "document"; DomType$1["Paragraph"] = "paragraph"; DomType$1["Run"] = "run"; DomType$1["Break"] = "break"; DomType$1["NoBreakHyphen"] = "noBreakHyphen"; DomType$1["Table"] = "table"; DomType$1["Row"] = "row"; DomType$1["Cell"] = "cell"; DomType$1["Hyperlink"] = "hyperlink"; DomType$1["SmartTag"] = "smartTag"; DomType$1["Drawing"] = "drawing"; DomType$1["Image"] = "image"; DomType$1["Text"] = "text"; DomType$1["Tab"] = "tab"; DomType$1["Symbol"] = "symbol"; DomType$1["BookmarkStart"] = "bookmarkStart"; DomType$1["BookmarkEnd"] = "bookmarkEnd"; DomType$1["Footer"] = "footer"; DomType$1["Header"] = "header"; DomType$1["FootnoteReference"] = "footnoteReference"; DomType$1["EndnoteReference"] = "endnoteReference"; DomType$1["Footnote"] = "footnote"; DomType$1["Endnote"] = "endnote"; DomType$1["SimpleField"] = "simpleField"; DomType$1["ComplexField"] = "complexField"; DomType$1["Instruction"] = "instruction"; DomType$1["VmlPicture"] = "vmlPicture"; DomType$1["MmlMath"] = "mmlMath"; DomType$1["MmlMathParagraph"] = "mmlMathParagraph"; DomType$1["MmlFraction"] = "mmlFraction"; DomType$1["MmlFunction"] = "mmlFunction"; DomType$1["MmlFunctionName"] = "mmlFunctionName"; DomType$1["MmlNumerator"] = "mmlNumerator"; DomType$1["MmlDenominator"] = "mmlDenominator"; DomType$1["MmlRadical"] = "mmlRadical"; DomType$1["MmlBase"] = "mmlBase"; DomType$1["MmlDegree"] = "mmlDegree"; DomType$1["MmlSuperscript"] = "mmlSuperscript"; DomType$1["MmlSubscript"] = "mmlSubscript"; DomType$1["MmlPreSubSuper"] = "mmlPreSubSuper"; DomType$1["MmlSubArgument"] = "mmlSubArgument"; DomType$1["MmlSuperArgument"] = "mmlSuperArgument"; DomType$1["MmlNary"] = "mmlNary"; DomType$1["MmlDelimiter"] = "mmlDelimiter"; DomType$1["MmlRun"] = "mmlRun"; DomType$1["MmlEquationArray"] = "mmlEquationArray"; DomType$1["MmlLimit"] = "mmlLimit"; DomType$1["MmlLimitLower"] = "mmlLimitLower"; DomType$1["MmlMatrix"] = "mmlMatrix"; DomType$1["MmlMatrixRow"] = "mmlMatrixRow"; DomType$1["MmlBox"] = "mmlBox"; DomType$1["MmlBar"] = "mmlBar"; DomType$1["MmlGroupChar"] = "mmlGroupChar"; DomType$1["VmlElement"] = "vmlElement"; DomType$1["Inserted"] = "inserted"; DomType$1["Deleted"] = "deleted"; DomType$1["DeletedText"] = "deletedText"; DomType$1["Comment"] = "comment"; DomType$1["CommentReference"] = "commentReference"; DomType$1["CommentRangeStart"] = "commentRangeStart"; DomType$1["CommentRangeEnd"] = "commentRangeEnd"; DomType$1["AltChunk"] = "altChunk"; })(DomType || (DomType = {})); class OpenXmlElementBase { constructor() { this.children = []; this.cssStyle = {}; } } class WmlHeader extends OpenXmlElementBase { constructor() { super(...arguments); this.type = DomType.Header; } } class WmlFooter extends OpenXmlElementBase { constructor() { super(...arguments); this.type = DomType.Footer; } } class BaseHeaderFooterPart extends Part { constructor(pkg, path$1, parser) { super(pkg, path$1); this._documentParser = parser; } parseXml(root) { this.rootElement = this.createRootElement(); this.rootElement.children = this._documentParser.parseBodyElements(root); } } class HeaderPart extends BaseHeaderFooterPart { createRootElement() { return new WmlHeader(); } } class FooterPart extends BaseHeaderFooterPart { createRootElement() { return new WmlFooter(); } } function parseExtendedProps(root, xmlParser) { const result = {}; for (let el of xmlParser.elements(root)) { switch (el.localName) { case "Template": result.template = el.textContent; break; case "Pages": result.pages = safeParseToInt(el.textContent); break; case "Words": result.words = safeParseToInt(el.textContent); break; case "Characters": result.characters = safeParseToInt(el.textContent); break; case "Application": result.application = el.textContent; break; case "Lines": result.lines = safeParseToInt(el.textContent); break; case "Paragraphs": result.paragraphs = safeParseToInt(el.textContent); break; case "Company": result.company = el.textContent; break; case "AppVersion": result.appVersion = el.textContent; break; } } return result; } function safeParseToInt(value) { if (typeof value === "undefined") return; return parseInt(value); } class ExtendedPropsPart extends Part { parseXml(root) { this.props = parseExtendedProps(root, this._package.xmlParser); } } function parseCoreProps(root, xmlParser) { const result = {}; for (let el of xmlParser.elements(root)) { switch (el.localName) { case "title": result.title = el.textContent; break; case "description": result.description = el.textContent; break; case "subject": result.subject = el.textContent; break; case "creator": result.creator = el.textContent; break; case "keywords": result.keywords = el.textContent; break; case "language": result.language = el.textContent; break; case "lastModifiedBy": result.lastModifiedBy = el.textContent; break; case "revision": el.textContent && (result.revision = parseInt(el.textContent)); break; } } return result; } class CorePropsPart extends Part { parseXml(root) { this.props = parseCoreProps(root, this._package.xmlParser); } } class DmlTheme {} function parseTheme(elem, xml$2) { var result = new DmlTheme(); var themeElements = xml$2.element(elem, "themeElements"); for (let el of xml$2.elements(themeElements)) { switch (el.localName) { case "clrScheme": result.colorScheme = parseColorScheme(el, xml$2); break; case "fontScheme": result.fontScheme = parseFontScheme(el, xml$2); break; } } return result; } function parseColorScheme(elem, xml$2) { var result = { name: xml$2.attr(elem, "name"), colors: {} }; for (let el of xml$2.elements(elem)) { var srgbClr = xml$2.element(el, "srgbClr"); var sysClr = xml$2.element(el, "sysClr"); if (srgbClr) { result.colors[el.localName] = xml$2.attr(srgbClr, "val"); } else if (sysClr) { result.colors[el.localName] = xml$2.attr(sysClr, "lastClr"); } } return result; } function parseFontScheme(elem, xml$2) { var result = { name: xml$2.attr(elem, "name") }; for (let el of xml$2.elements(elem)) { switch (el.localName) { case "majorFont": result.majorFont = parseFontInfo(el, xml$2); break; case "minorFont": result.minorFont = parseFontInfo(el, xml$2); break; } } return result; } function parseFontInfo(elem, xml$2) { return { latinTypeface: xml$2.elementAttr(elem, "latin", "typeface"), eaTypeface: xml$2.elementAttr(elem, "ea", "typeface"), csTypeface: xml$2.elementAttr(elem, "cs", "typeface") }; } class ThemePart extends Part { constructor(pkg, path$1) { super(pkg, path$1); } parseXml(root) { this.theme = parseTheme(root, this._package.xmlParser); } } class WmlBaseNote {} class WmlFootnote extends WmlBaseNote { constructor() { super(...arguments); this.type = DomType.Footnote; } } class WmlEndnote extends WmlBaseNote { constructor() { super(...arguments); this.type = DomType.Endnote; } } class BaseNotePart extends Part { constructor(pkg, path$1, parser) { super(pkg, path$1); this._documentParser = parser; } } class FootnotesPart extends BaseNotePart { constructor(pkg, path$1, parser) { super(pkg, path$1, parser); } parseXml(root) { this.notes = this._documentParser.parseNotes(root, "footnote", WmlFootnote); } } class EndnotesPart extends BaseNotePart { constructor(pkg, path$1, parser) { super(pkg, path$1, parser); } parseXml(root) { this.notes = this._documentParser.parseNotes(root, "endnote", WmlEndnote); } } function parseSettings(elem, xml$2) { var result = {}; for (let el of xml$2.elements(elem)) { switch (el.localName) { case "defaultTabStop": result.defaultTabStop = xml$2.lengthAttr(el, "val"); break; case "footnotePr": result.footnoteProps = parseNoteProperties(el, xml$2); break; case "endnotePr": result.endnoteProps = parseNoteProperties(el, xml$2); break; case "autoHyphenation": result.autoHyphenation = xml$2.boolAttr(el, "val"); break; } } return result; } function parseNoteProperties(elem, xml$2) { var result = { defaultNoteIds: [] }; for (let el of xml$2.elements(elem)) { switch (el.localName) { case "numFmt": result.nummeringFormat = xml$2.attr(el, "val"); break; case "footnote": case "endnote": result.defaultNoteIds.push(xml$2.attr(el, "id")); break; } } return result; } class SettingsPart extends Part { constructor(pkg, path$1) { super(pkg, path$1); } parseXml(root) { this.settings = parseSettings(root, this._package.xmlParser); } } function parseCustomProps(root, xml$2) { return xml$2.elements(root, "property").map((e$10) => { const firstChild = e$10.firstChild; return { formatId: xml$2.attr(e$10, "fmtid"), name: xml$2.attr(e$10, "name"), type: firstChild.nodeName, value: firstChild.textContent }; }); } class CustomPropsPart extends Part { parseXml(root) { this.props = parseCustomProps(root, this._package.xmlParser); } } class CommentsPart extends Part { constructor(pkg, path$1, parser) { super(pkg, path$1); this._documentParser = parser; } parseXml(root) { this.comments = this._documentParser.parseComments(root); this.commentMap = keyBy(this.comments, (x$2) => x$2.id); } } class CommentsExtendedPart extends Part { constructor(pkg, path$1) { super(pkg, path$1); this.comments = []; } parseXml(root) { const xml$2 = this._package.xmlParser; for (let el of xml$2.elements(root, "commentEx")) { this.comments.push({ paraId: xml$2.attr(el, "paraId"), paraIdParent: xml$2.attr(el, "paraIdParent"), done: xml$2.boolAttr(el, "done") }); } this.commentMap = keyBy(this.comments, (x$2) => x$2.paraId); } } const topLevelRels = [ { type: RelationshipTypes.OfficeDocument, target: "word/document.xml" }, { type: RelationshipTypes.ExtendedProperties, target: "docProps/app.xml" }, { type: RelationshipTypes.CoreProperties, target: "docProps/core.xml" }, { type: RelationshipTypes.CustomProperties, target: "docProps/custom.xml" } ]; class WordDocument { constructor() { this.parts = []; this.partsMap = {}; } static async load(blob, parser, options) { var d$5 = new WordDocument(); d$5._options = options; d$5._parser = parser; d$5._package = await OpenXmlPackage.load(blob, options); d$5.rels = await d$5._package.loadRelationships(); await Promise.all(topLevelRels.map((rel$1) => { const r$10 = d$5.rels.find((x$2) => x$2.type === rel$1.type) ?? rel$1; return d$5.loadRelationshipPart(r$10.target, r$10.type); })); return d$5; } save(type = "blob") { return this._package.save(type); } async loadRelationshipPart(path$1, type) { if (this.partsMap[path$1]) return this.partsMap[path$1]; if (!this._package.get(path$1)) return null; let part = null; switch (type) { case RelationshipTypes.OfficeDocument: this.documentPart = part = new DocumentPart(this._package, path$1, this._parser); break; case RelationshipTypes.FontTable: this.fontTablePart = part = new FontTablePart(this._package, path$1); break; case RelationshipTypes.Numbering: this.numberingPart = part = new NumberingPart(this._package, path$1, this._parser); break; case RelationshipTypes.Styles: this.stylesPart = part = new StylesPart(this._package, path$1, this._parser); break; case RelationshipTypes.Theme: this.themePart = part = new ThemePart(this._package, path$1); break; case RelationshipTypes.Footnotes: this.footnotesPart = part = new FootnotesPart(this._package, path$1, this._parser); break; case RelationshipTypes.Endnotes: this.endnotesPart = part = new EndnotesPart(this._package, path$1, this._parser); break; case RelationshipTypes.Footer: part = new FooterPart(this._package, path$1, this._parser); break; case RelationshipTypes.Header: part = new HeaderPart(this._package, path$1, this._parser); break; case RelationshipTypes.CoreProperties: this.corePropsPart = part = new CorePropsPart(this._package, path$1); break; case RelationshipTypes.ExtendedProperties: this.extendedPropsPart = part = new ExtendedPropsPart(this._package, path$1); break; case RelationshipTypes.CustomProperties: part = new CustomPropsPart(this._package, path$1); break; case RelationshipTypes.Settings: this.settingsPart = part = new SettingsPart(this._package, path$1); break; case RelationshipTypes.Comments: this.commentsPart = part = new CommentsPart(this._package, path$1, this._parser); break; case RelationshipTypes.CommentsExtended: this.commentsExtendedPart = part = new CommentsExtendedPart(this._package, path$1); break; } if (part == null) return Promise.resolve(null); this.partsMap[path$1] = part; this.parts.push(part); await part.load(); if (part.rels?.length > 0) { const [folder] = splitPath(part.path); await Promise.all(part.rels.map((rel$1) => this.loadRelationshipPart(resolvePath(rel$1.target, folder), rel$1.type))); } return part; } async loadDocumentImage(id, part) { const x$2 = await this.loadResource(part ?? this.documentPart, id, "blob"); return this.blobToURL(x$2); } async loadNumberingImage(id) { const x$2 = await this.loadResource(this.numberingPart, id, "blob"); return this.blobToURL(x$2); } async loadFont(id, key) { const x$2 = await this.loadResource(this.fontTablePart, id, "uint8array"); return x$2 ? this.blobToURL(new Blob([deobfuscate(x$2, key)])) : x$2; } async loadAltChunk(id, part) { return await this.loadResource(part ?? this.documentPart, id, "string"); } blobToURL(blob) { if (!blob) return null; if (this._options.useBase64URL) { return blobToBase64(blob); } return URL.createObjectURL(blob); } findPartByRelId(id, basePart = null) { var rel$1 = (basePart.rels ?? this.rels).find((r$10) => r$10.id == id); const folder = basePart ? splitPath(basePart.path)[0] : ""; return rel$1 ? this.partsMap[resolvePath(rel$1.target, folder)] : null; } getPathById(part, id) { const rel$1 = part.rels.find((x$2) => x$2.id == id); const [folder] = splitPath(part.path); return rel$1 ? resolvePath(rel$1.target, folder) : null; } loadResource(part, id, outputType) { const path$1 = this.getPathById(part, id); return path$1 ? this._package.load(path$1, outputType) : Promise.resolve(null); } } function deobfuscate(data, guidKey) { const len = 16; const trimmed = guidKey.replace(/{|}|-/g, ""); const numbers = new Array(len); for (let i$7 = 0; i$7 < len; i$7++) numbers[len - i$7 - 1] = parseInt(trimmed.substring(i$7 * 2, i$7 * 2 + 2), 16); for (let i$7 = 0; i$7 < 32; i$7++) data[i$7] = data[i$7] ^ numbers[i$7 % len]; return data; } function parseBookmarkStart(elem, xml$2) { return { type: DomType.BookmarkStart, id: xml$2.attr(elem, "id"), name: xml$2.attr(elem, "name"), colFirst: xml$2.intAttr(elem, "colFirst"), colLast: xml$2.intAttr(elem, "colLast") }; } function parseBookmarkEnd(elem, xml$2) { return { type: DomType.BookmarkEnd, id: xml$2.attr(elem, "id") }; } class VmlElement extends OpenXmlElementBase { constructor() { super(...arguments); this.type = DomType.VmlElement; this.attrs = {}; } } function parseVmlElement(elem, parser) { var result = new VmlElement(); switch (elem.localName) { case "rect": result.tagName = "rect"; Object.assign(result.attrs, { width: "100%", height: "100%" }); break; case "oval": result.tagName = "ellipse"; Object.assign(result.attrs, { cx: "50%", cy: "50%", rx: "50%", ry: "50%" }); break; case "line": result.tagName = "line"; break; case "shape": result.tagName = "g"; break; case "textbox": result.tagName = "foreignObject"; Object.assign(result.attrs, { width: "100%", height: "100%" }); break; default: return null; } for (const at of globalXmlParser.attrs(elem)) { switch (at.localName) { case "style": result.cssStyleText = at.value; break; case "fillcolor": result.attrs.fill = at.value; break; case "from": const [x1, y1] = parsePoint(at.value); Object.assign(result.attrs, { x1, y1 }); break; case "to": const [x2, y2] = parsePoint(at.value); Object.assign(result.attrs, { x2, y2 }); break; } } for (const el of globalXmlParser.elements(elem)) { switch (el.localName) { case "stroke": Object.assign(result.attrs, parseStroke(el)); break; case "fill": Object.assign(result.attrs, parseFill()); break; case "imagedata": result.tagName = "image"; Object.assign(result.attrs, { width: "100%", height: "100%" }); result.imageHref = { id: globalXmlParser.attr(el, "id"), title: globalXmlParser.attr(el, "title") }; break; case "txbxContent": result.children.push(...parser.parseBodyElements(el)); break; default: const child = parseVmlElement(el, parser); child && result.children.push(child); break; } } return result; } function parseStroke(el) { return { "stroke": globalXmlParser.attr(el, "color"), "stroke-width": globalXmlParser.lengthAttr(el, "weight", LengthUsage.Emu) ?? "1px" }; } function parseFill(el) { return {}; } function parsePoint(val$1) { return val$1.split(","); } class WmlComment extends OpenXmlElementBase { constructor() { super(...arguments); this.type = DomType.Comment; } } class WmlCommentReference extends OpenXmlElementBase { constructor(id) { super(); this.id = id; this.type = DomType.CommentReference; } } class WmlCommentRangeStart extends OpenXmlElementBase { constructor(id) { super(); this.id = id; this.type = DomType.CommentRangeStart; } } class WmlCommentRangeEnd extends OpenXmlElementBase { constructor(id) { super(); this.id = id; this.type = DomType.CommentRangeEnd; } } var autos = { shd: "inherit", color: "black", borderColor: "black", highlight: "transparent" }; const supportedNamespaceURIs = []; const mmlTagMap = { "oMath": DomType.MmlMath, "oMathPara": DomType.MmlMathParagraph, "f": DomType.MmlFraction, "func": DomType.MmlFunction, "fName": DomType.MmlFunctionName, "num": DomType.MmlNumerator, "den": DomType.MmlDenominator, "rad": DomType.MmlRadical, "deg": DomType.MmlDegree, "e": DomType.MmlBase, "sSup": DomType.MmlSuperscript, "sSub": DomType.MmlSubscript, "sPre": DomType.MmlPreSubSuper, "sup": DomType.MmlSuperArgument, "sub": DomType.MmlSubArgument, "d": DomType.MmlDelimiter, "nary": DomType.MmlNary, "eqArr": DomType.MmlEquationArray, "lim": DomType.MmlLimit, "limLow": DomType.MmlLimitLower, "m": DomType.MmlMatrix, "mr": DomType.MmlMatrixRow, "box": DomType.MmlBox, "bar": DomType.MmlBar, "groupChr": DomType.MmlGroupChar }; class DocumentParser { constructor(options) { this.options = { ignoreWidth: false, debug: false, ...options }; } parseNotes(xmlDoc, elemName, elemClass) { var result = []; for (let el of globalXmlParser.elements(xmlDoc, elemName)) { const node = new elemClass(); node.id = globalXmlParser.attr(el, "id"); node.noteType = globalXmlParser.attr(el, "type"); node.children = this.parseBodyElements(el); result.push(node); } return result; } parseComments(xmlDoc) { var result = []; for (let el of globalXmlParser.elements(xmlDoc, "comment")) { const item = new WmlComment(); item.id = globalXmlParser.attr(el, "id"); item.author = globalXmlParser.attr(el, "author"); item.initials = globalXmlParser.attr(el, "initials"); item.date = globalXmlParser.attr(el, "date"); item.children = this.parseBodyElements(el); result.push(item); } return result; } parseDocumentFile(xmlDoc) { var xbody = globalXmlParser.element(xmlDoc, "body"); var background = globalXmlParser.element(xmlDoc, "background"); var sectPr = globalXmlParser.element(xbody, "sectPr"); return { type: DomType.Document, children: this.parseBodyElements(xbody), props: sectPr ? parseSectionProperties(sectPr, globalXmlParser) : {}, cssStyle: background ? this.parseBackground(background) : {} }; } parseBackground(elem) { var result = {}; var color = xmlUtil.colorAttr(elem, "color"); if (color) { result["background-color"] = color; } return result; } parseBodyElements(element) { var children = []; for (const elem of globalXmlParser.elements(element)) { switch (elem.localName) { case "p": children.push(this.parseParagraph(elem)); break; case "altChunk": children.push(this.parseAltChunk(elem)); break; case "tbl": children.push(this.parseTable(elem)); break; case "sdt": children.push(...this.parseSdt(elem, (e$10) => this.parseBodyElements(e$10))); break; } } return children; } parseStylesFile(xstyles) { var result = []; for (const n$9 of globalXmlParser.elements(xstyles)) { switch (n$9.localName) { case "style": result.push(this.parseStyle(n$9)); break; case "docDefaults": result.push(this.parseDefaultStyles(n$9)); break; } } return result; } parseDefaultStyles(node) { var result = { id: null, name: null, target: null, basedOn: null, styles: [] }; for (const c$7 of globalXmlParser.elements(node)) { switch (c$7.localName) { case "rPrDefault": var rPr = globalXmlParser.element(c$7, "rPr"); if (rPr) result.styles.push({ target: "span", values: this.parseDefaultProperties(rPr, {}) }); break; case "pPrDefault": var pPr = globalXmlParser.element(c$7, "pPr"); if (pPr) result.styles.push({ target: "p", values: this.parseDefaultProperties(pPr, {}) }); break; } } return result; } parseStyle(node) { var result = { id: globalXmlParser.attr(node, "styleId"), isDefault: globalXmlParser.boolAttr(node, "default"), name: null, target: null, basedOn: null, styles: [], linked: null }; switch (globalXmlParser.attr(node, "type")) { case "paragraph": result.target = "p"; break; case "table": result.target = "table"; break; case "character": result.target = "span"; break; } for (const n$9 of globalXmlParser.elements(node)) { switch (n$9.localName) { case "basedOn": result.basedOn = globalXmlParser.attr(n$9, "val"); break; case "name": result.name = globalXmlParser.attr(n$9, "val"); break; case "link": result.linked = globalXmlParser.attr(n$9, "val"); break; case "next": result.next = globalXmlParser.attr(n$9, "val"); break; case "aliases": result.aliases = globalXmlParser.attr(n$9, "val").split(","); break; case "pPr": result.styles.push({ target: "p", values: this.parseDefaultProperties(n$9, {}) }); result.paragraphProps = parseParagraphProperties(n$9, globalXmlParser); break; case "rPr": result.styles.push({ target: "span", values: this.parseDefaultProperties(n$9, {}) }); result.runProps = parseRunProperties(n$9, globalXmlParser); break; case "tblPr": case "tcPr": result.styles.push({ target: "td", values: this.parseDefaultProperties(n$9, {}) }); break; case "tblStylePr": for (let s$5 of this.parseTableStyle(n$9)) result.styles.push(s$5); break; case "rsid": case "qFormat": case "hidden": case "semiHidden": case "unhideWhenUsed": case "autoRedefine": case "uiPriority": break; default: this.options.debug && console.warn(`DOCX: Unknown style element: ${n$9.localName}`); } } return result; } parseTableStyle(node) { var result = []; var type = globalXmlParser.attr(node, "type"); var selector = ""; var modificator = ""; switch (type) { case "firstRow": modificator = ".first-row"; selector = "tr.first-row td"; break; case "lastRow": modificator = ".last-row"; selector = "tr.last-row td"; break; case "firstCol": modificator = ".first-col"; selector = "td.first-col"; break; case "lastCol": modificator = ".last-col"; selector = "td.last-col"; break; case "band1Vert": modificator = ":not(.no-vband)"; selector = "td.odd-col"; break; case "band2Vert": modificator = ":not(.no-vband)"; selector = "td.even-col"; break; case "band1Horz": modificator = ":not(.no-hband)"; selector = "tr.odd-row"; break; case "band2Horz": modificator = ":not(.no-hband)"; selector = "tr.even-row"; break; default: return []; } for (const n$9 of globalXmlParser.elements(node)) { switch (n$9.localName) { case "pPr": result.push({ target: `${selector} p`, mod: modificator, values: this.parseDefaultProperties(n$9, {}) }); break; case "rPr": result.push({ target: `${selector} span`, mod: modificator, values: this.parseDefaultProperties(n$9, {}) }); break; case "tblPr": case "tcPr": result.push({ target: selector, mod: modificator, values: this.parseDefaultProperties(n$9, {}) }); break; } } return result; } parseNumberingFile(node) { var result = []; var mapping = {}; var bullets = []; for (const n$9 of globalXmlParser.elements(node)) { switch (n$9.localName) { case "abstractNum": this.parseAbstractNumbering(n$9, bullets).forEach((x$2) => result.push(x$2)); break; case "numPicBullet": bullets.push(this.parseNumberingPicBullet(n$9)); break; case "num": var numId = globalXmlParser.attr(n$9, "numId"); var abstractNumId = globalXmlParser.elementAttr(n$9, "abstractNumId", "val"); mapping[abstractNumId] = numId; break; } } result.forEach((x$2) => x$2.id = mapping[x$2.id]); return result; } parseNumberingPicBullet(elem) { var pict = globalXmlParser.element(elem, "pict"); var shape = pict && globalXmlParser.element(pict, "shape"); var imagedata = shape && globalXmlParser.element(shape, "imagedata"); return imagedata ? { id: globalXmlParser.intAttr(elem, "numPicBulletId"), src: globalXmlParser.attr(imagedata, "id"), style: globalXmlParser.attr(shape, "style") } : null; } parseAbstractNumbering(node, bullets) { var result = []; var id = globalXmlParser.attr(node, "abstractNumId"); for (const n$9 of globalXmlParser.elements(node)) { switch (n$9.localName) { case "lvl": result.push(this.parseNumberingLevel(id, n$9, bullets)); break; } } return result; } parseNumberingLevel(id, node, bullets) { var result = { id, level: globalXmlParser.intAttr(node, "ilvl"), start: 1, pStyleName: undefined, pStyle: {}, rStyle: {}, suff: "tab" }; for (const n$9 of globalXmlParser.elements(node)) { switch (n$9.localName) { case "start": result.start = globalXmlParser.intAttr(n$9, "val"); break; case "pPr": this.parseDefaultProperties(n$9, result.pStyle); break; case "rPr": this.parseDefaultProperties(n$9, result.rStyle); break; case "lvlPicBulletId": var bulletId = globalXmlParser.intAttr(n$9, "val"); result.bullet = bullets.find((x$2) => x$2?.id == bulletId); break; case "lvlText": result.levelText = globalXmlParser.attr(n$9, "val"); break; case "pStyle": result.pStyleName = globalXmlParser.attr(n$9, "val"); break; case "numFmt": result.format = globalXmlParser.attr(n$9, "val"); break; case "suff": result.suff = globalXmlParser.attr(n$9, "val"); break; } } return result; } parseSdt(node, parser) { const sdtContent = globalXmlParser.element(node, "sdtContent"); return sdtContent ? parser(sdtContent) : []; } parseInserted(node, parentParser) { return { type: DomType.Inserted, children: parentParser(node)?.children ?? [] }; } parseDeleted(node, parentParser) { return { type: DomType.Deleted, children: parentParser(node)?.children ?? [] }; } parseAltChunk(node) { return { type: DomType.AltChunk, children: [], id: globalXmlParser.attr(node, "id") }; } parseParagraph(node) { var result = { type: DomType.Paragraph, children: [] }; for (let el of globalXmlParser.elements(node)) { switch (el.localName) { case "pPr": this.parseParagraphProperties(el, result); break; case "r": result.children.push(this.parseRun(el, result)); break; case "hyperlink": result.children.push(this.parseHyperlink(el, result)); break; case "smartTag": result.children.push(this.parseSmartTag(el, result)); break; case "bookmarkStart": result.children.push(parseBookmarkStart(el, globalXmlParser)); break; case "bookmarkEnd": result.children.push(parseBookmarkEnd(el, globalXmlParser)); break; case "commentRangeStart": result.children.push(new WmlCommentRangeStart(globalXmlParser.attr(el, "id"))); break; case "commentRangeEnd": result.children.push(new WmlCommentRangeEnd(globalXmlParser.attr(el, "id"))); break; case "oMath": case "oMathPara": result.children.push(this.parseMathElement(el)); break; case "sdt": result.children.push(...this.parseSdt(el, (e$10) => this.parseParagraph(e$10).children)); break; case "ins": result.children.push(this.parseInserted(el, (e$10) => this.parseParagraph(e$10))); break; case "del": result.children.push(this.parseDeleted(el, (e$10) => this.parseParagraph(e$10))); break; } } return result; } parseParagraphProperties(elem, paragraph) { this.parseDefaultProperties(elem, paragraph.cssStyle = {}, null, (c$7) => { if (parseParagraphProperty(c$7, paragraph, globalXmlParser)) return true; switch (c$7.localName) { case "pStyle": paragraph.styleName = globalXmlParser.attr(c$7, "val"); break; case "cnfStyle": paragraph.className = values.classNameOfCnfStyle(c$7); break; case "framePr": this.parseFrame(c$7, paragraph); break; case "rPr": break; default: return false; } return true; }); } parseFrame(node, paragraph) { var dropCap = globalXmlParser.attr(node, "dropCap"); if (dropCap == "drop") paragraph.cssStyle["float"] = "left"; } parseHyperlink(node, parent) { var result = { type: DomType.Hyperlink, parent, children: [] }; result.anchor = globalXmlParser.attr(node, "anchor"); result.id = globalXmlParser.attr(node, "id"); for (const c$7 of globalXmlParser.elements(node)) { switch (c$7.localName) { case "r": result.children.push(this.parseRun(c$7, result)); break; } } return result; } parseSmartTag(node, parent) { var result = { type: DomType.SmartTag, parent, children: [] }; var uri = globalXmlParser.attr(node, "uri"); var element = globalXmlParser.attr(node, "element"); if (uri) result.uri = uri; if (element) result.element = element; for (const c$7 of globalXmlParser.elements(node)) { switch (c$7.localName) { case "r": result.children.push(this.parseRun(c$7, result)); break; } } return result; } parseRun(node, parent) { var result = { type: DomType.Run, parent, children: [] }; for (let c$7 of globalXmlParser.elements(node)) { c$7 = this.checkAlternateContent(c$7); switch (c$7.localName) { case "t": result.children.push({ type: DomType.Text, text: c$7.textContent }); break; case "delText": result.children.push({ type: DomType.DeletedText, text: c$7.textContent }); break; case "commentReference": result.children.push(new WmlCommentReference(globalXmlParser.attr(c$7, "id"))); break; case "fldSimple": result.children.push({ type: DomType.SimpleField, instruction: globalXmlParser.attr(c$7, "instr"), lock: globalXmlParser.boolAttr(c$7, "lock", false), dirty: globalXmlParser.boolAttr(c$7, "dirty", false) }); break; case "instrText": result.fieldRun = true; result.children.push({ type: DomType.Instruction, text: c$7.textContent }); break; case "fldChar": result.fieldRun = true; result.children.push({ type: DomType.ComplexField, charType: globalXmlParser.attr(c$7, "fldCharType"), lock: globalXmlParser.boolAttr(c$7, "lock", false), dirty: globalXmlParser.boolAttr(c$7, "dirty", false) }); break; case "noBreakHyphen": result.children.push({ type: DomType.NoBreakHyphen }); break; case "br": result.children.push({ type: DomType.Break, break: globalXmlParser.attr(c$7, "type") || "textWrapping" }); break; case "lastRenderedPageBreak": result.children.push({ type: DomType.Break, break: "lastRenderedPageBreak" }); break; case "sym": result.children.push({ type: DomType.Symbol, font: encloseFontFamily(globalXmlParser.attr(c$7, "font")), char: globalXmlParser.attr(c$7, "char") }); break; case "tab": result.children.push({ type: DomType.Tab }); break; case "footnoteReference": result.children.push({ type: DomType.FootnoteReference, id: globalXmlParser.attr(c$7, "id") }); break; case "endnoteReference": result.children.push({ type: DomType.EndnoteReference, id: globalXmlParser.attr(c$7, "id") }); break; case "drawing": let d$5 = this.parseDrawing(c$7); if (d$5) result.children = [d$5]; break; case "pict": result.children.push(this.parseVmlPicture(c$7)); break; case "rPr": this.parseRunProperties(c$7, result); break; } } return result; } parseMathElement(elem) { const propsTag = `${elem.localName}Pr`; const result = { type: mmlTagMap[elem.localName], children: [] }; for (const el of globalXmlParser.elements(elem)) { const childType = mmlTagMap[el.localName]; if (childType) { result.children.push(this.parseMathElement(el)); } else if (el.localName == "r") { var run = this.parseRun(el); run.type = DomType.MmlRun; result.children.push(run); } else if (el.localName == propsTag) { result.props = this.parseMathProperies(el); } } return result; } parseMathProperies(elem) { const result = {}; for (const el of globalXmlParser.elements(elem)) { switch (el.localName) { case "chr": result.char = globalXmlParser.attr(el, "val"); break; case "vertJc": result.verticalJustification = globalXmlParser.attr(el, "val"); break; case "pos": result.position = globalXmlParser.attr(el, "val"); break; case "degHide": result.hideDegree = globalXmlParser.boolAttr(el, "val"); break; case "begChr": result.beginChar = globalXmlParser.attr(el, "val"); break; case "endChr": result.endChar = globalXmlParser.attr(el, "val"); break; } } return result; } parseRunProperties(elem, run) { this.parseDefaultProperties(elem, run.cssStyle = {}, null, (c$7) => { switch (c$7.localName) { case "rStyle": run.styleName = globalXmlParser.attr(c$7, "val"); break; case "vertAlign": run.verticalAlign = values.valueOfVertAlign(c$7, true); break; default: return false; } return true; }); } parseVmlPicture(elem) { const result = { type: DomType.VmlPicture, children: [] }; for (const el of globalXmlParser.elements(elem)) { const child = parseVmlElement(el, this); child && result.children.push(child); } return result; } checkAlternateContent(elem) { if (elem.localName != "AlternateContent") return elem; var choice = globalXmlParser.element(elem, "Choice"); if (choice) { var requires = globalXmlParser.attr(choice, "Requires"); var namespaceURI = elem.lookupNamespaceURI(requires); if (supportedNamespaceURIs.includes(namespaceURI)) return choice.firstElementChild; } return globalXmlParser.element(elem, "Fallback")?.firstElementChild; } parseDrawing(node) { for (var n$9 of globalXmlParser.elements(node)) { switch (n$9.localName) { case "inline": case "anchor": return this.parseDrawingWrapper(n$9); } } } parseDrawingWrapper(node) { var result = { type: DomType.Drawing, children: [], cssStyle: {} }; var isAnchor = node.localName == "anchor"; let wrapType = null; let simplePos = globalXmlParser.boolAttr(node, "simplePos"); globalXmlParser.boolAttr(node, "behindDoc"); let posX = { relative: "page", align: "left", offset: "0" }; let posY = { relative: "page", align: "top", offset: "0" }; for (var n$9 of globalXmlParser.elements(node)) { switch (n$9.localName) { case "simplePos": if (simplePos) { posX.offset = globalXmlParser.lengthAttr(n$9, "x", LengthUsage.Emu); posY.offset = globalXmlParser.lengthAttr(n$9, "y", LengthUsage.Emu); } break; case "extent": result.cssStyle["width"] = globalXmlParser.lengthAttr(n$9, "cx", LengthUsage.Emu); result.cssStyle["height"] = globalXmlParser.lengthAttr(n$9, "cy", LengthUsage.Emu); break; case "positionH": case "positionV": if (!simplePos) { let pos = n$9.localName == "positionH" ? posX : posY; var alignNode = globalXmlParser.element(n$9, "align"); var offsetNode = globalXmlParser.element(n$9, "posOffset"); pos.relative = globalXmlParser.attr(n$9, "relativeFrom") ?? pos.relative; if (alignNode) pos.align = alignNode.textContent; if (offsetNode) pos.offset = convertLength(offsetNode.textContent, LengthUsage.Emu); } break; case "wrapTopAndBottom": wrapType = "wrapTopAndBottom"; break; case "wrapNone": wrapType = "wrapNone"; break; case "graphic": var g$1 = this.parseGraphic(n$9); if (g$1) result.children.push(g$1); break; } } if (wrapType == "wrapTopAndBottom") { result.cssStyle["display"] = "block"; if (posX.align) { result.cssStyle["text-align"] = posX.align; result.cssStyle["width"] = "100%"; } } else if (wrapType == "wrapNone") { result.cssStyle["display"] = "block"; result.cssStyle["position"] = "relative"; result.cssStyle["width"] = "0px"; result.cssStyle["height"] = "0px"; if (posX.offset) result.cssStyle["left"] = posX.offset; if (posY.offset) result.cssStyle["top"] = posY.offset; } else if (isAnchor && (posX.align == "left" || posX.align == "right")) { result.cssStyle["float"] = posX.align; } return result; } parseGraphic(elem) { var graphicData = globalXmlParser.element(elem, "graphicData"); for (let n$9 of globalXmlParser.elements(graphicData)) { switch (n$9.localName) { case "pic": return this.parsePicture(n$9); } } return null; } parsePicture(elem) { var result = { type: DomType.Image, src: "", cssStyle: {} }; var blipFill = globalXmlParser.element(elem, "blipFill"); var blip = globalXmlParser.element(blipFill, "blip"); var srcRect = globalXmlParser.element(blipFill, "srcRect"); result.src = globalXmlParser.attr(blip, "embed"); if (srcRect) { result.srcRect = [ globalXmlParser.intAttr(srcRect, "l", 0) / 1e5, globalXmlParser.intAttr(srcRect, "t", 0) / 1e5, globalXmlParser.intAttr(srcRect, "r", 0) / 1e5, globalXmlParser.intAttr(srcRect, "b", 0) / 1e5 ]; } var spPr = globalXmlParser.element(elem, "spPr"); var xfrm = globalXmlParser.element(spPr, "xfrm"); result.cssStyle["position"] = "relative"; if (xfrm) { result.rotation = globalXmlParser.intAttr(xfrm, "rot", 0) / 6e4; for (var n$9 of globalXmlParser.elements(xfrm)) { switch (n$9.localName) { case "ext": result.cssStyle["width"] = globalXmlParser.lengthAttr(n$9, "cx", LengthUsage.Emu); result.cssStyle["height"] = globalXmlParser.lengthAttr(n$9, "cy", LengthUsage.Emu); break; case "off": result.cssStyle["left"] = globalXmlParser.lengthAttr(n$9, "x", LengthUsage.Emu); result.cssStyle["top"] = globalXmlParser.lengthAttr(n$9, "y", LengthUsage.Emu); break; } } } return result; } parseTable(node) { var result = { type: DomType.Table, children: [] }; for (const c$7 of globalXmlParser.elements(node)) { switch (c$7.localName) { case "tr": result.children.push(this.parseTableRow(c$7)); break; case "tblGrid": result.columns = this.parseTableColumns(c$7); break; case "tblPr": this.parseTableProperties(c$7, result); break; } } return result; } parseTableColumns(node) { var result = []; for (const n$9 of globalXmlParser.elements(node)) { switch (n$9.localName) { case "gridCol": result.push({ width: globalXmlParser.lengthAttr(n$9, "w") }); break; } } return result; } parseTableProperties(elem, table) { table.cssStyle = {}; table.cellStyle = {}; this.parseDefaultProperties(elem, table.cssStyle, table.cellStyle, (c$7) => { switch (c$7.localName) { case "tblStyle": table.styleName = globalXmlParser.attr(c$7, "val"); break; case "tblLook": table.className = values.classNameOftblLook(c$7); break; case "tblpPr": this.parseTablePosition(c$7, table); break; case "tblStyleColBandSize": table.colBandSize = globalXmlParser.intAttr(c$7, "val"); break; case "tblStyleRowBandSize": table.rowBandSize = globalXmlParser.intAttr(c$7, "val"); break; case "hidden": table.cssStyle["display"] = "none"; break; default: return false; } return true; }); switch (table.cssStyle["text-align"]) { case "center": delete table.cssStyle["text-align"]; table.cssStyle["margin-left"] = "auto"; table.cssStyle["margin-right"] = "auto"; break; case "right": delete table.cssStyle["text-align"]; table.cssStyle["margin-left"] = "auto"; break; } } parseTablePosition(node, table) { var topFromText = globalXmlParser.lengthAttr(node, "topFromText"); var bottomFromText = globalXmlParser.lengthAttr(node, "bottomFromText"); var rightFromText = globalXmlParser.lengthAttr(node, "rightFromText"); var leftFromText = globalXmlParser.lengthAttr(node, "leftFromText"); table.cssStyle["float"] = "left"; table.cssStyle["margin-bottom"] = values.addSize(table.cssStyle["margin-bottom"], bottomFromText); table.cssStyle["margin-left"] = values.addSize(table.cssStyle["margin-left"], leftFromText); table.cssStyle["margin-right"] = values.addSize(table.cssStyle["margin-right"], rightFromText); table.cssStyle["margin-top"] = values.addSize(table.cssStyle["margin-top"], topFromText); } parseTableRow(node) { var result = { type: DomType.Row, children: [] }; for (const c$7 of globalXmlParser.elements(node)) { switch (c$7.localName) { case "tc": result.children.push(this.parseTableCell(c$7)); break; case "trPr": case "tblPrEx": this.parseTableRowProperties(c$7, result); break; } } return result; } parseTableRowProperties(elem, row) { row.cssStyle = this.parseDefaultProperties(elem, {}, null, (c$7) => { switch (c$7.localName) { case "cnfStyle": row.className = values.classNameOfCnfStyle(c$7); break; case "tblHeader": row.isHeader = globalXmlParser.boolAttr(c$7, "val"); break; case "gridBefore": row.gridBefore = globalXmlParser.intAttr(c$7, "val"); break; case "gridAfter": row.gridAfter = globalXmlParser.intAttr(c$7, "val"); break; default: return false; } return true; }); } parseTableCell(node) { var result = { type: DomType.Cell, children: [] }; for (const c$7 of globalXmlParser.elements(node)) { switch (c$7.localName) { case "tbl": result.children.push(this.parseTable(c$7)); break; case "p": result.children.push(this.parseParagraph(c$7)); break; case "tcPr": this.parseTableCellProperties(c$7, result); break; } } return result; } parseTableCellProperties(elem, cell) { cell.cssStyle = this.parseDefaultProperties(elem, {}, null, (c$7) => { switch (c$7.localName) { case "gridSpan": cell.span = globalXmlParser.intAttr(c$7, "val", null); break; case "vMerge": cell.verticalMerge = globalXmlParser.attr(c$7, "val") ?? "continue"; break; case "cnfStyle": cell.className = values.classNameOfCnfStyle(c$7); break; default: return false; } return true; }); this.parseTableCellVerticalText(elem, cell); } parseTableCellVerticalText(elem, cell) { const directionMap = { "btLr": { writingMode: "vertical-rl", transform: "rotate(180deg)" }, "lrTb": { writingMode: "vertical-lr", transform: "none" }, "tbRl": { writingMode: "vertical-rl", transform: "none" } }; for (const c$7 of globalXmlParser.elements(elem)) { if (c$7.localName === "textDirection") { const direction = globalXmlParser.attr(c$7, "val"); const style = directionMap[direction] || { writingMode: "horizontal-tb" }; cell.cssStyle["writing-mode"] = style.writingMode; cell.cssStyle["transform"] = style.transform; } } } parseDefaultProperties(elem, style = null, childStyle = null, handler = null) { style = style || {}; for (const c$7 of globalXmlParser.elements(elem)) { if (handler?.(c$7)) continue; switch (c$7.localName) { case "jc": style["text-align"] = values.valueOfJc(c$7); break; case "textAlignment": style["vertical-align"] = values.valueOfTextAlignment(c$7); break; case "color": style["color"] = xmlUtil.colorAttr(c$7, "val", null, autos.color); break; case "sz": style["font-size"] = style["min-height"] = globalXmlParser.lengthAttr(c$7, "val", LengthUsage.FontSize); break; case "shd": style["background-color"] = xmlUtil.colorAttr(c$7, "fill", null, autos.shd); break; case "highlight": style["background-color"] = xmlUtil.colorAttr(c$7, "val", null, autos.highlight); break; case "vertAlign": break; case "position": style.verticalAlign = globalXmlParser.lengthAttr(c$7, "val", LengthUsage.FontSize); break; case "tcW": if (this.options.ignoreWidth) break; case "tblW": style["width"] = values.valueOfSize(c$7, "w"); break; case "trHeight": this.parseTrHeight(c$7, style); break; case "strike": style["text-decoration"] = globalXmlParser.boolAttr(c$7, "val", true) ? "line-through" : "none"; break; case "b": style["font-weight"] = globalXmlParser.boolAttr(c$7, "val", true) ? "bold" : "normal"; break; case "i": style["font-style"] = globalXmlParser.boolAttr(c$7, "val", true) ? "italic" : "normal"; break; case "caps": style["text-transform"] = globalXmlParser.boolAttr(c$7, "val", true) ? "uppercase" : "none"; break; case "smallCaps": style["font-variant"] = globalXmlParser.boolAttr(c$7, "val", true) ? "small-caps" : "none"; break; case "u": this.parseUnderline(c$7, style); break; case "ind": case "tblInd": this.parseIndentation(c$7, style); break; case "rFonts": this.parseFont(c$7, style); break; case "tblBorders": this.parseBorderProperties(c$7, childStyle || style); break; case "tblCellSpacing": style["border-spacing"] = values.valueOfMargin(c$7); style["border-collapse"] = "separate"; break; case "pBdr": this.parseBorderProperties(c$7, style); break; case "bdr": style["border"] = values.valueOfBorder(c$7); break; case "tcBorders": this.parseBorderProperties(c$7, style); break; case "vanish": if (globalXmlParser.boolAttr(c$7, "val", true)) style["display"] = "none"; break; case "kern": break; case "noWrap": break; case "tblCellMar": case "tcMar": this.parseMarginProperties(c$7, childStyle || style); break; case "tblLayout": style["table-layout"] = values.valueOfTblLayout(c$7); break; case "vAlign": style["vertical-align"] = values.valueOfTextAlignment(c$7); break; case "spacing": if (elem.localName == "pPr") this.parseSpacing(c$7, style); break; case "wordWrap": if (globalXmlParser.boolAttr(c$7, "val")) style["overflow-wrap"] = "break-word"; break; case "suppressAutoHyphens": style["hyphens"] = globalXmlParser.boolAttr(c$7, "val", true) ? "none" : "auto"; break; case "lang": style["$lang"] = globalXmlParser.attr(c$7, "val"); break; case "rtl": case "bidi": if (globalXmlParser.boolAttr(c$7, "val", true)) style["direction"] = "rtl"; break; case "bCs": case "iCs": case "szCs": case "tabs": case "outlineLvl": case "contextualSpacing": case "tblStyleColBandSize": case "tblStyleRowBandSize": case "webHidden": case "pageBreakBefore": case "suppressLineNumbers": case "keepLines": case "keepNext": case "widowControl": case "bidi": case "rtl": case "noProof": break; default: if (this.options.debug) console.warn(`DOCX: Unknown document element: ${elem.localName}.${c$7.localName}`); break; } } return style; } parseUnderline(node, style) { var val$1 = globalXmlParser.attr(node, "val"); if (val$1 == null) return; switch (val$1) { case "dash": case "dashDotDotHeavy": case "dashDotHeavy": case "dashedHeavy": case "dashLong": case "dashLongHeavy": case "dotDash": case "dotDotDash": style["text-decoration"] = "underline dashed"; break; case "dotted": case "dottedHeavy": style["text-decoration"] = "underline dotted"; break; case "double": style["text-decoration"] = "underline double"; break; case "single": case "thick": style["text-decoration"] = "underline"; break; case "wave": case "wavyDouble": case "wavyHeavy": style["text-decoration"] = "underline wavy"; break; case "words": style["text-decoration"] = "underline"; break; case "none": style["text-decoration"] = "none"; break; } var col = xmlUtil.colorAttr(node, "color"); if (col) style["text-decoration-color"] = col; } parseFont(node, style) { var ascii = globalXmlParser.attr(node, "ascii"); var asciiTheme = values.themeValue(node, "asciiTheme"); var eastAsia = globalXmlParser.attr(node, "eastAsia"); var fonts = [ ascii, asciiTheme, eastAsia ].filter((x$2) => x$2).map((x$2) => encloseFontFamily(x$2)); if (fonts.length > 0) style["font-family"] = [...new Set(fonts)].join(", "); } parseIndentation(node, style) { var firstLine = globalXmlParser.lengthAttr(node, "firstLine"); var hanging = globalXmlParser.lengthAttr(node, "hanging"); var left = globalXmlParser.lengthAttr(node, "left"); var start = globalXmlParser.lengthAttr(node, "start"); var right = globalXmlParser.lengthAttr(node, "right"); var end = globalXmlParser.lengthAttr(node, "end"); if (firstLine) style["text-indent"] = firstLine; if (hanging) style["text-indent"] = `-${hanging}`; if (left || start) style["margin-inline-start"] = left || start; if (right || end) style["margin-inline-end"] = right || end; } parseSpacing(node, style) { var before = globalXmlParser.lengthAttr(node, "before"); var after = globalXmlParser.lengthAttr(node, "after"); var line = globalXmlParser.intAttr(node, "line", null); var lineRule = globalXmlParser.attr(node, "lineRule"); if (before) style["margin-top"] = before; if (after) style["margin-bottom"] = after; if (line !== null) { switch (lineRule) { case "auto": style["line-height"] = `${(line / 240).toFixed(2)}`; break; case "atLeast": style["line-height"] = `calc(100% + ${line / 20}pt)`; break; default: style["line-height"] = style["min-height"] = `${line / 20}pt`; break; } } } parseMarginProperties(node, output) { for (const c$7 of globalXmlParser.elements(node)) { switch (c$7.localName) { case "left": output["padding-left"] = values.valueOfMargin(c$7); break; case "right": output["padding-right"] = values.valueOfMargin(c$7); break; case "top": output["padding-top"] = values.valueOfMargin(c$7); break; case "bottom": output["padding-bottom"] = values.valueOfMargin(c$7); break; } } } parseTrHeight(node, output) { switch (globalXmlParser.attr(node, "hRule")) { case "exact": output["height"] = globalXmlParser.lengthAttr(node, "val"); break; case "atLeast": default: output["height"] = globalXmlParser.lengthAttr(node, "val"); break; } } parseBorderProperties(node, output) { for (const c$7 of globalXmlParser.elements(node)) { switch (c$7.localName) { case "start": case "left": output["border-left"] = values.valueOfBorder(c$7); break; case "end": case "right": output["border-right"] = values.valueOfBorder(c$7); break; case "top": output["border-top"] = values.valueOfBorder(c$7); break; case "bottom": output["border-bottom"] = values.valueOfBorder(c$7); break; } } } } const knownColors = [ "black", "blue", "cyan", "darkBlue", "darkCyan", "darkGray", "darkGreen", "darkMagenta", "darkRed", "darkYellow", "green", "lightGray", "magenta", "none", "red", "white", "yellow" ]; class xmlUtil { static colorAttr(node, attrName, defValue = null, autoColor = "black") { var v$3 = globalXmlParser.attr(node, attrName); if (v$3) { if (v$3 == "auto") { return autoColor; } else if (knownColors.includes(v$3)) { return v$3; } return `#${v$3}`; } var themeColor = globalXmlParser.attr(node, "themeColor"); return themeColor ? `var(--docx-${themeColor}-color)` : defValue; } } class values { static themeValue(c$7, attr) { var val$1 = globalXmlParser.attr(c$7, attr); return val$1 ? `var(--docx-${val$1}-font)` : null; } static valueOfSize(c$7, attr) { var type = LengthUsage.Dxa; switch (globalXmlParser.attr(c$7, "type")) { case "dxa": break; case "pct": type = LengthUsage.Percent; break; case "auto": return "auto"; } return globalXmlParser.lengthAttr(c$7, attr, type); } static valueOfMargin(c$7) { return globalXmlParser.lengthAttr(c$7, "w"); } static valueOfBorder(c$7) { var type = values.parseBorderType(globalXmlParser.attr(c$7, "val")); if (type == "none") return "none"; var color = xmlUtil.colorAttr(c$7, "color"); var size = globalXmlParser.lengthAttr(c$7, "sz", LengthUsage.Border); return `${size} ${type} ${color == "auto" ? autos.borderColor : color}`; } static parseBorderType(type) { switch (type) { case "single": return "solid"; case "dashDotStroked": return "solid"; case "dashed": return "dashed"; case "dashSmallGap": return "dashed"; case "dotDash": return "dotted"; case "dotDotDash": return "dotted"; case "dotted": return "dotted"; case "double": return "double"; case "doubleWave": return "double"; case "inset": return "inset"; case "nil": return "none"; case "none": return "none"; case "outset": return "outset"; case "thick": return "solid"; case "thickThinLargeGap": return "solid"; case "thickThinMediumGap": return "solid"; case "thickThinSmallGap": return "solid"; case "thinThickLargeGap": return "solid"; case "thinThickMediumGap": return "solid"; case "thinThickSmallGap": return "solid"; case "thinThickThinLargeGap": return "solid"; case "thinThickThinMediumGap": return "solid"; case "thinThickThinSmallGap": return "solid"; case "threeDEmboss": return "solid"; case "threeDEngrave": return "solid"; case "triple": return "double"; case "wave": return "solid"; } return "solid"; } static valueOfTblLayout(c$7) { var type = globalXmlParser.attr(c$7, "val"); return type == "fixed" ? "fixed" : "auto"; } static classNameOfCnfStyle(c$7) { const val$1 = globalXmlParser.attr(c$7, "val"); const classes = [ "first-row", "last-row", "first-col", "last-col", "odd-col", "even-col", "odd-row", "even-row", "ne-cell", "nw-cell", "se-cell", "sw-cell" ]; return classes.filter((_$2, i$7) => val$1[i$7] == "1").join(" "); } static valueOfJc(c$7) { var type = globalXmlParser.attr(c$7, "val"); switch (type) { case "start": case "left": return "left"; case "center": return "center"; case "end": case "right": return "right"; case "both": return "justify"; } return type; } static valueOfVertAlign(c$7, asTagName = false) { var type = globalXmlParser.attr(c$7, "val"); switch (type) { case "subscript": return "sub"; case "superscript": return asTagName ? "sup" : "super"; } return asTagName ? null : type; } static valueOfTextAlignment(c$7) { var type = globalXmlParser.attr(c$7, "val"); switch (type) { case "auto": case "baseline": return "baseline"; case "top": return "top"; case "center": return "middle"; case "bottom": return "bottom"; } return type; } static addSize(a$2, b$3) { if (a$2 == null) return b$3; if (b$3 == null) return a$2; return `calc(${a$2} + ${b$3})`; } static classNameOftblLook(c$7) { const val$1 = globalXmlParser.hexAttr(c$7, "val", 0); let className = ""; if (globalXmlParser.boolAttr(c$7, "firstRow") || val$1 & 32) className += " first-row"; if (globalXmlParser.boolAttr(c$7, "lastRow") || val$1 & 64) className += " last-row"; if (globalXmlParser.boolAttr(c$7, "firstColumn") || val$1 & 128) className += " first-col"; if (globalXmlParser.boolAttr(c$7, "lastColumn") || val$1 & 256) className += " last-col"; if (globalXmlParser.boolAttr(c$7, "noHBand") || val$1 & 512) className += " no-hband"; if (globalXmlParser.boolAttr(c$7, "noVBand") || val$1 & 1024) className += " no-vband"; return className.trim(); } } const defaultTab = { pos: 0, leader: "none", style: "left" }; const maxTabs = 50; function computePixelToPoint(container = document.body) { const temp = document.createElement("div"); temp.style.width = "100pt"; container.appendChild(temp); const result = 100 / temp.offsetWidth; container.removeChild(temp); return result; } function updateTabStop(elem, tabs, defaultTabSize, pixelToPoint = 72 / 96) { const p$3 = elem.closest("p"); const ebb = elem.getBoundingClientRect(); const pbb = p$3.getBoundingClientRect(); const pcs = getComputedStyle(p$3); const tabStops = tabs?.length > 0 ? tabs.map((t$6) => ({ pos: lengthToPoint(t$6.position), leader: t$6.leader, style: t$6.style })).sort((a$2, b$3) => a$2.pos - b$3.pos) : [defaultTab]; const lastTab = tabStops[tabStops.length - 1]; const pWidthPt = pbb.width * pixelToPoint; const size = lengthToPoint(defaultTabSize); let pos = lastTab.pos + size; if (pos < pWidthPt) { for (; pos < pWidthPt && tabStops.length < maxTabs; pos += size) { tabStops.push({ ...defaultTab, pos }); } } const marginLeft = parseFloat(pcs.marginLeft); const pOffset = pbb.left + marginLeft; const left = (ebb.left - pOffset) * pixelToPoint; const tab = tabStops.find((t$6) => t$6.style != "clear" && t$6.pos > left); if (tab == null) return; let width = 1; if (tab.style == "right" || tab.style == "center") { const tabStops$1 = Array.from(p$3.querySelectorAll(`.${elem.className}`)); const nextIdx = tabStops$1.indexOf(elem) + 1; const range = document.createRange(); range.setStart(elem, 1); if (nextIdx < tabStops$1.length) { range.setEndBefore(tabStops$1[nextIdx]); } else { range.setEndAfter(p$3); } const mul = tab.style == "center" ? .5 : 1; const nextBB = range.getBoundingClientRect(); const offset = nextBB.left + mul * nextBB.width - (pbb.left - marginLeft); width = tab.pos - offset * pixelToPoint; } else { width = tab.pos - left; } elem.innerHTML = " "; elem.style.textDecoration = "inherit"; elem.style.wordSpacing = `${width.toFixed(0)}pt`; switch (tab.leader) { case "dot": case "middleDot": elem.style.textDecoration = "underline"; elem.style.textDecorationStyle = "dotted"; break; case "hyphen": case "heavy": case "underscore": elem.style.textDecoration = "underline"; break; } } function lengthToPoint(length) { return parseFloat(length); } const ns = { svg: "http://www.w3.org/2000/svg", mathML: "http://www.w3.org/1998/Math/MathML" }; class HtmlRenderer { constructor(htmlDocument) { this.htmlDocument = htmlDocument; this.className = "docx"; this.styleMap = {}; this.currentPart = null; this.tableVerticalMerges = []; this.currentVerticalMerge = null; this.tableCellPositions = []; this.currentCellPosition = null; this.footnoteMap = {}; this.endnoteMap = {}; this.currentEndnoteIds = []; this.usedHederFooterParts = []; this.currentTabs = []; this.commentMap = {}; this.tasks = []; this.postRenderTasks = []; } async render(document$1, bodyContainer, styleContainer = null, options) { this.document = document$1; this.options = options; this.className = options.className; this.rootSelector = options.inWrapper ? `.${this.className}-wrapper` : ":root"; this.styleMap = null; this.tasks = []; if (this.options.renderComments && globalThis.Highlight) { this.commentHighlight = new Highlight(); } styleContainer = styleContainer || bodyContainer; removeAllElements(styleContainer); removeAllElements(bodyContainer); styleContainer.appendChild(this.createComment("docxjs library predefined styles")); styleContainer.appendChild(this.renderDefaultStyle()); if (document$1.themePart) { styleContainer.appendChild(this.createComment("docxjs document theme values")); this.renderTheme(document$1.themePart, styleContainer); } if (document$1.stylesPart != null) { this.styleMap = this.processStyles(document$1.stylesPart.styles); styleContainer.appendChild(this.createComment("docxjs document styles")); styleContainer.appendChild(this.renderStyles(document$1.stylesPart.styles)); } if (document$1.numberingPart) { this.prodessNumberings(document$1.numberingPart.domNumberings); styleContainer.appendChild(this.createComment("docxjs document numbering styles")); styleContainer.appendChild(this.renderNumbering(document$1.numberingPart.domNumberings, styleContainer)); } if (document$1.footnotesPart) { this.footnoteMap = keyBy(document$1.footnotesPart.notes, (x$2) => x$2.id); } if (document$1.endnotesPart) { this.endnoteMap = keyBy(document$1.endnotesPart.notes, (x$2) => x$2.id); } if (document$1.settingsPart) { this.defaultTabSize = document$1.settingsPart.settings?.defaultTabStop; } if (!options.ignoreFonts && document$1.fontTablePart) this.renderFontTable(document$1.fontTablePart, styleContainer); var sectionElements = this.renderSections(document$1.documentPart.body); if (this.options.inWrapper) { bodyContainer.appendChild(this.renderWrapper(sectionElements)); } else { appendChildren(bodyContainer, sectionElements); } if (this.commentHighlight && options.renderComments) { CSS.highlights.set(`${this.className}-comments`, this.commentHighlight); } this.postRenderTasks.forEach((t$6) => t$6()); await Promise.allSettled(this.tasks); this.refreshTabStops(); } renderTheme(themePart, styleContainer) { const variables = {}; const fontScheme = themePart.theme?.fontScheme; if (fontScheme) { if (fontScheme.majorFont) { variables["--docx-majorHAnsi-font"] = fontScheme.majorFont.latinTypeface; } if (fontScheme.minorFont) { variables["--docx-minorHAnsi-font"] = fontScheme.minorFont.latinTypeface; } } const colorScheme = themePart.theme?.colorScheme; if (colorScheme) { for (let [k$2, v$3] of Object.entries(colorScheme.colors)) { variables[`--docx-${k$2}-color`] = `#${v$3}`; } } const cssText = this.styleToString(`.${this.className}`, variables); styleContainer.appendChild(this.createStyleElement(cssText)); } renderFontTable(fontsPart, styleContainer) { for (let f$4 of fontsPart.fonts) { for (let ref of f$4.embedFontRefs) { this.tasks.push(this.document.loadFont(ref.id, ref.key).then((fontData) => { const cssValues = { "font-family": encloseFontFamily(f$4.name), "src": `url(${fontData})` }; if (ref.type == "bold" || ref.type == "boldItalic") { cssValues["font-weight"] = "bold"; } if (ref.type == "italic" || ref.type == "boldItalic") { cssValues["font-style"] = "italic"; } const cssText = this.styleToString("@font-face", cssValues); styleContainer.appendChild(this.createComment(`docxjs ${f$4.name} font`)); styleContainer.appendChild(this.createStyleElement(cssText)); })); } } } processStyleName(className) { return className ? `${this.className}_${escapeClassName(className)}` : this.className; } processStyles(styles$1) { const stylesMap = keyBy(styles$1.filter((x$2) => x$2.id != null), (x$2) => x$2.id); for (const style of styles$1.filter((x$2) => x$2.basedOn)) { var baseStyle = stylesMap[style.basedOn]; if (baseStyle) { style.paragraphProps = mergeDeep(style.paragraphProps, baseStyle.paragraphProps); style.runProps = mergeDeep(style.runProps, baseStyle.runProps); for (const baseValues of baseStyle.styles) { const styleValues = style.styles.find((x$2) => x$2.target == baseValues.target); if (styleValues) { this.copyStyleProperties(baseValues.values, styleValues.values); } else { style.styles.push({ ...baseValues, values: { ...baseValues.values } }); } } } else if (this.options.debug) console.warn(`Can't find base style ${style.basedOn}`); } for (let style of styles$1) { style.cssName = this.processStyleName(style.id); } return stylesMap; } prodessNumberings(numberings) { for (let num of numberings.filter((n$9) => n$9.pStyleName)) { const style = this.findStyle(num.pStyleName); if (style?.paragraphProps?.numbering) { style.paragraphProps.numbering.level = num.level; } } } processElement(element) { if (element.children) { for (var e$10 of element.children) { e$10.parent = element; if (e$10.type == DomType.Table) { this.processTable(e$10); } else { this.processElement(e$10); } } } } processTable(table) { for (var r$10 of table.children) { for (var c$7 of r$10.children) { c$7.cssStyle = this.copyStyleProperties(table.cellStyle, c$7.cssStyle, [ "border-left", "border-right", "border-top", "border-bottom", "padding-left", "padding-right", "padding-top", "padding-bottom" ]); this.processElement(c$7); } } } copyStyleProperties(input, output, attrs = null) { if (!input) return output; if (output == null) output = {}; if (attrs == null) attrs = Object.getOwnPropertyNames(input); for (var key of attrs) { if (input.hasOwnProperty(key) && !output.hasOwnProperty(key)) output[key] = input[key]; } return output; } createPageElement(className, props) { var elem = this.createElement("section", { className }); if (props) { if (props.pageMargins) { elem.style.paddingLeft = props.pageMargins.left; elem.style.paddingRight = props.pageMargins.right; elem.style.paddingTop = props.pageMargins.top; elem.style.paddingBottom = props.pageMargins.bottom; } if (props.pageSize) { if (!this.options.ignoreWidth) elem.style.width = props.pageSize.width; if (!this.options.ignoreHeight) elem.style.minHeight = props.pageSize.height; } } return elem; } createSectionContent(props) { var elem = this.createElement("article"); if (props.columns && props.columns.numberOfColumns) { elem.style.columnCount = `${props.columns.numberOfColumns}`; elem.style.columnGap = props.columns.space; if (props.columns.separator) { elem.style.columnRule = "1px solid black"; } } return elem; } renderSections(document$1) { const result = []; this.processElement(document$1); const sections = this.splitBySection(document$1.children, document$1.props); const pages = this.groupByPageBreaks(sections); let prevProps = null; for (let i$7 = 0, l$3 = pages.length; i$7 < l$3; i$7++) { this.currentFootnoteIds = []; const section = pages[i$7][0]; let props = section.sectProps; const pageElement = this.createPageElement(this.className, props); this.renderStyleValues(document$1.cssStyle, pageElement); this.options.renderHeaders && this.renderHeaderFooter(props.headerRefs, props, result.length, prevProps != props, pageElement); for (const sect of pages[i$7]) { var contentElement = this.createSectionContent(sect.sectProps); this.renderElements(sect.elements, contentElement); pageElement.appendChild(contentElement); props = sect.sectProps; } if (this.options.renderFootnotes) { this.renderNotes(this.currentFootnoteIds, this.footnoteMap, pageElement); } if (this.options.renderEndnotes && i$7 == l$3 - 1) { this.renderNotes(this.currentEndnoteIds, this.endnoteMap, pageElement); } this.options.renderFooters && this.renderHeaderFooter(props.footerRefs, props, result.length, prevProps != props, pageElement); result.push(pageElement); prevProps = props; } return result; } renderHeaderFooter(refs, props, page, firstOfSection, into) { if (!refs) return; var ref = (props.titlePage && firstOfSection ? refs.find((x$2) => x$2.type == "first") : null) ?? (page % 2 == 1 ? refs.find((x$2) => x$2.type == "even") : null) ?? refs.find((x$2) => x$2.type == "default"); var part = ref && this.document.findPartByRelId(ref.id, this.document.documentPart); if (part) { this.currentPart = part; if (!this.usedHederFooterParts.includes(part.path)) { this.processElement(part.rootElement); this.usedHederFooterParts.push(part.path); } const [el] = this.renderElements([part.rootElement], into); if (props?.pageMargins) { if (part.rootElement.type === DomType.Header) { el.style.marginTop = `calc(${props.pageMargins.header} - ${props.pageMargins.top})`; el.style.minHeight = `calc(${props.pageMargins.top} - ${props.pageMargins.header})`; } else if (part.rootElement.type === DomType.Footer) { el.style.marginBottom = `calc(${props.pageMargins.footer} - ${props.pageMargins.bottom})`; el.style.minHeight = `calc(${props.pageMargins.bottom} - ${props.pageMargins.footer})`; } } this.currentPart = null; } } isPageBreakElement(elem) { if (elem.type != DomType.Break) return false; if (elem.break == "lastRenderedPageBreak") return !this.options.ignoreLastRenderedPageBreak; return elem.break == "page"; } isPageBreakSection(prev, next) { if (!prev) return false; if (!next) return false; return prev.pageSize?.orientation != next.pageSize?.orientation || prev.pageSize?.width != next.pageSize?.width || prev.pageSize?.height != next.pageSize?.height; } splitBySection(elements, defaultProps) { var current = { sectProps: null, elements: [], pageBreak: false }; var result = [current]; for (let elem of elements) { if (elem.type == DomType.Paragraph) { const s$5 = this.findStyle(elem.styleName); if (s$5?.paragraphProps?.pageBreakBefore) { current.sectProps = sectProps; current.pageBreak = true; current = { sectProps: null, elements: [], pageBreak: false }; result.push(current); } } current.elements.push(elem); if (elem.type == DomType.Paragraph) { const p$3 = elem; var sectProps = p$3.sectionProps; var pBreakIndex = -1; var rBreakIndex = -1; if (this.options.breakPages && p$3.children) { pBreakIndex = p$3.children.findIndex((r$10) => { rBreakIndex = r$10.children?.findIndex(this.isPageBreakElement.bind(this)) ?? -1; return rBreakIndex != -1; }); } if (sectProps || pBreakIndex != -1) { current.sectProps = sectProps; current.pageBreak = pBreakIndex != -1; current = { sectProps: null, elements: [], pageBreak: false }; result.push(current); } if (pBreakIndex != -1) { let breakRun = p$3.children[pBreakIndex]; let splitRun = rBreakIndex < breakRun.children.length - 1; if (pBreakIndex < p$3.children.length - 1 || splitRun) { var children = elem.children; var newParagraph = { ...elem, children: children.slice(pBreakIndex) }; elem.children = children.slice(0, pBreakIndex); current.elements.push(newParagraph); if (splitRun) { let runChildren = breakRun.children; let newRun = { ...breakRun, children: runChildren.slice(0, rBreakIndex) }; elem.children.push(newRun); breakRun.children = runChildren.slice(rBreakIndex); } } } } } let currentSectProps = null; for (let i$7 = result.length - 1; i$7 >= 0; i$7--) { if (result[i$7].sectProps == null) { result[i$7].sectProps = currentSectProps ?? defaultProps; } else { currentSectProps = result[i$7].sectProps; } } return result; } groupByPageBreaks(sections) { let current = []; let prev; const result = [current]; for (let s$5 of sections) { current.push(s$5); if (this.options.ignoreLastRenderedPageBreak || s$5.pageBreak || this.isPageBreakSection(prev, s$5.sectProps)) result.push(current = []); prev = s$5.sectProps; } return result.filter((x$2) => x$2.length > 0); } renderWrapper(children) { return this.createElement("div", { className: `${this.className}-wrapper` }, children); } renderDefaultStyle() { var c$7 = this.className; var wrapperStyle = ` .${c$7}-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; } .${c$7}-wrapper>section.${c$7} { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; }`; if (this.options.hideWrapperOnPrint) { wrapperStyle = `@media not print { ${wrapperStyle} }`; } var styleText = `${wrapperStyle} .${c$7} { color: black; hyphens: auto; text-underline-position: from-font; } section.${c$7} { box-sizing: border-box; display: flex; flex-flow: column nowrap; position: relative; overflow: hidden; } section.${c$7}>article { margin-bottom: auto; z-index: 1; } section.${c$7}>footer { z-index: 1; } .${c$7} table { border-collapse: collapse; } .${c$7} table td, .${c$7} table th { vertical-align: top; } .${c$7} p { margin: 0pt; min-height: 1em; } .${c$7} span { white-space: pre-wrap; overflow-wrap: break-word; } .${c$7} a { color: inherit; text-decoration: inherit; } .${c$7} svg { fill: transparent; } `; if (this.options.renderComments) { styleText += ` .${c$7}-comment-ref { cursor: default; } .${c$7}-comment-popover { display: none; z-index: 1000; padding: 0.5rem; background: white; position: absolute; box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.25); width: 30ch; } .${c$7}-comment-ref:hover~.${c$7}-comment-popover { display: block; } .${c$7}-comment-author,.${c$7}-comment-date { font-size: 0.875rem; color: #888; } `; } return this.createStyleElement(styleText); } renderNumbering(numberings, styleContainer) { var styleText = ""; var resetCounters = []; for (var num of numberings) { var selector = `p.${this.numberingClass(num.id, num.level)}`; var listStyleType = "none"; if (num.bullet) { let valiable = `--${this.className}-${num.bullet.src}`.toLowerCase(); styleText += this.styleToString(`${selector}:before`, { "content": "' '", "display": "inline-block", "background": `var(${valiable})` }, num.bullet.style); this.tasks.push(this.document.loadNumberingImage(num.bullet.src).then((data) => { var text$2 = `${this.rootSelector} { ${valiable}: url(${data}) }`; styleContainer.appendChild(this.createStyleElement(text$2)); })); } else if (num.levelText) { let counter = this.numberingCounter(num.id, num.level); const counterReset = counter + " " + (num.start - 1); if (num.level > 0) { styleText += this.styleToString(`p.${this.numberingClass(num.id, num.level - 1)}`, { "counter-set": counterReset }); } resetCounters.push(counterReset); styleText += this.styleToString(`${selector}:before`, { "content": this.levelTextToContent(num.levelText, num.suff, num.id, this.numFormatToCssValue(num.format)), "counter-increment": counter, ...num.rStyle }); } else { listStyleType = this.numFormatToCssValue(num.format); } styleText += this.styleToString(selector, { "display": "list-item", "list-style-position": "inside", "list-style-type": listStyleType, ...num.pStyle }); } if (resetCounters.length > 0) { styleText += this.styleToString(this.rootSelector, { "counter-reset": resetCounters.join(" ") }); } return this.createStyleElement(styleText); } renderStyles(styles$1) { var styleText = ""; const stylesMap = this.styleMap; const defautStyles = keyBy(styles$1.filter((s$5) => s$5.isDefault), (s$5) => s$5.target); for (const style of styles$1) { var subStyles = style.styles; if (style.linked) { var linkedStyle = style.linked && stylesMap[style.linked]; if (linkedStyle) subStyles = subStyles.concat(linkedStyle.styles); else if (this.options.debug) console.warn(`Can't find linked style ${style.linked}`); } for (const subStyle of subStyles) { var selector = `${style.target ?? ""}.${style.cssName}`; if (style.target != subStyle.target) selector += ` ${subStyle.target}`; if (defautStyles[style.target] == style) selector = `.${this.className} ${style.target}, ` + selector; styleText += this.styleToString(selector, subStyle.values); } } return this.createStyleElement(styleText); } renderNotes(noteIds, notesMap, into) { var notes = noteIds.map((id) => notesMap[id]).filter((x$2) => x$2); if (notes.length > 0) { var result = this.createElement("ol", null, this.renderElements(notes)); into.appendChild(result); } } renderElement(elem) { switch (elem.type) { case DomType.Paragraph: return this.renderParagraph(elem); case DomType.BookmarkStart: return this.renderBookmarkStart(elem); case DomType.BookmarkEnd: return null; case DomType.Run: return this.renderRun(elem); case DomType.Table: return this.renderTable(elem); case DomType.Row: return this.renderTableRow(elem); case DomType.Cell: return this.renderTableCell(elem); case DomType.Hyperlink: return this.renderHyperlink(elem); case DomType.SmartTag: return this.renderSmartTag(elem); case DomType.Drawing: return this.renderDrawing(elem); case DomType.Image: return this.renderImage(elem); case DomType.Text: return this.renderText(elem); case DomType.Text: return this.renderText(elem); case DomType.DeletedText: return this.renderDeletedText(elem); case DomType.Tab: return this.renderTab(elem); case DomType.Symbol: return this.renderSymbol(elem); case DomType.Break: return this.renderBreak(elem); case DomType.Footer: return this.renderContainer(elem, "footer"); case DomType.Header: return this.renderContainer(elem, "header"); case DomType.Footnote: case DomType.Endnote: return this.renderContainer(elem, "li"); case DomType.FootnoteReference: return this.renderFootnoteReference(elem); case DomType.EndnoteReference: return this.renderEndnoteReference(elem); case DomType.NoBreakHyphen: return this.createElement("wbr"); case DomType.VmlPicture: return this.renderVmlPicture(elem); case DomType.VmlElement: return this.renderVmlElement(elem); case DomType.MmlMath: return this.renderContainerNS(elem, ns.mathML, "math", { xmlns: ns.mathML }); case DomType.MmlMathParagraph: return this.renderContainer(elem, "span"); case DomType.MmlFraction: return this.renderContainerNS(elem, ns.mathML, "mfrac"); case DomType.MmlBase: return this.renderContainerNS(elem, ns.mathML, elem.parent.type == DomType.MmlMatrixRow ? "mtd" : "mrow"); case DomType.MmlNumerator: case DomType.MmlDenominator: case DomType.MmlFunction: case DomType.MmlLimit: case DomType.MmlBox: return this.renderContainerNS(elem, ns.mathML, "mrow"); case DomType.MmlGroupChar: return this.renderMmlGroupChar(elem); case DomType.MmlLimitLower: return this.renderContainerNS(elem, ns.mathML, "munder"); case DomType.MmlMatrix: return this.renderContainerNS(elem, ns.mathML, "mtable"); case DomType.MmlMatrixRow: return this.renderContainerNS(elem, ns.mathML, "mtr"); case DomType.MmlRadical: return this.renderMmlRadical(elem); case DomType.MmlSuperscript: return this.renderContainerNS(elem, ns.mathML, "msup"); case DomType.MmlSubscript: return this.renderContainerNS(elem, ns.mathML, "msub"); case DomType.MmlDegree: case DomType.MmlSuperArgument: case DomType.MmlSubArgument: return this.renderContainerNS(elem, ns.mathML, "mn"); case DomType.MmlFunctionName: return this.renderContainerNS(elem, ns.mathML, "ms"); case DomType.MmlDelimiter: return this.renderMmlDelimiter(elem); case DomType.MmlRun: return this.renderMmlRun(elem); case DomType.MmlNary: return this.renderMmlNary(elem); case DomType.MmlPreSubSuper: return this.renderMmlPreSubSuper(elem); case DomType.MmlBar: return this.renderMmlBar(elem); case DomType.MmlEquationArray: return this.renderMllList(elem); case DomType.Inserted: return this.renderInserted(elem); case DomType.Deleted: return this.renderDeleted(elem); case DomType.CommentRangeStart: return this.renderCommentRangeStart(elem); case DomType.CommentRangeEnd: return this.renderCommentRangeEnd(elem); case DomType.CommentReference: return this.renderCommentReference(elem); case DomType.AltChunk: return this.renderAltChunk(elem); } return null; } renderElements(elems, into) { if (elems == null) return null; var result = elems.flatMap((e$10) => this.renderElement(e$10)).filter((e$10) => e$10 != null); if (into) appendChildren(into, result); return result; } renderContainer(elem, tagName, props) { return this.createElement(tagName, props, this.renderElements(elem.children)); } renderContainerNS(elem, ns$2, tagName, props) { return this.createElementNS(ns$2, tagName, props, this.renderElements(elem.children)); } renderParagraph(elem) { var result = this.renderContainer(elem, "p"); const style = this.findStyle(elem.styleName); elem.tabs ?? (elem.tabs = style?.paragraphProps?.tabs); this.renderClass(elem, result); this.renderStyleValues(elem.cssStyle, result); this.renderCommonProperties(result.style, elem); const numbering = elem.numbering ?? style?.paragraphProps?.numbering; if (numbering) { result.classList.add(this.numberingClass(numbering.id, numbering.level)); } return result; } renderRunProperties(style, props) { this.renderCommonProperties(style, props); } renderCommonProperties(style, props) { if (props == null) return; if (props.color) { style["color"] = props.color; } if (props.fontSize) { style["font-size"] = props.fontSize; } } renderHyperlink(elem) { var result = this.renderContainer(elem, "a"); this.renderStyleValues(elem.cssStyle, result); let href = ""; if (elem.id) { const rel$1 = this.document.documentPart.rels.find((it) => it.id == elem.id && it.targetMode === "External"); href = rel$1?.target ?? href; } if (elem.anchor) { href += `#${elem.anchor}`; } result.href = href; return result; } renderSmartTag(elem) { return this.renderContainer(elem, "span"); } renderCommentRangeStart(commentStart) { if (!this.options.renderComments) return null; const rng = new Range(); this.commentHighlight?.add(rng); const result = this.createComment(`start of comment #${commentStart.id}`); this.later(() => rng.setStart(result, 0)); this.commentMap[commentStart.id] = rng; return result; } renderCommentRangeEnd(commentEnd) { if (!this.options.renderComments) return null; const rng = this.commentMap[commentEnd.id]; const result = this.createComment(`end of comment #${commentEnd.id}`); this.later(() => rng?.setEnd(result, 0)); return result; } renderCommentReference(commentRef) { if (!this.options.renderComments) return null; var comment = this.document.commentsPart?.commentMap[commentRef.id]; if (!comment) return null; const frg = new DocumentFragment(); const commentRefEl = this.createElement("span", { className: `${this.className}-comment-ref` }, ["💬"]); const commentsContainerEl = this.createElement("div", { className: `${this.className}-comment-popover` }); this.renderCommentContent(comment, commentsContainerEl); frg.appendChild(this.createComment(`comment #${comment.id} by ${comment.author} on ${comment.date}`)); frg.appendChild(commentRefEl); frg.appendChild(commentsContainerEl); return frg; } renderAltChunk(elem) { if (!this.options.renderAltChunks) return null; var result = this.createElement("iframe"); this.tasks.push(this.document.loadAltChunk(elem.id, this.currentPart).then((x$2) => { result.srcdoc = x$2; })); return result; } renderCommentContent(comment, container) { container.appendChild(this.createElement("div", { className: `${this.className}-comment-author` }, [comment.author])); container.appendChild(this.createElement("div", { className: `${this.className}-comment-date` }, [new Date(comment.date).toLocaleString()])); this.renderElements(comment.children, container); } renderDrawing(elem) { var result = this.renderContainer(elem, "div"); result.style.display = "inline-block"; result.style.position = "relative"; result.style.textIndent = "0px"; this.renderStyleValues(elem.cssStyle, result); return result; } renderImage(elem) { let result = this.createElement("img"); let transform = elem.cssStyle?.transform; this.renderStyleValues(elem.cssStyle, result); if (elem.srcRect && elem.srcRect.some((x$2) => x$2 != 0)) { var [left, top, right, bottom] = elem.srcRect; transform = `scale(${1 / (1 - left - right)}, ${1 / (1 - top - bottom)})`; result.style["clip-path"] = `rect(${(100 * top).toFixed(2)}% ${(100 * (1 - right)).toFixed(2)}% ${(100 * (1 - bottom)).toFixed(2)}% ${(100 * left).toFixed(2)}%)`; } if (elem.rotation) transform = `rotate(${elem.rotation}deg) ${transform ?? ""}`; result.style.transform = transform?.trim(); if (this.document) { this.tasks.push(this.document.loadDocumentImage(elem.src, this.currentPart).then((x$2) => { result.src = x$2; })); } return result; } renderText(elem) { return this.htmlDocument.createTextNode(elem.text); } renderDeletedText(elem) { return this.options.renderChanges ? this.renderText(elem) : null; } renderBreak(elem) { if (elem.break == "textWrapping") { return this.createElement("br"); } return null; } renderInserted(elem) { if (this.options.renderChanges) return this.renderContainer(elem, "ins"); return this.renderElements(elem.children); } renderDeleted(elem) { if (this.options.renderChanges) return this.renderContainer(elem, "del"); return null; } renderSymbol(elem) { var span = this.createElement("span"); span.style.fontFamily = elem.font; span.innerHTML = `&#x${elem.char};`; return span; } renderFootnoteReference(elem) { var result = this.createElement("sup"); this.currentFootnoteIds.push(elem.id); result.textContent = `${this.currentFootnoteIds.length}`; return result; } renderEndnoteReference(elem) { var result = this.createElement("sup"); this.currentEndnoteIds.push(elem.id); result.textContent = `${this.currentEndnoteIds.length}`; return result; } renderTab(elem) { var tabSpan = this.createElement("span"); tabSpan.innerHTML = " "; if (this.options.experimental) { tabSpan.className = this.tabStopClass(); var stops = findParent(elem, DomType.Paragraph)?.tabs; this.currentTabs.push({ stops, span: tabSpan }); } return tabSpan; } renderBookmarkStart(elem) { return this.createElement("span", { id: elem.name }); } renderRun(elem) { if (elem.fieldRun) return null; const result = this.createElement("span"); if (elem.id) result.id = elem.id; this.renderClass(elem, result); this.renderStyleValues(elem.cssStyle, result); if (elem.verticalAlign) { const wrapper = this.createElement(elem.verticalAlign); this.renderElements(elem.children, wrapper); result.appendChild(wrapper); } else { this.renderElements(elem.children, result); } return result; } renderTable(elem) { let result = this.createElement("table"); this.tableCellPositions.push(this.currentCellPosition); this.tableVerticalMerges.push(this.currentVerticalMerge); this.currentVerticalMerge = {}; this.currentCellPosition = { col: 0, row: 0 }; if (elem.columns) result.appendChild(this.renderTableColumns(elem.columns)); this.renderClass(elem, result); this.renderElements(elem.children, result); this.renderStyleValues(elem.cssStyle, result); this.currentVerticalMerge = this.tableVerticalMerges.pop(); this.currentCellPosition = this.tableCellPositions.pop(); return result; } renderTableColumns(columns) { let result = this.createElement("colgroup"); for (let col of columns) { let colElem = this.createElement("col"); if (col.width) colElem.style.width = col.width; result.appendChild(colElem); } return result; } renderTableRow(elem) { let result = this.createElement("tr"); this.currentCellPosition.col = 0; if (elem.gridBefore) result.appendChild(this.renderTableCellPlaceholder(elem.gridBefore)); this.renderClass(elem, result); this.renderElements(elem.children, result); this.renderStyleValues(elem.cssStyle, result); if (elem.gridAfter) result.appendChild(this.renderTableCellPlaceholder(elem.gridAfter)); this.currentCellPosition.row++; return result; } renderTableCellPlaceholder(colSpan) { const result = this.createElement("td", { colSpan }); result.style["border"] = "none"; return result; } renderTableCell(elem) { let result = this.renderContainer(elem, "td"); const key = this.currentCellPosition.col; if (elem.verticalMerge) { if (elem.verticalMerge == "restart") { this.currentVerticalMerge[key] = result; result.rowSpan = 1; } else if (this.currentVerticalMerge[key]) { this.currentVerticalMerge[key].rowSpan += 1; result.style.display = "none"; } } else { this.currentVerticalMerge[key] = null; } this.renderClass(elem, result); this.renderStyleValues(elem.cssStyle, result); if (elem.span) result.colSpan = elem.span; this.currentCellPosition.col += result.colSpan; return result; } renderVmlPicture(elem) { return this.renderContainer(elem, "div"); } renderVmlElement(elem) { var container = this.createSvgElement("svg"); container.setAttribute("style", elem.cssStyleText); const result = this.renderVmlChildElement(elem); if (elem.imageHref?.id) { this.tasks.push(this.document?.loadDocumentImage(elem.imageHref.id, this.currentPart).then((x$2) => result.setAttribute("href", x$2))); } container.appendChild(result); requestAnimationFrame(() => { const bb = container.firstElementChild.getBBox(); container.setAttribute("width", `${Math.ceil(bb.x + bb.width)}`); container.setAttribute("height", `${Math.ceil(bb.y + bb.height)}`); }); return container; } renderVmlChildElement(elem) { const result = this.createSvgElement(elem.tagName); Object.entries(elem.attrs).forEach(([k$2, v$3]) => result.setAttribute(k$2, v$3)); for (let child of elem.children) { if (child.type == DomType.VmlElement) { result.appendChild(this.renderVmlChildElement(child)); } else { result.appendChild(...asArray(this.renderElement(child))); } } return result; } renderMmlRadical(elem) { const base = elem.children.find((el) => el.type == DomType.MmlBase); if (elem.props?.hideDegree) { return this.createElementNS(ns.mathML, "msqrt", null, this.renderElements([base])); } const degree = elem.children.find((el) => el.type == DomType.MmlDegree); return this.createElementNS(ns.mathML, "mroot", null, this.renderElements([base, degree])); } renderMmlDelimiter(elem) { const children = []; children.push(this.createElementNS(ns.mathML, "mo", null, [elem.props.beginChar ?? "("])); children.push(...this.renderElements(elem.children)); children.push(this.createElementNS(ns.mathML, "mo", null, [elem.props.endChar ?? ")"])); return this.createElementNS(ns.mathML, "mrow", null, children); } renderMmlNary(elem) { const children = []; const grouped = keyBy(elem.children, (x$2) => x$2.type); const sup$1 = grouped[DomType.MmlSuperArgument]; const sub$1 = grouped[DomType.MmlSubArgument]; const supElem = sup$1 ? this.createElementNS(ns.mathML, "mo", null, asArray(this.renderElement(sup$1))) : null; const subElem = sub$1 ? this.createElementNS(ns.mathML, "mo", null, asArray(this.renderElement(sub$1))) : null; const charElem = this.createElementNS(ns.mathML, "mo", null, [elem.props?.char ?? "∫"]); if (supElem || subElem) { children.push(this.createElementNS(ns.mathML, "munderover", null, [ charElem, subElem, supElem ])); } else if (supElem) { children.push(this.createElementNS(ns.mathML, "mover", null, [charElem, supElem])); } else if (subElem) { children.push(this.createElementNS(ns.mathML, "munder", null, [charElem, subElem])); } else { children.push(charElem); } children.push(...this.renderElements(grouped[DomType.MmlBase].children)); return this.createElementNS(ns.mathML, "mrow", null, children); } renderMmlPreSubSuper(elem) { const children = []; const grouped = keyBy(elem.children, (x$2) => x$2.type); const sup$1 = grouped[DomType.MmlSuperArgument]; const sub$1 = grouped[DomType.MmlSubArgument]; const supElem = sup$1 ? this.createElementNS(ns.mathML, "mo", null, asArray(this.renderElement(sup$1))) : null; const subElem = sub$1 ? this.createElementNS(ns.mathML, "mo", null, asArray(this.renderElement(sub$1))) : null; const stubElem = this.createElementNS(ns.mathML, "mo", null); children.push(this.createElementNS(ns.mathML, "msubsup", null, [ stubElem, subElem, supElem ])); children.push(...this.renderElements(grouped[DomType.MmlBase].children)); return this.createElementNS(ns.mathML, "mrow", null, children); } renderMmlGroupChar(elem) { const tagName = elem.props.verticalJustification === "bot" ? "mover" : "munder"; const result = this.renderContainerNS(elem, ns.mathML, tagName); if (elem.props.char) { result.appendChild(this.createElementNS(ns.mathML, "mo", null, [elem.props.char])); } return result; } renderMmlBar(elem) { const result = this.renderContainerNS(elem, ns.mathML, "mrow"); switch (elem.props.position) { case "top": result.style.textDecoration = "overline"; break; case "bottom": result.style.textDecoration = "underline"; break; } return result; } renderMmlRun(elem) { const result = this.createElementNS(ns.mathML, "ms", null, this.renderElements(elem.children)); this.renderClass(elem, result); this.renderStyleValues(elem.cssStyle, result); return result; } renderMllList(elem) { const result = this.createElementNS(ns.mathML, "mtable"); this.renderClass(elem, result); this.renderStyleValues(elem.cssStyle, result); for (let child of this.renderElements(elem.children)) { result.appendChild(this.createElementNS(ns.mathML, "mtr", null, [this.createElementNS(ns.mathML, "mtd", null, [child])])); } return result; } renderStyleValues(style, ouput) { for (let k$2 in style) { if (k$2.startsWith("$")) { ouput.setAttribute(k$2.slice(1), style[k$2]); } else { ouput.style[k$2] = style[k$2]; } } } renderClass(input, ouput) { if (input.className) ouput.className = input.className; if (input.styleName) ouput.classList.add(this.processStyleName(input.styleName)); } findStyle(styleName) { return styleName && this.styleMap?.[styleName]; } numberingClass(id, lvl) { return `${this.className}-num-${id}-${lvl}`; } tabStopClass() { return `${this.className}-tab-stop`; } styleToString(selectors, values$1, cssText = null) { let result = `${selectors} {\r\n`; for (const key in values$1) { if (key.startsWith("$")) continue; result += ` ${key}: ${values$1[key]};\r\n`; } if (cssText) result += cssText; return result + "}\r\n"; } numberingCounter(id, lvl) { return `${this.className}-num-${id}-${lvl}`; } levelTextToContent(text$2, suff, id, numformat) { const suffMap = { "tab": "\\9", "space": "\\a0" }; var result = text$2.replace(/%\d*/g, (s$5) => { let lvl = parseInt(s$5.substring(1), 10) - 1; return `"counter(${this.numberingCounter(id, lvl)}, ${numformat})"`; }); return `"${result}${suffMap[suff] ?? ""}"`; } numFormatToCssValue(format) { var mapping = { none: "none", bullet: "disc", decimal: "decimal", lowerLetter: "lower-alpha", upperLetter: "upper-alpha", lowerRoman: "lower-roman", upperRoman: "upper-roman", decimalZero: "decimal-leading-zero", aiueo: "katakana", aiueoFullWidth: "katakana", chineseCounting: "simp-chinese-informal", chineseCountingThousand: "simp-chinese-informal", chineseLegalSimplified: "simp-chinese-formal", chosung: "hangul-consonant", ideographDigital: "cjk-ideographic", ideographTraditional: "cjk-heavenly-stem", ideographLegalTraditional: "trad-chinese-formal", ideographZodiac: "cjk-earthly-branch", iroha: "katakana-iroha", irohaFullWidth: "katakana-iroha", japaneseCounting: "japanese-informal", japaneseDigitalTenThousand: "cjk-decimal", japaneseLegal: "japanese-formal", thaiNumbers: "thai", koreanCounting: "korean-hangul-formal", koreanDigital: "korean-hangul-formal", koreanDigital2: "korean-hanja-informal", hebrew1: "hebrew", hebrew2: "hebrew", hindiNumbers: "devanagari", ganada: "hangul", taiwaneseCounting: "cjk-ideographic", taiwaneseCountingThousand: "cjk-ideographic", taiwaneseDigital: "cjk-decimal" }; return mapping[format] ?? format; } refreshTabStops() { if (!this.options.experimental) return; setTimeout(() => { const pixelToPoint = computePixelToPoint(); for (let tab of this.currentTabs) { updateTabStop(tab.span, tab.stops, this.defaultTabSize, pixelToPoint); } }, 500); } createElementNS(ns$2, tagName, props, children) { var result = ns$2 ? this.htmlDocument.createElementNS(ns$2, tagName) : this.htmlDocument.createElement(tagName); Object.assign(result, props); children && appendChildren(result, children); return result; } createElement(tagName, props, children) { return this.createElementNS(undefined, tagName, props, children); } createSvgElement(tagName, props, children) { return this.createElementNS(ns.svg, tagName, props, children); } createStyleElement(cssText) { return this.createElement("style", { innerHTML: cssText }); } createComment(text$2) { return this.htmlDocument.createComment(text$2); } later(func) { this.postRenderTasks.push(func); } } function removeAllElements(elem) { elem.innerHTML = ""; } function appendChildren(elem, children) { children.forEach((c$7) => elem.appendChild(isString(c$7) ? document.createTextNode(c$7) : c$7)); } function findParent(elem, type) { var parent = elem.parent; while (parent != null && parent.type != type) parent = parent.parent; return parent; } const defaultOptions = { ignoreHeight: false, ignoreWidth: false, ignoreFonts: false, breakPages: true, debug: false, experimental: false, className: "docx", inWrapper: true, hideWrapperOnPrint: false, trimXmlDeclaration: true, ignoreLastRenderedPageBreak: true, renderHeaders: true, renderFooters: true, renderFootnotes: true, renderEndnotes: true, useBase64URL: false, renderChanges: false, renderComments: false, renderAltChunks: true }; function parseAsync$1(data, userOptions) { const ops = { ...defaultOptions, ...userOptions }; return WordDocument.load(data, new DocumentParser(ops), ops); } async function renderDocument(document$1, bodyContainer, styleContainer, userOptions) { const ops = { ...defaultOptions, ...userOptions }; const renderer = new HtmlRenderer(window.document); return await renderer.render(document$1, bodyContainer, styleContainer, ops); } async function renderAsync$2(data, bodyContainer, styleContainer, userOptions) { const doc = await parseAsync$1(data, userOptions); await renderDocument(doc, bodyContainer, styleContainer, userOptions); return doc; } exports$1.defaultOptions = defaultOptions; exports$1.parseAsync = parseAsync$1; exports$1.renderAsync = renderAsync$2; exports$1.renderDocument = renderDocument; })); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/pdfjs-dist/build/pdf.mjs function setVerbosityLevel(level) { if (Number.isInteger(level)) { verbosity = level; } } function getVerbosityLevel() { return verbosity; } function info(msg) { if (verbosity >= VerbosityLevel.INFOS) { console.info(`Info: ${msg}`); } } function warn$2(msg) { if (verbosity >= VerbosityLevel.WARNINGS) { console.warn(`Warning: ${msg}`); } } function unreachable(msg) { throw new Error(msg); } function assert$1(cond, msg) { if (!cond) { unreachable(msg); } } function _isValidProtocol(url) { switch (url?.protocol) { case "http:": case "https:": case "ftp:": case "mailto:": case "tel:": return true; default: return false; } } function createValidAbsoluteUrl(url, baseUrl = null, options = null) { if (!url) { return null; } if (options && typeof url === "string") { if (options.addDefaultProtocol && url.startsWith("www.")) { const dots = url.match(/\./g); if (dots?.length >= 2) { url = `http://${url}`; } } if (options.tryConvertEncoding) { try { url = stringToUTF8String(url); } catch {} } } const absoluteUrl = baseUrl ? URL.parse(url, baseUrl) : URL.parse(url); return _isValidProtocol(absoluteUrl) ? absoluteUrl : null; } function updateUrlHash(url, hash, allowRel = false) { const res = URL.parse(url); if (res) { res.hash = hash; return res.href; } if (allowRel && createValidAbsoluteUrl(url, "http://example.com")) { return url.split("#", 1)[0] + `${hash ? `#${hash}` : ""}`; } return ""; } function shadow(obj, prop, value, nonSerializable = false) { Object.defineProperty(obj, prop, { value, enumerable: !nonSerializable, configurable: true, writable: false }); return value; } function bytesToString(bytes) { if (typeof bytes !== "object" || bytes?.length === undefined) { unreachable("Invalid argument for bytesToString"); } const length = bytes.length; const MAX_ARGUMENT_COUNT = 8192; if (length < MAX_ARGUMENT_COUNT) { return String.fromCharCode.apply(null, bytes); } const strBuf = []; for (let i$7 = 0; i$7 < length; i$7 += MAX_ARGUMENT_COUNT) { const chunkEnd = Math.min(i$7 + MAX_ARGUMENT_COUNT, length); const chunk = bytes.subarray(i$7, chunkEnd); strBuf.push(String.fromCharCode.apply(null, chunk)); } return strBuf.join(""); } function stringToBytes(str) { if (typeof str !== "string") { unreachable("Invalid argument for stringToBytes"); } const length = str.length; const bytes = new Uint8Array(length); for (let i$7 = 0; i$7 < length; ++i$7) { bytes[i$7] = str.charCodeAt(i$7) & 255; } return bytes; } function string32(value) { return String.fromCharCode(value >> 24 & 255, value >> 16 & 255, value >> 8 & 255, value & 255); } function objectSize(obj) { return Object.keys(obj).length; } function isLittleEndian() { const buffer8 = new Uint8Array(4); buffer8[0] = 1; const view32 = new Uint32Array(buffer8.buffer, 0, 1); return view32[0] === 1; } function isEvalSupported() { try { new Function(""); return true; } catch { return false; } } function stringToPDFString(str, keepEscapeSequence = false) { if (str[0] >= "ï") { let encoding; if (str[0] === "þ" && str[1] === "ÿ") { encoding = "utf-16be"; if (str.length % 2 === 1) { str = str.slice(0, -1); } } else if (str[0] === "ÿ" && str[1] === "þ") { encoding = "utf-16le"; if (str.length % 2 === 1) { str = str.slice(0, -1); } } else if (str[0] === "ï" && str[1] === "»" && str[2] === "¿") { encoding = "utf-8"; } if (encoding) { try { const decoder = new TextDecoder(encoding, { fatal: true }); const buffer = stringToBytes(str); const decoded = decoder.decode(buffer); if (keepEscapeSequence || !decoded.includes("\x1B")) { return decoded; } return decoded.replaceAll(/\x1b[^\x1b]*(?:\x1b|$)/g, ""); } catch (ex) { warn$2(`stringToPDFString: "${ex}".`); } } } const strBuf = []; for (let i$7 = 0, ii = str.length; i$7 < ii; i$7++) { const charCode = str.charCodeAt(i$7); if (!keepEscapeSequence && charCode === 27) { while (++i$7 < ii && str.charCodeAt(i$7) !== 27) {} continue; } const code = PDFStringTranslateTable[charCode]; strBuf.push(code ? String.fromCharCode(code) : str.charAt(i$7)); } return strBuf.join(""); } function stringToUTF8String(str) { return decodeURIComponent(escape(str)); } function utf8StringToString(str) { return unescape(encodeURIComponent(str)); } function isArrayEqual(arr1, arr2) { if (arr1.length !== arr2.length) { return false; } for (let i$7 = 0, ii = arr1.length; i$7 < ii; i$7++) { if (arr1[i$7] !== arr2[i$7]) { return false; } } return true; } function getModificationDate(date = new Date()) { if (!(date instanceof Date)) { date = new Date(date); } const buffer = [ date.getUTCFullYear().toString(), (date.getUTCMonth() + 1).toString().padStart(2, "0"), date.getUTCDate().toString().padStart(2, "0"), date.getUTCHours().toString().padStart(2, "0"), date.getUTCMinutes().toString().padStart(2, "0"), date.getUTCSeconds().toString().padStart(2, "0") ]; return buffer.join(""); } function normalizeUnicode(str) { if (!NormalizeRegex) { NormalizeRegex = /([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu; NormalizationMap = new Map([["ſt", "ſt"]]); } return str.replaceAll(NormalizeRegex, (_$2, p1, p2) => p1 ? p1.normalize("NFKC") : NormalizationMap.get(p2)); } function getUuid() { if (typeof crypto.randomUUID === "function") { return crypto.randomUUID(); } const buf = new Uint8Array(32); crypto.getRandomValues(buf); return bytesToString(buf); } function _isValidExplicitDest(validRef, validName, dest) { if (!Array.isArray(dest) || dest.length < 2) { return false; } const [page, zoom, ...args] = dest; if (!validRef(page) && !Number.isInteger(page)) { return false; } if (!validName(zoom)) { return false; } const argsLen = args.length; let allowNull = true; switch (zoom.name) { case "XYZ": if (argsLen < 2 || argsLen > 3) { return false; } break; case "Fit": case "FitB": return argsLen === 0; case "FitH": case "FitBH": case "FitV": case "FitBV": if (argsLen > 1) { return false; } break; case "FitR": if (argsLen !== 4) { return false; } allowNull = false; break; default: return false; } for (const arg of args) { if (typeof arg === "number" || allowNull && arg === null) { continue; } return false; } return true; } function MathClamp(v$3, min, max) { return Math.min(Math.max(v$3, min), max); } function toHexUtil(arr) { if (Uint8Array.prototype.toHex) { return arr.toHex(); } return Array.from(arr, (num) => hexNumbers[num]).join(""); } function toBase64Util(arr) { if (Uint8Array.prototype.toBase64) { return arr.toBase64(); } return btoa(bytesToString(arr)); } function fromBase64Util(str) { if (Uint8Array.fromBase64) { return Uint8Array.fromBase64(str); } return stringToBytes(atob(str)); } async function fetchData(url, type = "text") { if (isValidFetchUrl(url, document.baseURI)) { const response = await fetch(url); if (!response.ok) { throw new Error(response.statusText); } switch (type) { case "arraybuffer": return response.arrayBuffer(); case "blob": return response.blob(); case "json": return response.json(); } return response.text(); } return new Promise((resolve, reject) => { const request = new XMLHttpRequest(); request.open("GET", url, true); request.responseType = type; request.onreadystatechange = () => { if (request.readyState !== XMLHttpRequest.DONE) { return; } if (request.status === 200 || request.status === 0) { switch (type) { case "arraybuffer": case "blob": case "json": resolve(request.response); return; } resolve(request.responseText); return; } reject(new Error(request.statusText)); }; request.send(null); }); } function isDataScheme(url) { const ii = url.length; let i$7 = 0; while (i$7 < ii && url[i$7].trim() === "") { i$7++; } return url.substring(i$7, i$7 + 5).toLowerCase() === "data:"; } function isPdfFile(filename) { return typeof filename === "string" && /\.pdf$/i.test(filename); } function getFilenameFromUrl(url) { [url] = url.split(/[#?]/, 1); return url.substring(url.lastIndexOf("/") + 1); } function getPdfFilenameFromUrl(url, defaultFilename = "document.pdf") { if (typeof url !== "string") { return defaultFilename; } if (isDataScheme(url)) { warn$2("getPdfFilenameFromUrl: ignore \"data:\"-URL for performance reasons."); return defaultFilename; } const getURL = (urlString) => { try { return new URL(urlString); } catch { try { return new URL(decodeURIComponent(urlString)); } catch { try { return new URL(urlString, "https://foo.bar"); } catch { try { return new URL(decodeURIComponent(urlString), "https://foo.bar"); } catch { return null; } } } } }; const newURL = getURL(url); if (!newURL) { return defaultFilename; } const decode = (name) => { try { let decoded = decodeURIComponent(name); if (decoded.includes("/")) { decoded = decoded.split("/").at(-1); if (decoded.test(/^\.pdf$/i)) { return decoded; } return name; } return decoded; } catch { return name; } }; const pdfRegex = /\.pdf$/i; const filename = newURL.pathname.split("/").at(-1); if (pdfRegex.test(filename)) { return decode(filename); } if (newURL.searchParams.size > 0) { const values = Array.from(newURL.searchParams.values()).reverse(); for (const value of values) { if (pdfRegex.test(value)) { return decode(value); } } const keys$1 = Array.from(newURL.searchParams.keys()).reverse(); for (const key of keys$1) { if (pdfRegex.test(key)) { return decode(key); } } } if (newURL.hash) { const reFilename = /[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i; const hashFilename = reFilename.exec(newURL.hash); if (hashFilename) { return decode(hashFilename[0]); } } return defaultFilename; } function isValidFetchUrl(url, baseUrl) { const res = baseUrl ? URL.parse(url, baseUrl) : URL.parse(url); return res?.protocol === "http:" || res?.protocol === "https:"; } function noContextMenu(e$10) { e$10.preventDefault(); } function stopEvent(e$10) { e$10.preventDefault(); e$10.stopPropagation(); } function deprecated$2(details) { console.log("Deprecated API usage: " + details); } function getXfaPageViewport(xfaPage, { scale = 1, rotation = 0 }) { const { width, height } = xfaPage.attributes.style; const viewBox = [ 0, 0, parseInt(width), parseInt(height) ]; return new PageViewport({ viewBox, userUnit: 1, scale, rotation }); } function getRGB(color) { if (color.startsWith("#")) { const colorRGB = parseInt(color.slice(1), 16); return [ (colorRGB & 16711680) >> 16, (colorRGB & 65280) >> 8, colorRGB & 255 ]; } if (color.startsWith("rgb(")) { return color.slice(4, -1).split(",").map((x$2) => parseInt(x$2)); } if (color.startsWith("rgba(")) { return color.slice(5, -1).split(",").map((x$2) => parseInt(x$2)).slice(0, 3); } warn$2(`Not a valid color format: "${color}"`); return [ 0, 0, 0 ]; } function getColorValues(colors) { const span = document.createElement("span"); span.style.visibility = "hidden"; span.style.colorScheme = "only light"; document.body.append(span); for (const name of colors.keys()) { span.style.color = name; const computedColor = window.getComputedStyle(span).color; colors.set(name, getRGB(computedColor)); } span.remove(); } function getCurrentTransform(ctx) { const { a: a$2, b: b$3, c: c$7, d: d$5, e: e$10, f: f$4 } = ctx.getTransform(); return [ a$2, b$3, c$7, d$5, e$10, f$4 ]; } function getCurrentTransformInverse(ctx) { const { a: a$2, b: b$3, c: c$7, d: d$5, e: e$10, f: f$4 } = ctx.getTransform().invertSelf(); return [ a$2, b$3, c$7, d$5, e$10, f$4 ]; } function setLayerDimensions(div, viewport, mustFlip = false, mustRotate = true) { if (viewport instanceof PageViewport) { const { pageWidth, pageHeight } = viewport.rawDims; const { style } = div; const useRound = util_FeatureTest.isCSSRoundSupported; const w$2 = `var(--total-scale-factor) * ${pageWidth}px`, h$5 = `var(--total-scale-factor) * ${pageHeight}px`; const widthStr = useRound ? `round(down, ${w$2}, var(--scale-round-x))` : `calc(${w$2})`, heightStr = useRound ? `round(down, ${h$5}, var(--scale-round-y))` : `calc(${h$5})`; if (!mustFlip || viewport.rotation % 180 === 0) { style.width = widthStr; style.height = heightStr; } else { style.width = heightStr; style.height = widthStr; } } if (mustRotate) { div.setAttribute("data-main-rotation", viewport.rotation); } } function applyOpacity(r$10, g$1, b$3, opacity) { opacity = Math.min(Math.max(opacity ?? 1, 0), 1); const white = 255 * (1 - opacity); r$10 = Math.round(r$10 * opacity + white); g$1 = Math.round(g$1 * opacity + white); b$3 = Math.round(b$3 * opacity + white); return [ r$10, g$1, b$3 ]; } function RGBToHSL(rgb, output) { const r$10 = rgb[0] / 255; const g$1 = rgb[1] / 255; const b$3 = rgb[2] / 255; const max = Math.max(r$10, g$1, b$3); const min = Math.min(r$10, g$1, b$3); const l$3 = (max + min) / 2; if (max === min) { output[0] = output[1] = 0; } else { const d$5 = max - min; output[1] = l$3 < .5 ? d$5 / (max + min) : d$5 / (2 - max - min); switch (max) { case r$10: output[0] = ((g$1 - b$3) / d$5 + (g$1 < b$3 ? 6 : 0)) * 60; break; case g$1: output[0] = ((b$3 - r$10) / d$5 + 2) * 60; break; case b$3: output[0] = ((r$10 - g$1) / d$5 + 4) * 60; break; } } output[2] = l$3; } function HSLToRGB(hsl, output) { const h$5 = hsl[0]; const s$5 = hsl[1]; const l$3 = hsl[2]; const c$7 = (1 - Math.abs(2 * l$3 - 1)) * s$5; const x$2 = c$7 * (1 - Math.abs(h$5 / 60 % 2 - 1)); const m$3 = l$3 - c$7 / 2; switch (Math.floor(h$5 / 60)) { case 0: output[0] = c$7 + m$3; output[1] = x$2 + m$3; output[2] = m$3; break; case 1: output[0] = x$2 + m$3; output[1] = c$7 + m$3; output[2] = m$3; break; case 2: output[0] = m$3; output[1] = c$7 + m$3; output[2] = x$2 + m$3; break; case 3: output[0] = m$3; output[1] = x$2 + m$3; output[2] = c$7 + m$3; break; case 4: output[0] = x$2 + m$3; output[1] = m$3; output[2] = c$7 + m$3; break; case 5: case 6: output[0] = c$7 + m$3; output[1] = m$3; output[2] = x$2 + m$3; break; } } function computeLuminance(x$2) { return x$2 <= .03928 ? x$2 / 12.92 : ((x$2 + .055) / 1.055) ** 2.4; } function contrastRatio(hsl1, hsl2, output) { HSLToRGB(hsl1, output); output.map(computeLuminance); const lum1 = .2126 * output[0] + .7152 * output[1] + .0722 * output[2]; HSLToRGB(hsl2, output); output.map(computeLuminance); const lum2 = .2126 * output[0] + .7152 * output[1] + .0722 * output[2]; return lum1 > lum2 ? (lum1 + .05) / (lum2 + .05) : (lum2 + .05) / (lum1 + .05); } function findContrastColor(baseColor, fixedColor) { const key = baseColor[0] + baseColor[1] * 256 + baseColor[2] * 65536 + fixedColor[0] * 16777216 + fixedColor[1] * 4294967296 + fixedColor[2] * 1099511627776; let cachedValue = contrastCache.get(key); if (cachedValue) { return cachedValue; } const array = new Float32Array(9); const output = array.subarray(0, 3); const baseHSL = array.subarray(3, 6); RGBToHSL(baseColor, baseHSL); const fixedHSL = array.subarray(6, 9); RGBToHSL(fixedColor, fixedHSL); const isFixedColorDark = fixedHSL[2] < .5; const minContrast = isFixedColorDark ? 12 : 4.5; baseHSL[2] = isFixedColorDark ? Math.sqrt(baseHSL[2]) : 1 - Math.sqrt(1 - baseHSL[2]); if (contrastRatio(baseHSL, fixedHSL, output) < minContrast) { let start, end; if (isFixedColorDark) { start = baseHSL[2]; end = 1; } else { start = 0; end = baseHSL[2]; } const PRECISION = .005; while (end - start > PRECISION) { const mid = baseHSL[2] = (start + end) / 2; if (isFixedColorDark === contrastRatio(baseHSL, fixedHSL, output) < minContrast) { start = mid; } else { end = mid; } } baseHSL[2] = isFixedColorDark ? end : start; } HSLToRGB(baseHSL, output); cachedValue = Util.makeHexColor(Math.round(output[0] * 255), Math.round(output[1] * 255), Math.round(output[2] * 255)); contrastCache.set(key, cachedValue); return cachedValue; } function renderRichText({ html, dir, className }, container) { const fragment = document.createDocumentFragment(); if (typeof html === "string") { const p$3 = document.createElement("p"); p$3.dir = dir || "auto"; const lines = html.split(/(?:\r\n?|\n)/); for (let i$7 = 0, ii = lines.length; i$7 < ii; ++i$7) { const line = lines[i$7]; p$3.append(document.createTextNode(line)); if (i$7 < ii - 1) { p$3.append(document.createElement("br")); } } fragment.append(p$3); } else { XfaLayer.render({ xfaHtml: html, div: fragment, intent: "richText" }); } fragment.firstChild.classList.add("richText", className); container.append(fragment); } function makePathFromDrawOPS(data) { const path$1 = new Path2D(); if (!data) { return path$1; } for (let i$7 = 0, ii = data.length; i$7 < ii;) { switch (data[i$7++]) { case DrawOPS.moveTo: path$1.moveTo(data[i$7++], data[i$7++]); break; case DrawOPS.lineTo: path$1.lineTo(data[i$7++], data[i$7++]); break; case DrawOPS.curveTo: path$1.bezierCurveTo(data[i$7++], data[i$7++], data[i$7++], data[i$7++], data[i$7++], data[i$7++]); break; case DrawOPS.quadraticCurveTo: path$1.quadraticCurveTo(data[i$7++], data[i$7++], data[i$7++], data[i$7++]); break; case DrawOPS.closePath: path$1.closePath(); break; default: warn$2(`Unrecognized drawing path operator: ${data[i$7 - 1]}`); break; } } return path$1; } function bindEvents(obj, element, names) { for (const name of names) { element.addEventListener(name, obj[name].bind(obj)); } } function getUrlProp(val$1) { if (val$1 instanceof URL) { return val$1.href; } if (typeof val$1 === "string") { if (isNodeJS) { return val$1; } const url = URL.parse(val$1, window.location); if (url) { return url.href; } } throw new Error("Invalid PDF url data: " + "either string or URL-object is expected in the url property."); } function getDataProp(val$1) { if (isNodeJS && typeof Buffer !== "undefined" && val$1 instanceof Buffer) { throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`."); } if (val$1 instanceof Uint8Array && val$1.byteLength === val$1.buffer.byteLength) { return val$1; } if (typeof val$1 === "string") { return stringToBytes(val$1); } if (val$1 instanceof ArrayBuffer || ArrayBuffer.isView(val$1) || typeof val$1 === "object" && !isNaN(val$1?.length)) { return new Uint8Array(val$1); } throw new Error("Invalid PDF binary data: either TypedArray, " + "string, or array-like object is expected in the data property."); } function getFactoryUrlProp(val$1) { if (typeof val$1 !== "string") { return null; } if (val$1.endsWith("/")) { return val$1; } throw new Error(`Invalid factory url: "${val$1}" must include trailing slash.`); } function onFn() {} function wrapReason(ex) { if (ex instanceof AbortException || ex instanceof InvalidPDFException || ex instanceof PasswordException || ex instanceof ResponseException || ex instanceof UnknownErrorException) { return ex; } if (!(ex instanceof Error || typeof ex === "object" && ex !== null)) { unreachable("wrapReason: Expected \"reason\" to be a (possibly cloned) Error."); } switch (ex.name) { case "AbortException": return new AbortException(ex.message); case "InvalidPDFException": return new InvalidPDFException(ex.message); case "PasswordException": return new PasswordException(ex.message, ex.code); case "ResponseException": return new ResponseException(ex.message, ex.status, ex.missing); case "UnknownErrorException": return new UnknownErrorException(ex.message, ex.details); } return new UnknownErrorException(ex.message, ex.toString()); } async function node_utils_fetchData(url) { const fs = process.getBuiltinModule("fs"); const data = await fs.promises.readFile(url); return new Uint8Array(data); } function expandBBox(array, index, minX, minY, maxX, maxY) { array[index * 4 + 0] = Math.min(array[index * 4 + 0], minX); array[index * 4 + 1] = Math.min(array[index * 4 + 1], minY); array[index * 4 + 2] = Math.max(array[index * 4 + 2], maxX); array[index * 4 + 3] = Math.max(array[index * 4 + 3], maxY); } function applyBoundingBox(ctx, bbox) { if (!bbox) { return; } const width = bbox[2] - bbox[0]; const height = bbox[3] - bbox[1]; const region = new Path2D(); region.rect(bbox[0], bbox[1], width, height); ctx.clip(region); } function drawTriangle(data, context, p1, p2, p3, c1, c2, c3) { const coords = context.coords, colors = context.colors; const bytes = data.data, rowSize = data.width * 4; let tmp; if (coords[p1 + 1] > coords[p2 + 1]) { tmp = p1; p1 = p2; p2 = tmp; tmp = c1; c1 = c2; c2 = tmp; } if (coords[p2 + 1] > coords[p3 + 1]) { tmp = p2; p2 = p3; p3 = tmp; tmp = c2; c2 = c3; c3 = tmp; } if (coords[p1 + 1] > coords[p2 + 1]) { tmp = p1; p1 = p2; p2 = tmp; tmp = c1; c1 = c2; c2 = tmp; } const x1 = (coords[p1] + context.offsetX) * context.scaleX; const y1 = (coords[p1 + 1] + context.offsetY) * context.scaleY; const x2 = (coords[p2] + context.offsetX) * context.scaleX; const y2 = (coords[p2 + 1] + context.offsetY) * context.scaleY; const x3 = (coords[p3] + context.offsetX) * context.scaleX; const y3 = (coords[p3 + 1] + context.offsetY) * context.scaleY; if (y1 >= y3) { return; } const c1r = colors[c1], c1g = colors[c1 + 1], c1b = colors[c1 + 2]; const c2r = colors[c2], c2g = colors[c2 + 1], c2b = colors[c2 + 2]; const c3r = colors[c3], c3g = colors[c3 + 1], c3b = colors[c3 + 2]; const minY = Math.round(y1), maxY = Math.round(y3); let xa, car, cag, cab; let xb, cbr, cbg, cbb; for (let y$3 = minY; y$3 <= maxY; y$3++) { if (y$3 < y2) { const k$3 = y$3 < y1 ? 0 : (y1 - y$3) / (y1 - y2); xa = x1 - (x1 - x2) * k$3; car = c1r - (c1r - c2r) * k$3; cag = c1g - (c1g - c2g) * k$3; cab = c1b - (c1b - c2b) * k$3; } else { let k$3; if (y$3 > y3) { k$3 = 1; } else if (y2 === y3) { k$3 = 0; } else { k$3 = (y2 - y$3) / (y2 - y3); } xa = x2 - (x2 - x3) * k$3; car = c2r - (c2r - c3r) * k$3; cag = c2g - (c2g - c3g) * k$3; cab = c2b - (c2b - c3b) * k$3; } let k$2; if (y$3 < y1) { k$2 = 0; } else if (y$3 > y3) { k$2 = 1; } else { k$2 = (y1 - y$3) / (y1 - y3); } xb = x1 - (x1 - x3) * k$2; cbr = c1r - (c1r - c3r) * k$2; cbg = c1g - (c1g - c3g) * k$2; cbb = c1b - (c1b - c3b) * k$2; const x1_ = Math.round(Math.min(xa, xb)); const x2_ = Math.round(Math.max(xa, xb)); let j$2 = rowSize * y$3 + x1_ * 4; for (let x$2 = x1_; x$2 <= x2_; x$2++) { k$2 = (xa - x$2) / (xa - xb); if (k$2 < 0) { k$2 = 0; } else if (k$2 > 1) { k$2 = 1; } bytes[j$2++] = car - (car - cbr) * k$2 | 0; bytes[j$2++] = cag - (cag - cbg) * k$2 | 0; bytes[j$2++] = cab - (cab - cbb) * k$2 | 0; bytes[j$2++] = 255; } } } function drawFigure(data, figure, context) { const ps = figure.coords; const cs = figure.colors; let i$7, ii; switch (figure.type) { case MeshFigureType.LATTICE: const verticesPerRow = figure.verticesPerRow; const rows = Math.floor(ps.length / verticesPerRow) - 1; const cols = verticesPerRow - 1; for (i$7 = 0; i$7 < rows; i$7++) { let q$2 = i$7 * verticesPerRow; for (let j$2 = 0; j$2 < cols; j$2++, q$2++) { drawTriangle(data, context, ps[q$2], ps[q$2 + 1], ps[q$2 + verticesPerRow], cs[q$2], cs[q$2 + 1], cs[q$2 + verticesPerRow]); drawTriangle(data, context, ps[q$2 + verticesPerRow + 1], ps[q$2 + 1], ps[q$2 + verticesPerRow], cs[q$2 + verticesPerRow + 1], cs[q$2 + 1], cs[q$2 + verticesPerRow]); } } break; case MeshFigureType.TRIANGLES: for (i$7 = 0, ii = ps.length; i$7 < ii; i$7 += 3) { drawTriangle(data, context, ps[i$7], ps[i$7 + 1], ps[i$7 + 2], cs[i$7], cs[i$7 + 1], cs[i$7 + 2]); } break; default: throw new Error("illegal figure"); } } function getShadingPattern(IR) { switch (IR[0]) { case "RadialAxial": return new RadialAxialShadingPattern(IR); case "Mesh": return new MeshShadingPattern(IR); case "Dummy": return new DummyShadingPattern(); } throw new Error(`Unknown IR type: ${IR[0]}`); } function convertToRGBA(params) { switch (params.kind) { case ImageKind.GRAYSCALE_1BPP: return convertBlackAndWhiteToRGBA(params); case ImageKind.RGB_24BPP: return convertRGBToRGBA(params); } return null; } function convertBlackAndWhiteToRGBA({ src, srcPos = 0, dest, width, height, nonBlackColor = 4294967295, inverseDecode = false }) { const black = util_FeatureTest.isLittleEndian ? 4278190080 : 255; const [zeroMapping, oneMapping] = inverseDecode ? [nonBlackColor, black] : [black, nonBlackColor]; const widthInSource = width >> 3; const widthRemainder = width & 7; const srcLength = src.length; dest = new Uint32Array(dest.buffer); let destPos = 0; for (let i$7 = 0; i$7 < height; i$7++) { for (const max = srcPos + widthInSource; srcPos < max; srcPos++) { const elem$1 = srcPos < srcLength ? src[srcPos] : 255; dest[destPos++] = elem$1 & 128 ? oneMapping : zeroMapping; dest[destPos++] = elem$1 & 64 ? oneMapping : zeroMapping; dest[destPos++] = elem$1 & 32 ? oneMapping : zeroMapping; dest[destPos++] = elem$1 & 16 ? oneMapping : zeroMapping; dest[destPos++] = elem$1 & 8 ? oneMapping : zeroMapping; dest[destPos++] = elem$1 & 4 ? oneMapping : zeroMapping; dest[destPos++] = elem$1 & 2 ? oneMapping : zeroMapping; dest[destPos++] = elem$1 & 1 ? oneMapping : zeroMapping; } if (widthRemainder === 0) { continue; } const elem = srcPos < srcLength ? src[srcPos++] : 255; for (let j$2 = 0; j$2 < widthRemainder; j$2++) { dest[destPos++] = elem & 1 << 7 - j$2 ? oneMapping : zeroMapping; } } return { srcPos, destPos }; } function convertRGBToRGBA({ src, srcPos = 0, dest, destPos = 0, width, height }) { let i$7 = 0; const len = width * height * 3; const len32 = len >> 2; const src32 = new Uint32Array(src.buffer, srcPos, len32); if (FeatureTest.isLittleEndian) { for (; i$7 < len32 - 2; i$7 += 3, destPos += 4) { const s1 = src32[i$7]; const s2 = src32[i$7 + 1]; const s3 = src32[i$7 + 2]; dest[destPos] = s1 | 4278190080; dest[destPos + 1] = s1 >>> 24 | s2 << 8 | 4278190080; dest[destPos + 2] = s2 >>> 16 | s3 << 16 | 4278190080; dest[destPos + 3] = s3 >>> 8 | 4278190080; } for (let j$2 = i$7 * 4, jj = srcPos + len; j$2 < jj; j$2 += 3) { dest[destPos++] = src[j$2] | src[j$2 + 1] << 8 | src[j$2 + 2] << 16 | 4278190080; } } else { for (; i$7 < len32 - 2; i$7 += 3, destPos += 4) { const s1 = src32[i$7]; const s2 = src32[i$7 + 1]; const s3 = src32[i$7 + 2]; dest[destPos] = s1 | 255; dest[destPos + 1] = s1 << 24 | s2 >>> 8 | 255; dest[destPos + 2] = s2 << 16 | s3 >>> 16 | 255; dest[destPos + 3] = s3 << 8 | 255; } for (let j$2 = i$7 * 4, jj = srcPos + len; j$2 < jj; j$2 += 3) { dest[destPos++] = src[j$2] << 24 | src[j$2 + 1] << 16 | src[j$2 + 2] << 8 | 255; } } return { srcPos: srcPos + len, destPos }; } function grayToRGBA(src, dest) { if (FeatureTest.isLittleEndian) { for (let i$7 = 0, ii = src.length; i$7 < ii; i$7++) { dest[i$7] = src[i$7] * 65793 | 4278190080; } } else { for (let i$7 = 0, ii = src.length; i$7 < ii; i$7++) { dest[i$7] = src[i$7] * 16843008 | 255; } } } function mirrorContextOperations(ctx, destCtx) { if (ctx._removeMirroring) { throw new Error("Context is already forwarding operations."); } ctx.__originalSave = ctx.save; ctx.__originalRestore = ctx.restore; ctx.__originalRotate = ctx.rotate; ctx.__originalScale = ctx.scale; ctx.__originalTranslate = ctx.translate; ctx.__originalTransform = ctx.transform; ctx.__originalSetTransform = ctx.setTransform; ctx.__originalResetTransform = ctx.resetTransform; ctx.__originalClip = ctx.clip; ctx.__originalMoveTo = ctx.moveTo; ctx.__originalLineTo = ctx.lineTo; ctx.__originalBezierCurveTo = ctx.bezierCurveTo; ctx.__originalRect = ctx.rect; ctx.__originalClosePath = ctx.closePath; ctx.__originalBeginPath = ctx.beginPath; ctx._removeMirroring = () => { ctx.save = ctx.__originalSave; ctx.restore = ctx.__originalRestore; ctx.rotate = ctx.__originalRotate; ctx.scale = ctx.__originalScale; ctx.translate = ctx.__originalTranslate; ctx.transform = ctx.__originalTransform; ctx.setTransform = ctx.__originalSetTransform; ctx.resetTransform = ctx.__originalResetTransform; ctx.clip = ctx.__originalClip; ctx.moveTo = ctx.__originalMoveTo; ctx.lineTo = ctx.__originalLineTo; ctx.bezierCurveTo = ctx.__originalBezierCurveTo; ctx.rect = ctx.__originalRect; ctx.closePath = ctx.__originalClosePath; ctx.beginPath = ctx.__originalBeginPath; delete ctx._removeMirroring; }; ctx.save = function() { destCtx.save(); this.__originalSave(); }; ctx.restore = function() { destCtx.restore(); this.__originalRestore(); }; ctx.translate = function(x$2, y$3) { destCtx.translate(x$2, y$3); this.__originalTranslate(x$2, y$3); }; ctx.scale = function(x$2, y$3) { destCtx.scale(x$2, y$3); this.__originalScale(x$2, y$3); }; ctx.transform = function(a$2, b$3, c$7, d$5, e$10, f$4) { destCtx.transform(a$2, b$3, c$7, d$5, e$10, f$4); this.__originalTransform(a$2, b$3, c$7, d$5, e$10, f$4); }; ctx.setTransform = function(a$2, b$3, c$7, d$5, e$10, f$4) { destCtx.setTransform(a$2, b$3, c$7, d$5, e$10, f$4); this.__originalSetTransform(a$2, b$3, c$7, d$5, e$10, f$4); }; ctx.resetTransform = function() { destCtx.resetTransform(); this.__originalResetTransform(); }; ctx.rotate = function(angle) { destCtx.rotate(angle); this.__originalRotate(angle); }; ctx.clip = function(rule) { destCtx.clip(rule); this.__originalClip(rule); }; ctx.moveTo = function(x$2, y$3) { destCtx.moveTo(x$2, y$3); this.__originalMoveTo(x$2, y$3); }; ctx.lineTo = function(x$2, y$3) { destCtx.lineTo(x$2, y$3); this.__originalLineTo(x$2, y$3); }; ctx.bezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x$2, y$3) { destCtx.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x$2, y$3); this.__originalBezierCurveTo(cp1x, cp1y, cp2x, cp2y, x$2, y$3); }; ctx.rect = function(x$2, y$3, width, height) { destCtx.rect(x$2, y$3, width, height); this.__originalRect(x$2, y$3, width, height); }; ctx.closePath = function() { destCtx.closePath(); this.__originalClosePath(); }; ctx.beginPath = function() { destCtx.beginPath(); this.__originalBeginPath(); }; } function drawImageAtIntegerCoords(ctx, srcImg, srcX, srcY, srcW, srcH, destX, destY, destW, destH) { const [a$2, b$3, c$7, d$5, tx, ty] = getCurrentTransform(ctx); if (b$3 === 0 && c$7 === 0) { const tlX = destX * a$2 + tx; const rTlX = Math.round(tlX); const tlY = destY * d$5 + ty; const rTlY = Math.round(tlY); const brX = (destX + destW) * a$2 + tx; const rWidth = Math.abs(Math.round(brX) - rTlX) || 1; const brY = (destY + destH) * d$5 + ty; const rHeight = Math.abs(Math.round(brY) - rTlY) || 1; ctx.setTransform(Math.sign(a$2), 0, 0, Math.sign(d$5), rTlX, rTlY); ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, 0, 0, rWidth, rHeight); ctx.setTransform(a$2, b$3, c$7, d$5, tx, ty); return [rWidth, rHeight]; } if (a$2 === 0 && d$5 === 0) { const tlX = destY * c$7 + tx; const rTlX = Math.round(tlX); const tlY = destX * b$3 + ty; const rTlY = Math.round(tlY); const brX = (destY + destH) * c$7 + tx; const rWidth = Math.abs(Math.round(brX) - rTlX) || 1; const brY = (destX + destW) * b$3 + ty; const rHeight = Math.abs(Math.round(brY) - rTlY) || 1; ctx.setTransform(0, Math.sign(b$3), Math.sign(c$7), 0, rTlX, rTlY); ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, 0, 0, rHeight, rWidth); ctx.setTransform(a$2, b$3, c$7, d$5, tx, ty); return [rHeight, rWidth]; } ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, destX, destY, destW, destH); const scaleX = Math.hypot(a$2, b$3); const scaleY = Math.hypot(c$7, d$5); return [scaleX * destW, scaleY * destH]; } function putBinaryImageData(ctx, imgData) { if (imgData instanceof ImageData) { ctx.putImageData(imgData, 0, 0); return; } const height = imgData.height, width = imgData.width; const partialChunkHeight = height % FULL_CHUNK_HEIGHT; const fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT; const totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1; const chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT); let srcPos = 0, destPos; const src = imgData.data; const dest = chunkImgData.data; let i$7, j$2, thisChunkHeight, elemsInThisChunk; if (imgData.kind === util_ImageKind.GRAYSCALE_1BPP) { const srcLength = src.byteLength; const dest32 = new Uint32Array(dest.buffer, 0, dest.byteLength >> 2); const dest32DataLength = dest32.length; const fullSrcDiff = width + 7 >> 3; const white = 4294967295; const black = util_FeatureTest.isLittleEndian ? 4278190080 : 255; for (i$7 = 0; i$7 < totalChunks; i$7++) { thisChunkHeight = i$7 < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight; destPos = 0; for (j$2 = 0; j$2 < thisChunkHeight; j$2++) { const srcDiff = srcLength - srcPos; let k$2 = 0; const kEnd = srcDiff > fullSrcDiff ? width : srcDiff * 8 - 7; const kEndUnrolled = kEnd & ~7; let mask = 0; let srcByte = 0; for (; k$2 < kEndUnrolled; k$2 += 8) { srcByte = src[srcPos++]; dest32[destPos++] = srcByte & 128 ? white : black; dest32[destPos++] = srcByte & 64 ? white : black; dest32[destPos++] = srcByte & 32 ? white : black; dest32[destPos++] = srcByte & 16 ? white : black; dest32[destPos++] = srcByte & 8 ? white : black; dest32[destPos++] = srcByte & 4 ? white : black; dest32[destPos++] = srcByte & 2 ? white : black; dest32[destPos++] = srcByte & 1 ? white : black; } for (; k$2 < kEnd; k$2++) { if (mask === 0) { srcByte = src[srcPos++]; mask = 128; } dest32[destPos++] = srcByte & mask ? white : black; mask >>= 1; } } while (destPos < dest32DataLength) { dest32[destPos++] = 0; } ctx.putImageData(chunkImgData, 0, i$7 * FULL_CHUNK_HEIGHT); } } else if (imgData.kind === util_ImageKind.RGBA_32BPP) { j$2 = 0; elemsInThisChunk = width * FULL_CHUNK_HEIGHT * 4; for (i$7 = 0; i$7 < fullChunks; i$7++) { dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk)); srcPos += elemsInThisChunk; ctx.putImageData(chunkImgData, 0, j$2); j$2 += FULL_CHUNK_HEIGHT; } if (i$7 < totalChunks) { elemsInThisChunk = width * partialChunkHeight * 4; dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk)); ctx.putImageData(chunkImgData, 0, j$2); } } else if (imgData.kind === util_ImageKind.RGB_24BPP) { thisChunkHeight = FULL_CHUNK_HEIGHT; elemsInThisChunk = width * thisChunkHeight; for (i$7 = 0; i$7 < totalChunks; i$7++) { if (i$7 >= fullChunks) { thisChunkHeight = partialChunkHeight; elemsInThisChunk = width * thisChunkHeight; } destPos = 0; for (j$2 = elemsInThisChunk; j$2--;) { dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++]; dest[destPos++] = 255; } ctx.putImageData(chunkImgData, 0, i$7 * FULL_CHUNK_HEIGHT); } } else { throw new Error(`bad image kind: ${imgData.kind}`); } } function putBinaryImageMask(ctx, imgData) { if (imgData.bitmap) { ctx.drawImage(imgData.bitmap, 0, 0); return; } const height = imgData.height, width = imgData.width; const partialChunkHeight = height % FULL_CHUNK_HEIGHT; const fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT; const totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1; const chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT); let srcPos = 0; const src = imgData.data; const dest = chunkImgData.data; for (let i$7 = 0; i$7 < totalChunks; i$7++) { const thisChunkHeight = i$7 < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight; ({srcPos} = convertBlackAndWhiteToRGBA({ src, srcPos, dest, width, height: thisChunkHeight, nonBlackColor: 0 })); ctx.putImageData(chunkImgData, 0, i$7 * FULL_CHUNK_HEIGHT); } } function copyCtxState(sourceCtx, destCtx) { const properties$1 = [ "strokeStyle", "fillStyle", "fillRule", "globalAlpha", "lineWidth", "lineCap", "lineJoin", "miterLimit", "globalCompositeOperation", "font", "filter" ]; for (const property of properties$1) { if (sourceCtx[property] !== undefined) { destCtx[property] = sourceCtx[property]; } } if (sourceCtx.setLineDash !== undefined) { destCtx.setLineDash(sourceCtx.getLineDash()); destCtx.lineDashOffset = sourceCtx.lineDashOffset; } } function resetCtxToDefault(ctx) { ctx.strokeStyle = ctx.fillStyle = "#000000"; ctx.fillRule = "nonzero"; ctx.globalAlpha = 1; ctx.lineWidth = 1; ctx.lineCap = "butt"; ctx.lineJoin = "miter"; ctx.miterLimit = 10; ctx.globalCompositeOperation = "source-over"; ctx.font = "10px sans-serif"; if (ctx.setLineDash !== undefined) { ctx.setLineDash([]); ctx.lineDashOffset = 0; } const { filter } = ctx; if (filter !== "none" && filter !== "") { ctx.filter = "none"; } } function getImageSmoothingEnabled(transform, interpolate) { if (interpolate) { return true; } Util.singularValueDecompose2dScale(transform, XY); const actualScale = Math.fround(OutputScale.pixelRatio * PixelsPerInch.PDF_TO_CSS_UNITS); return XY[0] <= actualScale && XY[1] <= actualScale; } function getFilenameFromContentDispositionHeader(contentDisposition) { let needsEncodingFixup = true; let tmp = toParamRegExp("filename\\*", "i").exec(contentDisposition); if (tmp) { tmp = tmp[1]; let filename = rfc2616unquote(tmp); filename = unescape(filename); filename = rfc5987decode(filename); filename = rfc2047decode(filename); return fixupEncoding(filename); } tmp = rfc2231getparam(contentDisposition); if (tmp) { const filename = rfc2047decode(tmp); return fixupEncoding(filename); } tmp = toParamRegExp("filename", "i").exec(contentDisposition); if (tmp) { tmp = tmp[1]; let filename = rfc2616unquote(tmp); filename = rfc2047decode(filename); return fixupEncoding(filename); } function toParamRegExp(attributePattern, flags) { return new RegExp("(?:^|;)\\s*" + attributePattern + "\\s*=\\s*" + "(" + "[^\";\\s][^;\\s]*" + "|" + "\"(?:[^\"\\\\]|\\\\\"?)+\"?" + ")", flags); } function textdecode(encoding, value) { if (encoding) { if (!/^[\x00-\xFF]+$/.test(value)) { return value; } try { const decoder = new TextDecoder(encoding, { fatal: true }); const buffer = stringToBytes(value); value = decoder.decode(buffer); needsEncodingFixup = false; } catch {} } return value; } function fixupEncoding(value) { if (needsEncodingFixup && /[\x80-\xff]/.test(value)) { value = textdecode("utf-8", value); if (needsEncodingFixup) { value = textdecode("iso-8859-1", value); } } return value; } function rfc2231getparam(contentDispositionStr) { const matches = []; let match; const iter = toParamRegExp("filename\\*((?!0\\d)\\d+)(\\*?)", "ig"); while ((match = iter.exec(contentDispositionStr)) !== null) { let [, n$9, quot, part] = match; n$9 = parseInt(n$9, 10); if (n$9 in matches) { if (n$9 === 0) { break; } continue; } matches[n$9] = [quot, part]; } const parts = []; for (let n$9 = 0; n$9 < matches.length; ++n$9) { if (!(n$9 in matches)) { break; } let [quot, part] = matches[n$9]; part = rfc2616unquote(part); if (quot) { part = unescape(part); if (n$9 === 0) { part = rfc5987decode(part); } } parts.push(part); } return parts.join(""); } function rfc2616unquote(value) { if (value.startsWith("\"")) { const parts = value.slice(1).split("\\\""); for (let i$7 = 0; i$7 < parts.length; ++i$7) { const quotindex = parts[i$7].indexOf("\""); if (quotindex !== -1) { parts[i$7] = parts[i$7].slice(0, quotindex); parts.length = i$7 + 1; } parts[i$7] = parts[i$7].replaceAll(/\\(.)/g, "$1"); } value = parts.join("\""); } return value; } function rfc5987decode(extvalue) { const encodingend = extvalue.indexOf("'"); if (encodingend === -1) { return extvalue; } const encoding = extvalue.slice(0, encodingend); const langvalue = extvalue.slice(encodingend + 1); const value = langvalue.replace(/^[^']*'/, ""); return textdecode(encoding, value); } function rfc2047decode(value) { if (!value.startsWith("=?") || /[\x00-\x19\x80-\xff]/.test(value)) { return value; } return value.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g, function(matches, charset, encoding, text$2) { if (encoding === "q" || encoding === "Q") { text$2 = text$2.replaceAll("_", " "); text$2 = text$2.replaceAll(/=([0-9a-fA-F]{2})/g, function(match, hex) { return String.fromCharCode(parseInt(hex, 16)); }); return textdecode(charset, text$2); } try { text$2 = atob(text$2); } catch {} return textdecode(charset, text$2); }); } return ""; } function createHeaders(isHttp, httpHeaders) { const headers = new Headers(); if (!isHttp || !httpHeaders || typeof httpHeaders !== "object") { return headers; } for (const key in httpHeaders) { const val$1 = httpHeaders[key]; if (val$1 !== undefined) { headers.append(key, val$1); } } return headers; } function getResponseOrigin(url) { return URL.parse(url)?.origin ?? null; } function validateRangeRequestCapabilities({ responseHeaders, isHttp, rangeChunkSize, disableRange }) { const returnValues = { allowRangeRequests: false, suggestedLength: undefined }; const length = parseInt(responseHeaders.get("Content-Length"), 10); if (!Number.isInteger(length)) { return returnValues; } returnValues.suggestedLength = length; if (length <= 2 * rangeChunkSize) { return returnValues; } if (disableRange || !isHttp) { return returnValues; } if (responseHeaders.get("Accept-Ranges") !== "bytes") { return returnValues; } const contentEncoding = responseHeaders.get("Content-Encoding") || "identity"; if (contentEncoding !== "identity") { return returnValues; } returnValues.allowRangeRequests = true; return returnValues; } function extractFilenameFromHeader(responseHeaders) { const contentDisposition = responseHeaders.get("Content-Disposition"); if (contentDisposition) { let filename = getFilenameFromContentDispositionHeader(contentDisposition); if (filename.includes("%")) { try { filename = decodeURIComponent(filename); } catch {} } if (isPdfFile(filename)) { return filename; } } return null; } function createResponseError(status, url) { return new ResponseException(`Unexpected server response (${status}) while retrieving PDF "${url}".`, status, status === 404 || status === 0 && url.startsWith("file:")); } function validateResponseStatus(status) { return status === 200 || status === 206; } function createFetchOptions(headers, withCredentials, abortController) { return { method: "GET", headers, signal: abortController.signal, mode: "cors", credentials: withCredentials ? "include" : "same-origin", redirect: "follow" }; } function getArrayBuffer(val$1) { if (val$1 instanceof Uint8Array) { return val$1.buffer; } if (val$1 instanceof ArrayBuffer) { return val$1; } warn$2(`getArrayBuffer - unexpected data format: ${val$1}`); return new Uint8Array(val$1).buffer; } function network_getArrayBuffer(xhr) { const data = xhr.response; if (typeof data !== "string") { return data; } return stringToBytes(data).buffer; } function parseUrlOrPath(sourceUrl) { if (urlRegex.test(sourceUrl)) { return new URL(sourceUrl); } const url = process.getBuiltinModule("url"); return new URL(url.pathToFileURL(sourceUrl)); } function getDocument(src = {}) { if (typeof src === "string" || src instanceof URL) { src = { url: src }; } else if (src instanceof ArrayBuffer || ArrayBuffer.isView(src)) { src = { data: src }; } const task = new PDFDocumentLoadingTask(); const { docId } = task; const url = src.url ? getUrlProp(src.url) : null; const data = src.data ? getDataProp(src.data) : null; const httpHeaders = src.httpHeaders || null; const withCredentials = src.withCredentials === true; const password = src.password ?? null; const rangeTransport = src.range instanceof PDFDataRangeTransport ? src.range : null; const rangeChunkSize = Number.isInteger(src.rangeChunkSize) && src.rangeChunkSize > 0 ? src.rangeChunkSize : 2 ** 16; let worker = src.worker instanceof PDFWorker ? src.worker : null; const verbosity$1 = src.verbosity; const docBaseUrl = typeof src.docBaseUrl === "string" && !isDataScheme(src.docBaseUrl) ? src.docBaseUrl : null; const cMapUrl = getFactoryUrlProp(src.cMapUrl); const cMapPacked = src.cMapPacked !== false; const CMapReaderFactory = src.CMapReaderFactory || (isNodeJS ? NodeCMapReaderFactory : DOMCMapReaderFactory); const iccUrl = getFactoryUrlProp(src.iccUrl); const standardFontDataUrl = getFactoryUrlProp(src.standardFontDataUrl); const StandardFontDataFactory = src.StandardFontDataFactory || (isNodeJS ? NodeStandardFontDataFactory : DOMStandardFontDataFactory); const wasmUrl = getFactoryUrlProp(src.wasmUrl); const WasmFactory = src.WasmFactory || (isNodeJS ? NodeWasmFactory : DOMWasmFactory); const ignoreErrors = src.stopAtErrors !== true; const maxImageSize = Number.isInteger(src.maxImageSize) && src.maxImageSize > -1 ? src.maxImageSize : -1; const isEvalSupported$1 = src.isEvalSupported !== false; const isOffscreenCanvasSupported = typeof src.isOffscreenCanvasSupported === "boolean" ? src.isOffscreenCanvasSupported : !isNodeJS; const isImageDecoderSupported = typeof src.isImageDecoderSupported === "boolean" ? src.isImageDecoderSupported : !isNodeJS && (util_FeatureTest.platform.isFirefox || !globalThis.chrome); const canvasMaxAreaInBytes = Number.isInteger(src.canvasMaxAreaInBytes) ? src.canvasMaxAreaInBytes : -1; const disableFontFace = typeof src.disableFontFace === "boolean" ? src.disableFontFace : isNodeJS; const fontExtraProperties = src.fontExtraProperties === true; const enableXfa = src.enableXfa === true; const ownerDocument = src.ownerDocument || globalThis.document; const disableRange = src.disableRange === true; const disableStream = src.disableStream === true; const disableAutoFetch = src.disableAutoFetch === true; const pdfBug = src.pdfBug === true; const CanvasFactory = src.CanvasFactory || (isNodeJS ? NodeCanvasFactory : DOMCanvasFactory); const FilterFactory = src.FilterFactory || (isNodeJS ? NodeFilterFactory : DOMFilterFactory); const enableHWA = src.enableHWA === true; const useWasm = src.useWasm !== false; const length = rangeTransport ? rangeTransport.length : src.length ?? NaN; const useSystemFonts = typeof src.useSystemFonts === "boolean" ? src.useSystemFonts : !isNodeJS && !disableFontFace; const useWorkerFetch = typeof src.useWorkerFetch === "boolean" ? src.useWorkerFetch : !!(CMapReaderFactory === DOMCMapReaderFactory && StandardFontDataFactory === DOMStandardFontDataFactory && WasmFactory === DOMWasmFactory && cMapUrl && standardFontDataUrl && wasmUrl && isValidFetchUrl(cMapUrl, document.baseURI) && isValidFetchUrl(standardFontDataUrl, document.baseURI) && isValidFetchUrl(wasmUrl, document.baseURI)); const styleElement = null; setVerbosityLevel(verbosity$1); const transportFactory = { canvasFactory: new CanvasFactory({ ownerDocument, enableHWA }), filterFactory: new FilterFactory({ docId, ownerDocument }), cMapReaderFactory: useWorkerFetch ? null : new CMapReaderFactory({ baseUrl: cMapUrl, isCompressed: cMapPacked }), standardFontDataFactory: useWorkerFetch ? null : new StandardFontDataFactory({ baseUrl: standardFontDataUrl }), wasmFactory: useWorkerFetch ? null : new WasmFactory({ baseUrl: wasmUrl }) }; if (!worker) { worker = PDFWorker.create({ verbosity: verbosity$1, port: GlobalWorkerOptions.workerPort }); task._worker = worker; } const docParams = { docId, apiVersion: "5.4.394", data, password, disableAutoFetch, rangeChunkSize, length, docBaseUrl, enableXfa, evaluatorOptions: { maxImageSize, disableFontFace, ignoreErrors, isEvalSupported: isEvalSupported$1, isOffscreenCanvasSupported, isImageDecoderSupported, canvasMaxAreaInBytes, fontExtraProperties, useSystemFonts, useWasm, useWorkerFetch, cMapUrl, iccUrl, standardFontDataUrl, wasmUrl } }; const transportParams = { ownerDocument, pdfBug, styleElement, loadingParams: { disableAutoFetch, enableXfa } }; worker.promise.then(function() { if (task.destroyed) { throw new Error("Loading aborted"); } if (worker.destroyed) { throw new Error("Worker was destroyed"); } const workerIdPromise = worker.messageHandler.sendWithPromise("GetDocRequest", docParams, data ? [data.buffer] : null); let networkStream; if (rangeTransport) { networkStream = new PDFDataTransportStream(rangeTransport, { disableRange, disableStream }); } else if (!data) { if (!url) { throw new Error("getDocument - no `url` parameter provided."); } const NetworkStream = isValidFetchUrl(url) ? PDFFetchStream : isNodeJS ? PDFNodeStream : PDFNetworkStream; networkStream = new NetworkStream({ url, length, httpHeaders, withCredentials, rangeChunkSize, disableRange, disableStream }); } return workerIdPromise.then((workerId) => { if (task.destroyed) { throw new Error("Loading aborted"); } if (worker.destroyed) { throw new Error("Worker was destroyed"); } const messageHandler = new MessageHandler(docId, workerId, worker.port); const transport = new WorkerTransport(messageHandler, task, networkStream, transportParams, transportFactory, enableHWA); task._transport = transport; messageHandler.send("Ready", null); }); }).catch(task._capability.reject); return task; } function makeColorComp(n$9) { return Math.floor(Math.max(0, Math.min(1, n$9)) * 255).toString(16).padStart(2, "0"); } function scaleAndClamp(x$2) { return Math.max(0, Math.min(255, 255 * x$2)); } var __webpack_require__, __webpack_exports__, isNodeJS, FONT_IDENTITY_MATRIX, LINE_FACTOR, LINE_DESCENT_FACTOR, BASELINE_FACTOR, RenderingIntentFlag, AnnotationMode, AnnotationEditorPrefix, AnnotationEditorType, AnnotationEditorParamsType, PermissionFlag, MeshFigureType, TextRenderingMode, util_ImageKind, AnnotationType, AnnotationReplyType, AnnotationFlag, AnnotationFieldFlag, AnnotationBorderStyleType, AnnotationActionEventType, DocumentActionEventType, PageActionEventType, VerbosityLevel, OPS, DrawOPS, PasswordResponses, verbosity, BaseException, PasswordException, UnknownErrorException, InvalidPDFException, ResponseException, FormatError, AbortException, util_FeatureTest, hexNumbers, Util, PDFStringTranslateTable, NormalizeRegex, NormalizationMap, AnnotationPrefix, XfaText, XfaLayer, SVG_NS, PixelsPerInch, PageViewport, RenderingCancelledException, StatTimer, PDFDateString, OutputScale, SupportedImageMimeTypes, ColorScheme, CSSConstants, contrastCache, EditorToolbar, FloatingToolbar, CurrentPointers, IdManager, ImageManager, CommandManager, KeyboardManager, ColorManager, AnnotationEditorUIManager, AltText, Comment, TouchManager, AnnotationEditor, FakeEditor, SEED, MASK_HIGH, MASK_LOW, MurmurHash3_64, SerializableEmpty, AnnotationStorage, PrintAnnotationStorage, FontLoader, FontFaceObject, CssFontInfo, SystemFontInfo, FontInfo, PatternInfo, isRefProxy, isNameProxy, isValidExplicitDest, LoopbackPort, CallbackKind, StreamKind, MessageHandler, BaseCanvasFactory, DOMCanvasFactory, BaseCMapReaderFactory, DOMCMapReaderFactory, BaseFilterFactory, DOMFilterFactory, BaseStandardFontDataFactory, DOMStandardFontDataFactory, BaseWasmFactory, DOMWasmFactory, NodeFilterFactory, NodeCanvasFactory, NodeCMapReaderFactory, NodeStandardFontDataFactory, NodeWasmFactory, FORCED_DEPENDENCY_LABEL, floor, ceil, EMPTY_BBOX, BBoxReader, ensureDebugMetadata, CanvasDependencyTracker, CanvasNestedDependencyTracker, Dependencies, PathType, BaseShadingPattern, RadialAxialShadingPattern, MeshShadingPattern, DummyShadingPattern, PaintType, TilingPattern, MIN_FONT_SIZE, MAX_FONT_SIZE, EXECUTION_TIME, EXECUTION_STEPS, FULL_CHUNK_HEIGHT, SCALE_MATRIX, XY, MIN_MAX_INIT, CachedCanvases, CanvasExtraState, LINE_CAP_STYLES, LINE_JOIN_STYLES, NORMAL_CLIP, EO_CLIP, CanvasGraphics, GlobalWorkerOptions, Metadata, INTERNAL, OptionalContentGroup, OptionalContentConfig, PDFDataTransportStream, PDFDataTransportStreamReader, PDFDataTransportStreamRangeReader, PDFFetchStream, PDFFetchStreamReader, PDFFetchStreamRangeReader, OK_RESPONSE, PARTIAL_CONTENT_RESPONSE, NetworkManager, PDFNetworkStream, PDFNetworkStreamFullRequestReader, PDFNetworkStreamRangeRequestReader, urlRegex, PDFNodeStream, PDFNodeStreamFsFullReader, PDFNodeStreamFsRangeReader, INITIAL_DATA, PDFObjects, MAX_TEXT_DIVS_TO_RENDER, DEFAULT_FONT_SIZE, TextLayer, RENDERING_CANCELLED_TIMEOUT, PDFDocumentLoadingTask, PDFDataRangeTransport, PDFDocumentProxy, PDFPageProxy, PDFWorker, WorkerTransport, RenderTask, InternalRenderTask, version$4, build, ColorPicker, BasicColorPicker, ColorConverters, DateFormats, TimeFormats, BaseSVGFactory, DOMSVGFactory, annotation_layer_DEFAULT_FONT_SIZE, GetElementsByNameSet, TIMEZONE_OFFSET, AnnotationElementFactory, AnnotationElement, EditorAnnotationElement, LinkAnnotationElement, TextAnnotationElement, WidgetAnnotationElement, TextWidgetAnnotationElement, SignatureWidgetAnnotationElement, CheckboxWidgetAnnotationElement, RadioButtonWidgetAnnotationElement, PushButtonWidgetAnnotationElement, ChoiceWidgetAnnotationElement, PopupAnnotationElement, PopupElement, FreeTextAnnotationElement, LineAnnotationElement, SquareAnnotationElement, CircleAnnotationElement, PolylineAnnotationElement, PolygonAnnotationElement, CaretAnnotationElement, InkAnnotationElement, HighlightAnnotationElement, UnderlineAnnotationElement, SquigglyAnnotationElement, StrikeOutAnnotationElement, StampAnnotationElement, FileAttachmentAnnotationElement, AnnotationLayer, EOL_PATTERN, FreeTextEditor, Outline, FreeDrawOutliner, FreeDrawOutline, HighlightOutliner, HighlightOutline, FreeHighlightOutliner, FreeHighlightOutline, HighlightEditor, DrawingOptions, DrawingEditor, InkDrawOutliner, InkDrawOutline, InkDrawingOptions, InkEditor, ContourDrawOutline, BASE_HEADER_LENGTH, POINTS_PROPERTIES_NUMBER, SignatureExtractor, SignatureOptions, DrawnSignatureOptions, SignatureEditor, StampEditor, AnnotationEditorLayer, DrawLayer; var init_pdf = __esmMin((() => { __webpack_require__ = {}; (() => { __webpack_require__.d = (exports$1, definition) => { for (var key in definition) { if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports$1, key)) { Object.defineProperty(exports$1, key, { enumerable: true, get: definition[key] }); } } }; })(); (() => { __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop); })(); __webpack_exports__ = {}; ; isNodeJS = typeof process === "object" && process + "" === "[object process]" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== "browser"); FONT_IDENTITY_MATRIX = [ .001, 0, 0, .001, 0, 0 ]; LINE_FACTOR = 1.35; LINE_DESCENT_FACTOR = .35; BASELINE_FACTOR = LINE_DESCENT_FACTOR / LINE_FACTOR; RenderingIntentFlag = { ANY: 1, DISPLAY: 2, PRINT: 4, SAVE: 8, ANNOTATIONS_FORMS: 16, ANNOTATIONS_STORAGE: 32, ANNOTATIONS_DISABLE: 64, IS_EDITING: 128, OPLIST: 256 }; AnnotationMode = { DISABLE: 0, ENABLE: 1, ENABLE_FORMS: 2, ENABLE_STORAGE: 3 }; AnnotationEditorPrefix = "pdfjs_internal_editor_"; AnnotationEditorType = { DISABLE: -1, NONE: 0, FREETEXT: 3, HIGHLIGHT: 9, STAMP: 13, INK: 15, POPUP: 16, SIGNATURE: 101, COMMENT: 102 }; AnnotationEditorParamsType = { RESIZE: 1, CREATE: 2, FREETEXT_SIZE: 11, FREETEXT_COLOR: 12, FREETEXT_OPACITY: 13, INK_COLOR: 21, INK_THICKNESS: 22, INK_OPACITY: 23, HIGHLIGHT_COLOR: 31, HIGHLIGHT_THICKNESS: 32, HIGHLIGHT_FREE: 33, HIGHLIGHT_SHOW_ALL: 34, DRAW_STEP: 41 }; PermissionFlag = { PRINT: 4, MODIFY_CONTENTS: 8, COPY: 16, MODIFY_ANNOTATIONS: 32, FILL_INTERACTIVE_FORMS: 256, COPY_FOR_ACCESSIBILITY: 512, ASSEMBLE: 1024, PRINT_HIGH_QUALITY: 2048 }; MeshFigureType = { TRIANGLES: 1, LATTICE: 2, PATCH: 3 }; TextRenderingMode = { FILL: 0, STROKE: 1, FILL_STROKE: 2, INVISIBLE: 3, FILL_ADD_TO_PATH: 4, STROKE_ADD_TO_PATH: 5, FILL_STROKE_ADD_TO_PATH: 6, ADD_TO_PATH: 7, FILL_STROKE_MASK: 3, ADD_TO_PATH_FLAG: 4 }; util_ImageKind = { GRAYSCALE_1BPP: 1, RGB_24BPP: 2, RGBA_32BPP: 3 }; AnnotationType = { TEXT: 1, LINK: 2, FREETEXT: 3, LINE: 4, SQUARE: 5, CIRCLE: 6, POLYGON: 7, POLYLINE: 8, HIGHLIGHT: 9, UNDERLINE: 10, SQUIGGLY: 11, STRIKEOUT: 12, STAMP: 13, CARET: 14, INK: 15, POPUP: 16, FILEATTACHMENT: 17, SOUND: 18, MOVIE: 19, WIDGET: 20, SCREEN: 21, PRINTERMARK: 22, TRAPNET: 23, WATERMARK: 24, THREED: 25, REDACT: 26 }; AnnotationReplyType = { GROUP: "Group", REPLY: "R" }; AnnotationFlag = { INVISIBLE: 1, HIDDEN: 2, PRINT: 4, NOZOOM: 8, NOROTATE: 16, NOVIEW: 32, READONLY: 64, LOCKED: 128, TOGGLENOVIEW: 256, LOCKEDCONTENTS: 512 }; AnnotationFieldFlag = { READONLY: 1, REQUIRED: 2, NOEXPORT: 4, MULTILINE: 4096, PASSWORD: 8192, NOTOGGLETOOFF: 16384, RADIO: 32768, PUSHBUTTON: 65536, COMBO: 131072, EDIT: 262144, SORT: 524288, FILESELECT: 1048576, MULTISELECT: 2097152, DONOTSPELLCHECK: 4194304, DONOTSCROLL: 8388608, COMB: 16777216, RICHTEXT: 33554432, RADIOSINUNISON: 33554432, COMMITONSELCHANGE: 67108864 }; AnnotationBorderStyleType = { SOLID: 1, DASHED: 2, BEVELED: 3, INSET: 4, UNDERLINE: 5 }; AnnotationActionEventType = { E: "Mouse Enter", X: "Mouse Exit", D: "Mouse Down", U: "Mouse Up", Fo: "Focus", Bl: "Blur", PO: "PageOpen", PC: "PageClose", PV: "PageVisible", PI: "PageInvisible", K: "Keystroke", F: "Format", V: "Validate", C: "Calculate" }; DocumentActionEventType = { WC: "WillClose", WS: "WillSave", DS: "DidSave", WP: "WillPrint", DP: "DidPrint" }; PageActionEventType = { O: "PageOpen", C: "PageClose" }; VerbosityLevel = { ERRORS: 0, WARNINGS: 1, INFOS: 5 }; OPS = { dependency: 1, setLineWidth: 2, setLineCap: 3, setLineJoin: 4, setMiterLimit: 5, setDash: 6, setRenderingIntent: 7, setFlatness: 8, setGState: 9, save: 10, restore: 11, transform: 12, moveTo: 13, lineTo: 14, curveTo: 15, curveTo2: 16, curveTo3: 17, closePath: 18, rectangle: 19, stroke: 20, closeStroke: 21, fill: 22, eoFill: 23, fillStroke: 24, eoFillStroke: 25, closeFillStroke: 26, closeEOFillStroke: 27, endPath: 28, clip: 29, eoClip: 30, beginText: 31, endText: 32, setCharSpacing: 33, setWordSpacing: 34, setHScale: 35, setLeading: 36, setFont: 37, setTextRenderingMode: 38, setTextRise: 39, moveText: 40, setLeadingMoveText: 41, setTextMatrix: 42, nextLine: 43, showText: 44, showSpacedText: 45, nextLineShowText: 46, nextLineSetSpacingShowText: 47, setCharWidth: 48, setCharWidthAndBounds: 49, setStrokeColorSpace: 50, setFillColorSpace: 51, setStrokeColor: 52, setStrokeColorN: 53, setFillColor: 54, setFillColorN: 55, setStrokeGray: 56, setFillGray: 57, setStrokeRGBColor: 58, setFillRGBColor: 59, setStrokeCMYKColor: 60, setFillCMYKColor: 61, shadingFill: 62, beginInlineImage: 63, beginImageData: 64, endInlineImage: 65, paintXObject: 66, markPoint: 67, markPointProps: 68, beginMarkedContent: 69, beginMarkedContentProps: 70, endMarkedContent: 71, beginCompat: 72, endCompat: 73, paintFormXObjectBegin: 74, paintFormXObjectEnd: 75, beginGroup: 76, endGroup: 77, beginAnnotation: 80, endAnnotation: 81, paintImageMaskXObject: 83, paintImageMaskXObjectGroup: 84, paintImageXObject: 85, paintInlineImageXObject: 86, paintInlineImageXObjectGroup: 87, paintImageXObjectRepeat: 88, paintImageMaskXObjectRepeat: 89, paintSolidColorImageMask: 90, constructPath: 91, setStrokeTransparent: 92, setFillTransparent: 93, rawFillPath: 94 }; DrawOPS = { moveTo: 0, lineTo: 1, curveTo: 2, quadraticCurveTo: 3, closePath: 4 }; PasswordResponses = { NEED_PASSWORD: 1, INCORRECT_PASSWORD: 2 }; verbosity = VerbosityLevel.WARNINGS; BaseException = function BaseExceptionClosure() { function BaseException$1(message, name) { this.message = message; this.name = name; } BaseException$1.prototype = new Error(); BaseException$1.constructor = BaseException$1; return BaseException$1; }(); PasswordException = class extends BaseException { constructor(msg, code) { super(msg, "PasswordException"); this.code = code; } }; UnknownErrorException = class extends BaseException { constructor(msg, details) { super(msg, "UnknownErrorException"); this.details = details; } }; InvalidPDFException = class extends BaseException { constructor(msg) { super(msg, "InvalidPDFException"); } }; ResponseException = class extends BaseException { constructor(msg, status, missing) { super(msg, "ResponseException"); this.status = status; this.missing = missing; } }; FormatError = class extends BaseException { constructor(msg) { super(msg, "FormatError"); } }; AbortException = class extends BaseException { constructor(msg) { super(msg, "AbortException"); } }; util_FeatureTest = class { static get isLittleEndian() { return shadow(this, "isLittleEndian", isLittleEndian()); } static get isEvalSupported() { return shadow(this, "isEvalSupported", isEvalSupported()); } static get isOffscreenCanvasSupported() { return shadow(this, "isOffscreenCanvasSupported", typeof OffscreenCanvas !== "undefined"); } static get isImageDecoderSupported() { return shadow(this, "isImageDecoderSupported", typeof ImageDecoder !== "undefined"); } static get isFloat16ArraySupported() { return shadow(this, "isFloat16ArraySupported", typeof Float16Array !== "undefined"); } static get isSanitizerSupported() { return shadow(this, "isSanitizerSupported", typeof Sanitizer !== "undefined"); } static get platform() { const { platform, userAgent } = navigator; return shadow(this, "platform", { isAndroid: userAgent.includes("Android"), isLinux: platform.includes("Linux"), isMac: platform.includes("Mac"), isWindows: platform.includes("Win"), isFirefox: userAgent.includes("Firefox") }); } static get isCSSRoundSupported() { return shadow(this, "isCSSRoundSupported", globalThis.CSS?.supports?.("width: round(1.5px, 1px)")); } }; hexNumbers = Array.from(Array(256).keys(), (n$9) => n$9.toString(16).padStart(2, "0")); Util = class { static makeHexColor(r$10, g$1, b$3) { return `#${hexNumbers[r$10]}${hexNumbers[g$1]}${hexNumbers[b$3]}`; } static domMatrixToTransform(dm) { return [ dm.a, dm.b, dm.c, dm.d, dm.e, dm.f ]; } static scaleMinMax(transform, minMax) { let temp; if (transform[0]) { if (transform[0] < 0) { temp = minMax[0]; minMax[0] = minMax[2]; minMax[2] = temp; } minMax[0] *= transform[0]; minMax[2] *= transform[0]; if (transform[3] < 0) { temp = minMax[1]; minMax[1] = minMax[3]; minMax[3] = temp; } minMax[1] *= transform[3]; minMax[3] *= transform[3]; } else { temp = minMax[0]; minMax[0] = minMax[1]; minMax[1] = temp; temp = minMax[2]; minMax[2] = minMax[3]; minMax[3] = temp; if (transform[1] < 0) { temp = minMax[1]; minMax[1] = minMax[3]; minMax[3] = temp; } minMax[1] *= transform[1]; minMax[3] *= transform[1]; if (transform[2] < 0) { temp = minMax[0]; minMax[0] = minMax[2]; minMax[2] = temp; } minMax[0] *= transform[2]; minMax[2] *= transform[2]; } minMax[0] += transform[4]; minMax[1] += transform[5]; minMax[2] += transform[4]; minMax[3] += transform[5]; } static transform(m1, m2) { return [ m1[0] * m2[0] + m1[2] * m2[1], m1[1] * m2[0] + m1[3] * m2[1], m1[0] * m2[2] + m1[2] * m2[3], m1[1] * m2[2] + m1[3] * m2[3], m1[0] * m2[4] + m1[2] * m2[5] + m1[4], m1[1] * m2[4] + m1[3] * m2[5] + m1[5] ]; } static multiplyByDOMMatrix(m$3, md) { return [ m$3[0] * md.a + m$3[2] * md.b, m$3[1] * md.a + m$3[3] * md.b, m$3[0] * md.c + m$3[2] * md.d, m$3[1] * md.c + m$3[3] * md.d, m$3[0] * md.e + m$3[2] * md.f + m$3[4], m$3[1] * md.e + m$3[3] * md.f + m$3[5] ]; } static applyTransform(p$3, m$3, pos = 0) { const p0 = p$3[pos]; const p1 = p$3[pos + 1]; p$3[pos] = p0 * m$3[0] + p1 * m$3[2] + m$3[4]; p$3[pos + 1] = p0 * m$3[1] + p1 * m$3[3] + m$3[5]; } static applyTransformToBezier(p$3, transform, pos = 0) { const m0 = transform[0]; const m1 = transform[1]; const m2 = transform[2]; const m3 = transform[3]; const m4 = transform[4]; const m5 = transform[5]; for (let i$7 = 0; i$7 < 6; i$7 += 2) { const pI = p$3[pos + i$7]; const pI1 = p$3[pos + i$7 + 1]; p$3[pos + i$7] = pI * m0 + pI1 * m2 + m4; p$3[pos + i$7 + 1] = pI * m1 + pI1 * m3 + m5; } } static applyInverseTransform(p$3, m$3) { const p0 = p$3[0]; const p1 = p$3[1]; const d$5 = m$3[0] * m$3[3] - m$3[1] * m$3[2]; p$3[0] = (p0 * m$3[3] - p1 * m$3[2] + m$3[2] * m$3[5] - m$3[4] * m$3[3]) / d$5; p$3[1] = (-p0 * m$3[1] + p1 * m$3[0] + m$3[4] * m$3[1] - m$3[5] * m$3[0]) / d$5; } static axialAlignedBoundingBox(rect, transform, output) { const m0 = transform[0]; const m1 = transform[1]; const m2 = transform[2]; const m3 = transform[3]; const m4 = transform[4]; const m5 = transform[5]; const r0 = rect[0]; const r1 = rect[1]; const r2 = rect[2]; const r3 = rect[3]; let a0 = m0 * r0 + m4; let a2 = a0; let a1 = m0 * r2 + m4; let a3 = a1; let b0 = m3 * r1 + m5; let b2 = b0; let b1 = m3 * r3 + m5; let b3 = b1; if (m1 !== 0 || m2 !== 0) { const m1r0 = m1 * r0; const m1r2 = m1 * r2; const m2r1 = m2 * r1; const m2r3 = m2 * r3; a0 += m2r1; a3 += m2r1; a1 += m2r3; a2 += m2r3; b0 += m1r0; b3 += m1r0; b1 += m1r2; b2 += m1r2; } output[0] = Math.min(output[0], a0, a1, a2, a3); output[1] = Math.min(output[1], b0, b1, b2, b3); output[2] = Math.max(output[2], a0, a1, a2, a3); output[3] = Math.max(output[3], b0, b1, b2, b3); } static inverseTransform(m$3) { const d$5 = m$3[0] * m$3[3] - m$3[1] * m$3[2]; return [ m$3[3] / d$5, -m$3[1] / d$5, -m$3[2] / d$5, m$3[0] / d$5, (m$3[2] * m$3[5] - m$3[4] * m$3[3]) / d$5, (m$3[4] * m$3[1] - m$3[5] * m$3[0]) / d$5 ]; } static singularValueDecompose2dScale(matrix, output) { const m0 = matrix[0]; const m1 = matrix[1]; const m2 = matrix[2]; const m3 = matrix[3]; const a$2 = m0 ** 2 + m1 ** 2; const b$3 = m0 * m2 + m1 * m3; const c$7 = m2 ** 2 + m3 ** 2; const first = (a$2 + c$7) / 2; const second = Math.sqrt(first ** 2 - (a$2 * c$7 - b$3 ** 2)); output[0] = Math.sqrt(first + second || 1); output[1] = Math.sqrt(first - second || 1); } static normalizeRect(rect) { const r$10 = rect.slice(0); if (rect[0] > rect[2]) { r$10[0] = rect[2]; r$10[2] = rect[0]; } if (rect[1] > rect[3]) { r$10[1] = rect[3]; r$10[3] = rect[1]; } return r$10; } static intersect(rect1, rect2) { const xLow = Math.max(Math.min(rect1[0], rect1[2]), Math.min(rect2[0], rect2[2])); const xHigh = Math.min(Math.max(rect1[0], rect1[2]), Math.max(rect2[0], rect2[2])); if (xLow > xHigh) { return null; } const yLow = Math.max(Math.min(rect1[1], rect1[3]), Math.min(rect2[1], rect2[3])); const yHigh = Math.min(Math.max(rect1[1], rect1[3]), Math.max(rect2[1], rect2[3])); if (yLow > yHigh) { return null; } return [ xLow, yLow, xHigh, yHigh ]; } static pointBoundingBox(x$2, y$3, minMax) { minMax[0] = Math.min(minMax[0], x$2); minMax[1] = Math.min(minMax[1], y$3); minMax[2] = Math.max(minMax[2], x$2); minMax[3] = Math.max(minMax[3], y$3); } static rectBoundingBox(x0, y0, x1, y1, minMax) { minMax[0] = Math.min(minMax[0], x0, x1); minMax[1] = Math.min(minMax[1], y0, y1); minMax[2] = Math.max(minMax[2], x0, x1); minMax[3] = Math.max(minMax[3], y0, y1); } static #getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, t$6, minMax) { if (t$6 <= 0 || t$6 >= 1) { return; } const mt = 1 - t$6; const tt = t$6 * t$6; const ttt = tt * t$6; const x$2 = mt * (mt * (mt * x0 + 3 * t$6 * x1) + 3 * tt * x2) + ttt * x3; const y$3 = mt * (mt * (mt * y0 + 3 * t$6 * y1) + 3 * tt * y2) + ttt * y3; minMax[0] = Math.min(minMax[0], x$2); minMax[1] = Math.min(minMax[1], y$3); minMax[2] = Math.max(minMax[2], x$2); minMax[3] = Math.max(minMax[3], y$3); } static #getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, a$2, b$3, c$7, minMax) { if (Math.abs(a$2) < 1e-12) { if (Math.abs(b$3) >= 1e-12) { this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, -c$7 / b$3, minMax); } return; } const delta = b$3 ** 2 - 4 * c$7 * a$2; if (delta < 0) { return; } const sqrtDelta = Math.sqrt(delta); const a2 = 2 * a$2; this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, (-b$3 + sqrtDelta) / a2, minMax); this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, (-b$3 - sqrtDelta) / a2, minMax); } static bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3, minMax) { minMax[0] = Math.min(minMax[0], x0, x3); minMax[1] = Math.min(minMax[1], y0, y3); minMax[2] = Math.max(minMax[2], x0, x3); minMax[3] = Math.max(minMax[3], y0, y3); this.#getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, 3 * (-x0 + 3 * (x1 - x2) + x3), 6 * (x0 - 2 * x1 + x2), 3 * (x1 - x0), minMax); this.#getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, 3 * (-y0 + 3 * (y1 - y2) + y3), 6 * (y0 - 2 * y1 + y2), 3 * (y1 - y0), minMax); } }; PDFStringTranslateTable = null && [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 728, 711, 710, 729, 733, 731, 730, 732, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8226, 8224, 8225, 8230, 8212, 8211, 402, 8260, 8249, 8250, 8722, 8240, 8222, 8220, 8221, 8216, 8217, 8218, 8482, 64257, 64258, 321, 338, 352, 376, 381, 305, 322, 339, 353, 382, 0, 8364 ]; NormalizeRegex = null; NormalizationMap = null; AnnotationPrefix = "pdfjs_internal_id_"; if (typeof Promise.try !== "function") { Promise.try = function(fn, ...args) { return new Promise((resolve) => { resolve(fn(...args)); }); }; } if (typeof Math.sumPrecise !== "function") { Math.sumPrecise = function(numbers) { return numbers.reduce((a$2, b$3) => a$2 + b$3, 0); }; } ; XfaText = class XfaText { static textContent(xfa) { const items = []; const output = { items, styles: Object.create(null) }; function walk(node) { if (!node) { return; } let str = null; const name = node.name; if (name === "#text") { str = node.value; } else if (!XfaText.shouldBuildText(name)) { return; } else if (node?.attributes?.textContent) { str = node.attributes.textContent; } else if (node.value) { str = node.value; } if (str !== null) { items.push({ str }); } if (!node.children) { return; } for (const child of node.children) { walk(child); } } walk(xfa); return output; } static shouldBuildText(name) { return !(name === "textarea" || name === "input" || name === "option" || name === "select"); } }; ; XfaLayer = class { static setupStorage(html, id, element, storage, intent) { const storedData = storage.getValue(id, { value: null }); switch (element.name) { case "textarea": if (storedData.value !== null) { html.textContent = storedData.value; } if (intent === "print") { break; } html.addEventListener("input", (event) => { storage.setValue(id, { value: event.target.value }); }); break; case "input": if (element.attributes.type === "radio" || element.attributes.type === "checkbox") { if (storedData.value === element.attributes.xfaOn) { html.setAttribute("checked", true); } else if (storedData.value === element.attributes.xfaOff) { html.removeAttribute("checked"); } if (intent === "print") { break; } html.addEventListener("change", (event) => { storage.setValue(id, { value: event.target.checked ? event.target.getAttribute("xfaOn") : event.target.getAttribute("xfaOff") }); }); } else { if (storedData.value !== null) { html.setAttribute("value", storedData.value); } if (intent === "print") { break; } html.addEventListener("input", (event) => { storage.setValue(id, { value: event.target.value }); }); } break; case "select": if (storedData.value !== null) { html.setAttribute("value", storedData.value); for (const option of element.children) { if (option.attributes.value === storedData.value) { option.attributes.selected = true; } else if (option.attributes.hasOwnProperty("selected")) { delete option.attributes.selected; } } } html.addEventListener("input", (event) => { const options = event.target.options; const value = options.selectedIndex === -1 ? "" : options[options.selectedIndex].value; storage.setValue(id, { value }); }); break; } } static setAttributes({ html, element, storage = null, intent, linkService }) { const { attributes } = element; const isHTMLAnchorElement = html instanceof HTMLAnchorElement; if (attributes.type === "radio") { attributes.name = `${attributes.name}-${intent}`; } for (const [key, value] of Object.entries(attributes)) { if (value === null || value === undefined) { continue; } switch (key) { case "class": if (value.length) { html.setAttribute(key, value.join(" ")); } break; case "dataId": break; case "id": html.setAttribute("data-element-id", value); break; case "style": Object.assign(html.style, value); break; case "textContent": html.textContent = value; break; default: if (!isHTMLAnchorElement || key !== "href" && key !== "newWindow") { html.setAttribute(key, value); } } } if (isHTMLAnchorElement) { linkService.addLinkAttributes(html, attributes.href, attributes.newWindow); } if (storage && attributes.dataId) { this.setupStorage(html, attributes.dataId, element, storage); } } static render(parameters) { const storage = parameters.annotationStorage; const linkService = parameters.linkService; const root = parameters.xfaHtml; const intent = parameters.intent || "display"; const rootHtml = document.createElement(root.name); if (root.attributes) { this.setAttributes({ html: rootHtml, element: root, intent, linkService }); } const isNotForRichText = intent !== "richText"; const rootDiv = parameters.div; rootDiv.append(rootHtml); if (parameters.viewport) { const transform = `matrix(${parameters.viewport.transform.join(",")})`; rootDiv.style.transform = transform; } if (isNotForRichText) { rootDiv.setAttribute("class", "xfaLayer xfaFont"); } const textDivs = []; if (root.children.length === 0) { if (root.value) { const node = document.createTextNode(root.value); rootHtml.append(node); if (isNotForRichText && XfaText.shouldBuildText(root.name)) { textDivs.push(node); } } return { textDivs }; } const stack = [[ root, -1, rootHtml ]]; while (stack.length > 0) { const [parent, i$7, html] = stack.at(-1); if (i$7 + 1 === parent.children.length) { stack.pop(); continue; } const child = parent.children[++stack.at(-1)[1]]; if (child === null) { continue; } const { name } = child; if (name === "#text") { const node = document.createTextNode(child.value); textDivs.push(node); html.append(node); continue; } const childHtml = child?.attributes?.xmlns ? document.createElementNS(child.attributes.xmlns, name) : document.createElement(name); html.append(childHtml); if (child.attributes) { this.setAttributes({ html: childHtml, element: child, storage, intent, linkService }); } if (child.children?.length > 0) { stack.push([ child, -1, childHtml ]); } else if (child.value) { const node = document.createTextNode(child.value); if (isNotForRichText && XfaText.shouldBuildText(name)) { textDivs.push(node); } childHtml.append(node); } } for (const el of rootDiv.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea")) { el.setAttribute("readOnly", true); } return { textDivs }; } static update(parameters) { const transform = `matrix(${parameters.viewport.transform.join(",")})`; parameters.div.style.transform = transform; parameters.div.hidden = false; } }; ; SVG_NS = "http://www.w3.org/2000/svg"; PixelsPerInch = class { static CSS = 96; static PDF = 72; static PDF_TO_CSS_UNITS = this.CSS / this.PDF; }; PageViewport = class PageViewport { constructor({ viewBox, userUnit, scale, rotation, offsetX = 0, offsetY = 0, dontFlip = false }) { this.viewBox = viewBox; this.userUnit = userUnit; this.scale = scale; this.rotation = rotation; this.offsetX = offsetX; this.offsetY = offsetY; scale *= userUnit; const centerX = (viewBox[2] + viewBox[0]) / 2; const centerY = (viewBox[3] + viewBox[1]) / 2; let rotateA, rotateB, rotateC, rotateD; rotation %= 360; if (rotation < 0) { rotation += 360; } switch (rotation) { case 180: rotateA = -1; rotateB = 0; rotateC = 0; rotateD = 1; break; case 90: rotateA = 0; rotateB = 1; rotateC = 1; rotateD = 0; break; case 270: rotateA = 0; rotateB = -1; rotateC = -1; rotateD = 0; break; case 0: rotateA = 1; rotateB = 0; rotateC = 0; rotateD = -1; break; default: throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees."); } if (dontFlip) { rotateC = -rotateC; rotateD = -rotateD; } let offsetCanvasX, offsetCanvasY; let width, height; if (rotateA === 0) { offsetCanvasX = Math.abs(centerY - viewBox[1]) * scale + offsetX; offsetCanvasY = Math.abs(centerX - viewBox[0]) * scale + offsetY; width = (viewBox[3] - viewBox[1]) * scale; height = (viewBox[2] - viewBox[0]) * scale; } else { offsetCanvasX = Math.abs(centerX - viewBox[0]) * scale + offsetX; offsetCanvasY = Math.abs(centerY - viewBox[1]) * scale + offsetY; width = (viewBox[2] - viewBox[0]) * scale; height = (viewBox[3] - viewBox[1]) * scale; } this.transform = [ rotateA * scale, rotateB * scale, rotateC * scale, rotateD * scale, offsetCanvasX - rotateA * scale * centerX - rotateC * scale * centerY, offsetCanvasY - rotateB * scale * centerX - rotateD * scale * centerY ]; this.width = width; this.height = height; } get rawDims() { const dims = this.viewBox; return shadow(this, "rawDims", { pageWidth: dims[2] - dims[0], pageHeight: dims[3] - dims[1], pageX: dims[0], pageY: dims[1] }); } clone({ scale = this.scale, rotation = this.rotation, offsetX = this.offsetX, offsetY = this.offsetY, dontFlip = false } = {}) { return new PageViewport({ viewBox: this.viewBox.slice(), userUnit: this.userUnit, scale, rotation, offsetX, offsetY, dontFlip }); } convertToViewportPoint(x$2, y$3) { const p$3 = [x$2, y$3]; Util.applyTransform(p$3, this.transform); return p$3; } convertToViewportRectangle(rect) { const topLeft = [rect[0], rect[1]]; Util.applyTransform(topLeft, this.transform); const bottomRight = [rect[2], rect[3]]; Util.applyTransform(bottomRight, this.transform); return [ topLeft[0], topLeft[1], bottomRight[0], bottomRight[1] ]; } convertToPdfPoint(x$2, y$3) { const p$3 = [x$2, y$3]; Util.applyInverseTransform(p$3, this.transform); return p$3; } }; RenderingCancelledException = class extends BaseException { constructor(msg, extraDelay = 0) { super(msg, "RenderingCancelledException"); this.extraDelay = extraDelay; } }; StatTimer = class { started = Object.create(null); times = []; time(name) { if (name in this.started) { warn$2(`Timer is already running for ${name}`); } this.started[name] = Date.now(); } timeEnd(name) { if (!(name in this.started)) { warn$2(`Timer has not been started for ${name}`); } this.times.push({ name, start: this.started[name], end: Date.now() }); delete this.started[name]; } toString() { const outBuf = []; let longest = 0; for (const { name } of this.times) { longest = Math.max(name.length, longest); } for (const { name, start, end } of this.times) { outBuf.push(`${name.padEnd(longest)} ${end - start}ms\n`); } return outBuf.join(""); } }; PDFDateString = class { static #regex; static toDateObject(input) { if (input instanceof Date) { return input; } if (!input || typeof input !== "string") { return null; } this.#regex ||= new RegExp("^D:" + "(\\d{4})" + "(\\d{2})?" + "(\\d{2})?" + "(\\d{2})?" + "(\\d{2})?" + "(\\d{2})?" + "([Z|+|-])?" + "(\\d{2})?" + "'?" + "(\\d{2})?" + "'?"); const matches = this.#regex.exec(input); if (!matches) { return null; } const year = parseInt(matches[1], 10); let month = parseInt(matches[2], 10); month = month >= 1 && month <= 12 ? month - 1 : 0; let day = parseInt(matches[3], 10); day = day >= 1 && day <= 31 ? day : 1; let hour = parseInt(matches[4], 10); hour = hour >= 0 && hour <= 23 ? hour : 0; let minute = parseInt(matches[5], 10); minute = minute >= 0 && minute <= 59 ? minute : 0; let second = parseInt(matches[6], 10); second = second >= 0 && second <= 59 ? second : 0; const universalTimeRelation = matches[7] || "Z"; let offsetHour = parseInt(matches[8], 10); offsetHour = offsetHour >= 0 && offsetHour <= 23 ? offsetHour : 0; let offsetMinute = parseInt(matches[9], 10) || 0; offsetMinute = offsetMinute >= 0 && offsetMinute <= 59 ? offsetMinute : 0; if (universalTimeRelation === "-") { hour += offsetHour; minute += offsetMinute; } else if (universalTimeRelation === "+") { hour -= offsetHour; minute -= offsetMinute; } return new Date(Date.UTC(year, month, day, hour, minute, second)); } }; OutputScale = class OutputScale { constructor() { const { pixelRatio } = OutputScale; this.sx = pixelRatio; this.sy = pixelRatio; } get scaled() { return this.sx !== 1 || this.sy !== 1; } get symmetric() { return this.sx === this.sy; } limitCanvas(width, height, maxPixels, maxDim, capAreaFactor = -1) { let maxAreaScale = Infinity, maxWidthScale = Infinity, maxHeightScale = Infinity; maxPixels = OutputScale.capPixels(maxPixels, capAreaFactor); if (maxPixels > 0) { maxAreaScale = Math.sqrt(maxPixels / (width * height)); } if (maxDim !== -1) { maxWidthScale = maxDim / width; maxHeightScale = maxDim / height; } const maxScale = Math.min(maxAreaScale, maxWidthScale, maxHeightScale); if (this.sx > maxScale || this.sy > maxScale) { this.sx = maxScale; this.sy = maxScale; return true; } return false; } static get pixelRatio() { return globalThis.devicePixelRatio || 1; } static capPixels(maxPixels, capAreaFactor) { if (capAreaFactor >= 0) { const winPixels = Math.ceil(window.screen.availWidth * window.screen.availHeight * this.pixelRatio ** 2 * (1 + capAreaFactor / 100)); return maxPixels > 0 ? Math.min(maxPixels, winPixels) : winPixels; } return maxPixels; } }; SupportedImageMimeTypes = [ "image/apng", "image/avif", "image/bmp", "image/gif", "image/jpeg", "image/png", "image/svg+xml", "image/webp", "image/x-icon" ]; ColorScheme = class { static get isDarkMode() { return shadow(this, "isDarkMode", !!window?.matchMedia?.("(prefers-color-scheme: dark)").matches); } }; CSSConstants = class { static get commentForegroundColor() { const element = document.createElement("span"); element.classList.add("comment", "sidebar"); const { style } = element; style.width = style.height = "0"; style.display = "none"; style.color = "var(--comment-fg-color)"; document.body.append(element); const { color } = window.getComputedStyle(element); element.remove(); return shadow(this, "commentForegroundColor", getRGB(color)); } }; contrastCache = new Map(); ; EditorToolbar = class EditorToolbar { #toolbar = null; #colorPicker = null; #editor; #buttons = null; #altText = null; #comment = null; #commentButtonDivider = null; #signatureDescriptionButton = null; static #l10nRemove = null; constructor(editor) { this.#editor = editor; EditorToolbar.#l10nRemove ||= Object.freeze({ freetext: "pdfjs-editor-remove-freetext-button", highlight: "pdfjs-editor-remove-highlight-button", ink: "pdfjs-editor-remove-ink-button", stamp: "pdfjs-editor-remove-stamp-button", signature: "pdfjs-editor-remove-signature-button" }); } render() { const editToolbar = this.#toolbar = document.createElement("div"); editToolbar.classList.add("editToolbar", "hidden"); editToolbar.setAttribute("role", "toolbar"); const signal = this.#editor._uiManager._signal; if (signal instanceof AbortSignal && !signal.aborted) { editToolbar.addEventListener("contextmenu", noContextMenu, { signal }); editToolbar.addEventListener("pointerdown", EditorToolbar.#pointerDown, { signal }); } const buttons = this.#buttons = document.createElement("div"); buttons.className = "buttons"; editToolbar.append(buttons); const position = this.#editor.toolbarPosition; if (position) { const { style } = editToolbar; const x$2 = this.#editor._uiManager.direction === "ltr" ? 1 - position[0] : position[0]; style.insetInlineEnd = `${100 * x$2}%`; style.top = `calc(${100 * position[1]}% + var(--editor-toolbar-vert-offset))`; } return editToolbar; } get div() { return this.#toolbar; } static #pointerDown(e$10) { e$10.stopPropagation(); } #focusIn(e$10) { this.#editor._focusEventsAllowed = false; stopEvent(e$10); } #focusOut(e$10) { this.#editor._focusEventsAllowed = true; stopEvent(e$10); } #addListenersToElement(element) { const signal = this.#editor._uiManager._signal; if (!(signal instanceof AbortSignal) || signal.aborted) { return false; } element.addEventListener("focusin", this.#focusIn.bind(this), { capture: true, signal }); element.addEventListener("focusout", this.#focusOut.bind(this), { capture: true, signal }); element.addEventListener("contextmenu", noContextMenu, { signal }); return true; } hide() { this.#toolbar.classList.add("hidden"); this.#colorPicker?.hideDropdown(); } show() { this.#toolbar.classList.remove("hidden"); this.#altText?.shown(); this.#comment?.shown(); } addDeleteButton() { const { editorType, _uiManager } = this.#editor; const button = document.createElement("button"); button.classList.add("basic", "deleteButton"); button.tabIndex = 0; button.setAttribute("data-l10n-id", EditorToolbar.#l10nRemove[editorType]); if (this.#addListenersToElement(button)) { button.addEventListener("click", (e$10) => { _uiManager.delete(); }, { signal: _uiManager._signal }); } this.#buttons.append(button); } get #divider() { const divider = document.createElement("div"); divider.className = "divider"; return divider; } async addAltText(altText) { const button = await altText.render(); this.#addListenersToElement(button); this.#buttons.append(button, this.#divider); this.#altText = altText; } addComment(comment, beforeElement = null) { if (this.#comment) { return; } const button = comment.renderForToolbar(); if (!button) { return; } this.#addListenersToElement(button); const divider = this.#commentButtonDivider = this.#divider; if (!beforeElement) { this.#buttons.append(button, divider); } else { this.#buttons.insertBefore(button, beforeElement); this.#buttons.insertBefore(divider, beforeElement); } this.#comment = comment; comment.toolbar = this; } addColorPicker(colorPicker) { if (this.#colorPicker) { return; } this.#colorPicker = colorPicker; const button = colorPicker.renderButton(); this.#addListenersToElement(button); this.#buttons.append(button, this.#divider); } async addEditSignatureButton(signatureManager) { const button = this.#signatureDescriptionButton = await signatureManager.renderEditButton(this.#editor); this.#addListenersToElement(button); this.#buttons.append(button, this.#divider); } removeButton(name) { switch (name) { case "comment": this.#comment?.removeToolbarCommentButton(); this.#comment = null; this.#commentButtonDivider?.remove(); this.#commentButtonDivider = null; break; } } async addButton(name, tool) { switch (name) { case "colorPicker": if (tool) { this.addColorPicker(tool); } break; case "altText": if (tool) { await this.addAltText(tool); } break; case "editSignature": if (tool) { await this.addEditSignatureButton(tool); } break; case "delete": this.addDeleteButton(); break; case "comment": if (tool) { this.addComment(tool); } break; } } async addButtonBefore(name, tool, beforeSelector) { if (!tool && name === "comment") { return; } const beforeElement = this.#buttons.querySelector(beforeSelector); if (!beforeElement) { return; } if (name === "comment") { this.addComment(tool, beforeElement); } } updateEditSignatureButton(description) { if (this.#signatureDescriptionButton) { this.#signatureDescriptionButton.title = description; } } remove() { this.#toolbar.remove(); this.#colorPicker?.destroy(); this.#colorPicker = null; } }; FloatingToolbar = class { #buttons = null; #toolbar = null; #uiManager; constructor(uiManager) { this.#uiManager = uiManager; } #render() { const editToolbar = this.#toolbar = document.createElement("div"); editToolbar.className = "editToolbar"; editToolbar.setAttribute("role", "toolbar"); const signal = this.#uiManager._signal; if (signal instanceof AbortSignal && !signal.aborted) { editToolbar.addEventListener("contextmenu", noContextMenu, { signal }); } const buttons = this.#buttons = document.createElement("div"); buttons.className = "buttons"; editToolbar.append(buttons); if (this.#uiManager.hasCommentManager()) { this.#makeButton("commentButton", `pdfjs-comment-floating-button`, "pdfjs-comment-floating-button-label", () => { this.#uiManager.commentSelection("floating_button"); }); } this.#makeButton("highlightButton", `pdfjs-highlight-floating-button1`, "pdfjs-highlight-floating-button-label", () => { this.#uiManager.highlightSelection("floating_button"); }); return editToolbar; } #getLastPoint(boxes, isLTR) { let lastY = 0; let lastX = 0; for (const box of boxes) { const y$3 = box.y + box.height; if (y$3 < lastY) { continue; } const x$2 = box.x + (isLTR ? box.width : 0); if (y$3 > lastY) { lastX = x$2; lastY = y$3; continue; } if (isLTR) { if (x$2 > lastX) { lastX = x$2; } } else if (x$2 < lastX) { lastX = x$2; } } return [isLTR ? 1 - lastX : lastX, lastY]; } show(parent, boxes, isLTR) { const [x$2, y$3] = this.#getLastPoint(boxes, isLTR); const { style } = this.#toolbar ||= this.#render(); parent.append(this.#toolbar); style.insetInlineEnd = `${100 * x$2}%`; style.top = `calc(${100 * y$3}% + var(--editor-toolbar-vert-offset))`; } hide() { this.#toolbar.remove(); } #makeButton(buttonClass, l10nId, labelL10nId, clickHandler) { const button = document.createElement("button"); button.classList.add("basic", buttonClass); button.tabIndex = 0; button.setAttribute("data-l10n-id", l10nId); const span = document.createElement("span"); button.append(span); span.className = "visuallyHidden"; span.setAttribute("data-l10n-id", labelL10nId); const signal = this.#uiManager._signal; if (signal instanceof AbortSignal && !signal.aborted) { button.addEventListener("contextmenu", noContextMenu, { signal }); button.addEventListener("click", clickHandler, { signal }); } this.#buttons.append(button); } }; ; CurrentPointers = class CurrentPointers { static #pointerId = NaN; static #pointerIds = null; static #moveTimestamp = NaN; static #pointerType = null; static initializeAndAddPointerId(pointerId) { (CurrentPointers.#pointerIds ||= new Set()).add(pointerId); } static setPointer(pointerType, pointerId) { CurrentPointers.#pointerId ||= pointerId; CurrentPointers.#pointerType ??= pointerType; } static setTimeStamp(timeStamp) { CurrentPointers.#moveTimestamp = timeStamp; } static isSamePointerId(pointerId) { return CurrentPointers.#pointerId === pointerId; } static isSamePointerIdOrRemove(pointerId) { if (CurrentPointers.#pointerId === pointerId) { return true; } CurrentPointers.#pointerIds?.delete(pointerId); return false; } static isSamePointerType(pointerType) { return CurrentPointers.#pointerType === pointerType; } static isInitializedAndDifferentPointerType(pointerType) { return CurrentPointers.#pointerType !== null && !CurrentPointers.isSamePointerType(pointerType); } static isSameTimeStamp(timeStamp) { return CurrentPointers.#moveTimestamp === timeStamp; } static isUsingMultiplePointers() { return CurrentPointers.#pointerIds?.size >= 1; } static clearPointerType() { CurrentPointers.#pointerType = null; } static clearPointerIds() { CurrentPointers.#pointerId = NaN; CurrentPointers.#pointerIds = null; } static clearTimeStamp() { CurrentPointers.#moveTimestamp = NaN; } }; IdManager = class { #id = 0; get id() { return `${AnnotationEditorPrefix}${this.#id++}`; } }; ImageManager = class ImageManager { #baseId = getUuid(); #id = 0; #cache = null; static get _isSVGFittingCanvas() { const svg = `data:image/svg+xml;charset=UTF-8,`; const canvas = new OffscreenCanvas(1, 3); const ctx = canvas.getContext("2d", { willReadFrequently: true }); const image = new Image(); image.src = svg; const promise = image.decode().then(() => { ctx.drawImage(image, 0, 0, 1, 1, 0, 0, 1, 3); return new Uint32Array(ctx.getImageData(0, 0, 1, 1).data.buffer)[0] === 0; }); return shadow(this, "_isSVGFittingCanvas", promise); } async #get(key, rawData) { this.#cache ||= new Map(); let data = this.#cache.get(key); if (data === null) { return null; } if (data?.bitmap) { data.refCounter += 1; return data; } try { data ||= { bitmap: null, id: `image_${this.#baseId}_${this.#id++}`, refCounter: 0, isSvg: false }; let image; if (typeof rawData === "string") { data.url = rawData; image = await fetchData(rawData, "blob"); } else if (rawData instanceof File) { image = data.file = rawData; } else if (rawData instanceof Blob) { image = rawData; } if (image.type === "image/svg+xml") { const mustRemoveAspectRatioPromise = ImageManager._isSVGFittingCanvas; const fileReader = new FileReader(); const imageElement = new Image(); const imagePromise = new Promise((resolve, reject) => { imageElement.onload = () => { data.bitmap = imageElement; data.isSvg = true; resolve(); }; fileReader.onload = async () => { const url = data.svgUrl = fileReader.result; imageElement.src = await mustRemoveAspectRatioPromise ? `${url}#svgView(preserveAspectRatio(none))` : url; }; imageElement.onerror = fileReader.onerror = reject; }); fileReader.readAsDataURL(image); await imagePromise; } else { data.bitmap = await createImageBitmap(image); } data.refCounter = 1; } catch (e$10) { warn$2(e$10); data = null; } this.#cache.set(key, data); if (data) { this.#cache.set(data.id, data); } return data; } async getFromFile(file) { const { lastModified, name, size, type } = file; return this.#get(`${lastModified}_${name}_${size}_${type}`, file); } async getFromUrl(url) { return this.#get(url, url); } async getFromBlob(id, blobPromise) { const blob = await blobPromise; return this.#get(id, blob); } async getFromId(id) { this.#cache ||= new Map(); const data = this.#cache.get(id); if (!data) { return null; } if (data.bitmap) { data.refCounter += 1; return data; } if (data.file) { return this.getFromFile(data.file); } if (data.blobPromise) { const { blobPromise } = data; delete data.blobPromise; return this.getFromBlob(data.id, blobPromise); } return this.getFromUrl(data.url); } getFromCanvas(id, canvas) { this.#cache ||= new Map(); let data = this.#cache.get(id); if (data?.bitmap) { data.refCounter += 1; return data; } const offscreen = new OffscreenCanvas(canvas.width, canvas.height); const ctx = offscreen.getContext("2d"); ctx.drawImage(canvas, 0, 0); data = { bitmap: offscreen.transferToImageBitmap(), id: `image_${this.#baseId}_${this.#id++}`, refCounter: 1, isSvg: false }; this.#cache.set(id, data); this.#cache.set(data.id, data); return data; } getSvgUrl(id) { const data = this.#cache.get(id); if (!data?.isSvg) { return null; } return data.svgUrl; } deleteId(id) { this.#cache ||= new Map(); const data = this.#cache.get(id); if (!data) { return; } data.refCounter -= 1; if (data.refCounter !== 0) { return; } const { bitmap } = data; if (!data.url && !data.file) { const canvas = new OffscreenCanvas(bitmap.width, bitmap.height); const ctx = canvas.getContext("bitmaprenderer"); ctx.transferFromImageBitmap(bitmap); data.blobPromise = canvas.convertToBlob(); } bitmap.close?.(); data.bitmap = null; } isValidId(id) { return id.startsWith(`image_${this.#baseId}_`); } }; CommandManager = class { #commands = []; #locked = false; #maxSize; #position = -1; constructor(maxSize = 128) { this.#maxSize = maxSize; } add({ cmd, undo, post: post$1, mustExec, type = NaN, overwriteIfSameType = false, keepUndo = false }) { if (mustExec) { cmd(); } if (this.#locked) { return; } const save = { cmd, undo, post: post$1, type }; if (this.#position === -1) { if (this.#commands.length > 0) { this.#commands.length = 0; } this.#position = 0; this.#commands.push(save); return; } if (overwriteIfSameType && this.#commands[this.#position].type === type) { if (keepUndo) { save.undo = this.#commands[this.#position].undo; } this.#commands[this.#position] = save; return; } const next = this.#position + 1; if (next === this.#maxSize) { this.#commands.splice(0, 1); } else { this.#position = next; if (next < this.#commands.length) { this.#commands.splice(next); } } this.#commands.push(save); } undo() { if (this.#position === -1) { return; } this.#locked = true; const { undo, post: post$1 } = this.#commands[this.#position]; undo(); post$1?.(); this.#locked = false; this.#position -= 1; } redo() { if (this.#position < this.#commands.length - 1) { this.#position += 1; this.#locked = true; const { cmd, post: post$1 } = this.#commands[this.#position]; cmd(); post$1?.(); this.#locked = false; } } hasSomethingToUndo() { return this.#position !== -1; } hasSomethingToRedo() { return this.#position < this.#commands.length - 1; } cleanType(type) { if (this.#position === -1) { return; } for (let i$7 = this.#position; i$7 >= 0; i$7--) { if (this.#commands[i$7].type !== type) { this.#commands.splice(i$7 + 1, this.#position - i$7); this.#position = i$7; return; } } this.#commands.length = 0; this.#position = -1; } destroy() { this.#commands = null; } }; KeyboardManager = class { constructor(callbacks) { this.buffer = []; this.callbacks = new Map(); this.allKeys = new Set(); const { isMac } = util_FeatureTest.platform; for (const [keys$1, callback, options = {}] of callbacks) { for (const key of keys$1) { const isMacKey = key.startsWith("mac+"); if (isMac && isMacKey) { this.callbacks.set(key.slice(4), { callback, options }); this.allKeys.add(key.split("+").at(-1)); } else if (!isMac && !isMacKey) { this.callbacks.set(key, { callback, options }); this.allKeys.add(key.split("+").at(-1)); } } } } #serialize(event) { if (event.altKey) { this.buffer.push("alt"); } if (event.ctrlKey) { this.buffer.push("ctrl"); } if (event.metaKey) { this.buffer.push("meta"); } if (event.shiftKey) { this.buffer.push("shift"); } this.buffer.push(event.key); const str = this.buffer.join("+"); this.buffer.length = 0; return str; } exec(self$1, event) { if (!this.allKeys.has(event.key)) { return; } const info$1 = this.callbacks.get(this.#serialize(event)); if (!info$1) { return; } const { callback, options: { bubbles = false, args = [], checker = null } } = info$1; if (checker && !checker(self$1, event)) { return; } callback.bind(self$1, ...args, event)(); if (!bubbles) { stopEvent(event); } } }; ColorManager = class ColorManager { static _colorsMapping = new Map([["CanvasText", [ 0, 0, 0 ]], ["Canvas", [ 255, 255, 255 ]]]); get _colors() { const colors = new Map([["CanvasText", null], ["Canvas", null]]); getColorValues(colors); return shadow(this, "_colors", colors); } convert(color) { const rgb = getRGB(color); if (!window.matchMedia("(forced-colors: active)").matches) { return rgb; } for (const [name, RGB] of this._colors) { if (RGB.every((x$2, i$7) => x$2 === rgb[i$7])) { return ColorManager._colorsMapping.get(name); } } return rgb; } getHexCode(name) { const rgb = this._colors.get(name); if (!rgb) { return name; } return Util.makeHexColor(...rgb); } }; AnnotationEditorUIManager = class AnnotationEditorUIManager { #abortController = new AbortController(); #activeEditor = null; #allEditableAnnotations = null; #allEditors = new Map(); #allLayers = new Map(); #altTextManager = null; #annotationStorage = null; #changedExistingAnnotations = null; #commandManager = new CommandManager(); #commentManager = null; #copyPasteAC = null; #currentDrawingSession = null; #currentPageIndex = 0; #deletedAnnotationsElementIds = new Set(); #draggingEditors = null; #editorTypes = null; #editorsToRescale = new Set(); _editorUndoBar = null; #enableHighlightFloatingButton = false; #enableUpdatedAddImage = false; #enableNewAltTextWhenAddingImage = false; #filterFactory = null; #focusMainContainerTimeoutId = null; #focusManagerAC = null; #highlightColors = null; #highlightWhenShiftUp = false; #floatingToolbar = null; #idManager = new IdManager(); #isEnabled = false; #isPointerDown = false; #isWaiting = false; #keyboardManagerAC = null; #lastActiveElement = null; #mainHighlightColorPicker = null; #missingCanvases = null; #mlManager = null; #mode = AnnotationEditorType.NONE; #selectedEditors = new Set(); #selectedTextNode = null; #signatureManager = null; #pageColors = null; #showAllStates = null; #pdfDocument = null; #previousStates = { isEditing: false, isEmpty: true, hasSomethingToUndo: false, hasSomethingToRedo: false, hasSelectedEditor: false, hasSelectedText: false }; #translation = [0, 0]; #translationTimeoutId = null; #container = null; #viewer = null; #viewerAlert = null; #updateModeCapability = null; static TRANSLATE_SMALL = 1; static TRANSLATE_BIG = 10; static get _keyboardManager() { const proto = AnnotationEditorUIManager.prototype; const arrowChecker = (self$1) => self$1.#container.contains(document.activeElement) && document.activeElement.tagName !== "BUTTON" && self$1.hasSomethingToControl(); const textInputChecker = (_self, { target: el }) => { if (el instanceof HTMLInputElement) { const { type } = el; return type !== "text" && type !== "number"; } return true; }; const small = this.TRANSLATE_SMALL; const big = this.TRANSLATE_BIG; return shadow(this, "_keyboardManager", new KeyboardManager([ [ ["ctrl+a", "mac+meta+a"], proto.selectAll, { checker: textInputChecker } ], [ ["ctrl+z", "mac+meta+z"], proto.undo, { checker: textInputChecker } ], [ [ "ctrl+y", "ctrl+shift+z", "mac+meta+shift+z", "ctrl+shift+Z", "mac+meta+shift+Z" ], proto.redo, { checker: textInputChecker } ], [ [ "Backspace", "alt+Backspace", "ctrl+Backspace", "shift+Backspace", "mac+Backspace", "mac+alt+Backspace", "mac+ctrl+Backspace", "Delete", "ctrl+Delete", "shift+Delete", "mac+Delete" ], proto.delete, { checker: textInputChecker } ], [ ["Enter", "mac+Enter"], proto.addNewEditorFromKeyboard, { checker: (self$1, { target: el }) => !(el instanceof HTMLButtonElement) && self$1.#container.contains(el) && !self$1.isEnterHandled } ], [ [" ", "mac+ "], proto.addNewEditorFromKeyboard, { checker: (self$1, { target: el }) => !(el instanceof HTMLButtonElement) && self$1.#container.contains(document.activeElement) } ], [["Escape", "mac+Escape"], proto.unselectAll], [ ["ArrowLeft", "mac+ArrowLeft"], proto.translateSelectedEditors, { args: [-small, 0], checker: arrowChecker } ], [ ["ctrl+ArrowLeft", "mac+shift+ArrowLeft"], proto.translateSelectedEditors, { args: [-big, 0], checker: arrowChecker } ], [ ["ArrowRight", "mac+ArrowRight"], proto.translateSelectedEditors, { args: [small, 0], checker: arrowChecker } ], [ ["ctrl+ArrowRight", "mac+shift+ArrowRight"], proto.translateSelectedEditors, { args: [big, 0], checker: arrowChecker } ], [ ["ArrowUp", "mac+ArrowUp"], proto.translateSelectedEditors, { args: [0, -small], checker: arrowChecker } ], [ ["ctrl+ArrowUp", "mac+shift+ArrowUp"], proto.translateSelectedEditors, { args: [0, -big], checker: arrowChecker } ], [ ["ArrowDown", "mac+ArrowDown"], proto.translateSelectedEditors, { args: [0, small], checker: arrowChecker } ], [ ["ctrl+ArrowDown", "mac+shift+ArrowDown"], proto.translateSelectedEditors, { args: [0, big], checker: arrowChecker } ] ])); } constructor(container, viewer, viewerAlert, altTextManager, commentManager, signatureManager, eventBus, pdfDocument, pageColors, highlightColors, enableHighlightFloatingButton, enableUpdatedAddImage, enableNewAltTextWhenAddingImage, mlManager, editorUndoBar, supportsPinchToZoom) { const signal = this._signal = this.#abortController.signal; this.#container = container; this.#viewer = viewer; this.#viewerAlert = viewerAlert; this.#altTextManager = altTextManager; this.#commentManager = commentManager; this.#signatureManager = signatureManager; this.#pdfDocument = pdfDocument; this._eventBus = eventBus; eventBus._on("editingaction", this.onEditingAction.bind(this), { signal }); eventBus._on("pagechanging", this.onPageChanging.bind(this), { signal }); eventBus._on("scalechanging", this.onScaleChanging.bind(this), { signal }); eventBus._on("rotationchanging", this.onRotationChanging.bind(this), { signal }); eventBus._on("setpreference", this.onSetPreference.bind(this), { signal }); eventBus._on("switchannotationeditorparams", (evt) => this.updateParams(evt.type, evt.value), { signal }); window.addEventListener("pointerdown", () => { this.#isPointerDown = true; }, { capture: true, signal }); window.addEventListener("pointerup", () => { this.#isPointerDown = false; }, { capture: true, signal }); this.#addSelectionListener(); this.#addDragAndDropListeners(); this.#addKeyboardManager(); this.#annotationStorage = pdfDocument.annotationStorage; this.#filterFactory = pdfDocument.filterFactory; this.#pageColors = pageColors; this.#highlightColors = highlightColors || null; this.#enableHighlightFloatingButton = enableHighlightFloatingButton; this.#enableUpdatedAddImage = enableUpdatedAddImage; this.#enableNewAltTextWhenAddingImage = enableNewAltTextWhenAddingImage; this.#mlManager = mlManager || null; this.viewParameters = { realScale: PixelsPerInch.PDF_TO_CSS_UNITS, rotation: 0 }; this.isShiftKeyDown = false; this._editorUndoBar = editorUndoBar || null; this._supportsPinchToZoom = supportsPinchToZoom !== false; commentManager?.setSidebarUiManager(this); } destroy() { this.#updateModeCapability?.resolve(); this.#updateModeCapability = null; this.#abortController?.abort(); this.#abortController = null; this._signal = null; for (const layer of this.#allLayers.values()) { layer.destroy(); } this.#allLayers.clear(); this.#allEditors.clear(); this.#editorsToRescale.clear(); this.#missingCanvases?.clear(); this.#activeEditor = null; this.#selectedEditors.clear(); this.#commandManager.destroy(); this.#altTextManager?.destroy(); this.#commentManager?.destroy(); this.#signatureManager?.destroy(); this.#floatingToolbar?.hide(); this.#floatingToolbar = null; this.#mainHighlightColorPicker?.destroy(); this.#mainHighlightColorPicker = null; this.#allEditableAnnotations = null; if (this.#focusMainContainerTimeoutId) { clearTimeout(this.#focusMainContainerTimeoutId); this.#focusMainContainerTimeoutId = null; } if (this.#translationTimeoutId) { clearTimeout(this.#translationTimeoutId); this.#translationTimeoutId = null; } this._editorUndoBar?.destroy(); this.#pdfDocument = null; } combinedSignal(ac) { return AbortSignal.any([this._signal, ac.signal]); } get mlManager() { return this.#mlManager; } get useNewAltTextFlow() { return this.#enableUpdatedAddImage; } get useNewAltTextWhenAddingImage() { return this.#enableNewAltTextWhenAddingImage; } get hcmFilter() { return shadow(this, "hcmFilter", this.#pageColors ? this.#filterFactory.addHCMFilter(this.#pageColors.foreground, this.#pageColors.background) : "none"); } get direction() { return shadow(this, "direction", getComputedStyle(this.#container).direction); } get _highlightColors() { return shadow(this, "_highlightColors", this.#highlightColors ? new Map(this.#highlightColors.split(",").map((pair) => { pair = pair.split("=").map((x$2) => x$2.trim()); pair[1] = pair[1].toUpperCase(); return pair; })) : null); } get highlightColors() { const { _highlightColors } = this; if (!_highlightColors) { return shadow(this, "highlightColors", null); } const map$2 = new Map(); const hasHCM = !!this.#pageColors; for (const [name, color] of _highlightColors) { const isNameForHCM = name.endsWith("_HCM"); if (hasHCM && isNameForHCM) { map$2.set(name.replace("_HCM", ""), color); continue; } if (!hasHCM && !isNameForHCM) { map$2.set(name, color); } } return shadow(this, "highlightColors", map$2); } get highlightColorNames() { return shadow(this, "highlightColorNames", this.highlightColors ? new Map(Array.from(this.highlightColors, (e$10) => e$10.reverse())) : null); } getNonHCMColor(color) { if (!this._highlightColors) { return color; } const colorName = this.highlightColorNames.get(color); return this._highlightColors.get(colorName) || color; } getNonHCMColorName(color) { return this.highlightColorNames.get(color) || color; } setCurrentDrawingSession(layer) { if (layer) { this.unselectAll(); this.disableUserSelect(true); } else { this.disableUserSelect(false); } this.#currentDrawingSession = layer; } setMainHighlightColorPicker(colorPicker) { this.#mainHighlightColorPicker = colorPicker; } editAltText(editor, firstTime = false) { this.#altTextManager?.editAltText(this, editor, firstTime); } hasCommentManager() { return !!this.#commentManager; } editComment(editor, posX, posY, options) { this.#commentManager?.showDialog(this, editor, posX, posY, options); } selectComment(pageIndex, uid) { const layer = this.#allLayers.get(pageIndex); const editor = layer?.getEditorByUID(uid); editor?.toggleComment(true, true); } updateComment(editor) { this.#commentManager?.updateComment(editor.getData()); } updatePopupColor(editor) { this.#commentManager?.updatePopupColor(editor); } removeComment(editor) { this.#commentManager?.removeComments([editor.uid]); } toggleComment(editor, isSelected, visibility = undefined) { this.#commentManager?.toggleCommentPopup(editor, isSelected, visibility); } makeCommentColor(color, opacity) { return color && this.#commentManager?.makeCommentColor(color, opacity) || null; } getCommentDialogElement() { return this.#commentManager?.dialogElement || null; } async waitForEditorsRendered(pageNumber) { if (this.#allLayers.has(pageNumber - 1)) { return; } const { resolve, promise } = Promise.withResolvers(); const onEditorsRendered = (evt) => { if (evt.pageNumber === pageNumber) { this._eventBus._off("editorsrendered", onEditorsRendered); resolve(); } }; this._eventBus.on("editorsrendered", onEditorsRendered); await promise; } getSignature(editor) { this.#signatureManager?.getSignature({ uiManager: this, editor }); } get signatureManager() { return this.#signatureManager; } switchToMode(mode, callback) { this._eventBus.on("annotationeditormodechanged", callback, { once: true, signal: this._signal }); this._eventBus.dispatch("showannotationeditorui", { source: this, mode }); } setPreference(name, value) { this._eventBus.dispatch("setpreference", { source: this, name, value }); } onSetPreference({ name, value }) { switch (name) { case "enableNewAltTextWhenAddingImage": this.#enableNewAltTextWhenAddingImage = value; break; } } onPageChanging({ pageNumber }) { this.#currentPageIndex = pageNumber - 1; } focusMainContainer() { this.#container.focus(); } findParent(x$2, y$3) { for (const layer of this.#allLayers.values()) { const { x: layerX, y: layerY, width, height } = layer.div.getBoundingClientRect(); if (x$2 >= layerX && x$2 <= layerX + width && y$3 >= layerY && y$3 <= layerY + height) { return layer; } } return null; } disableUserSelect(value = false) { this.#viewer.classList.toggle("noUserSelect", value); } addShouldRescale(editor) { this.#editorsToRescale.add(editor); } removeShouldRescale(editor) { this.#editorsToRescale.delete(editor); } onScaleChanging({ scale }) { this.commitOrRemove(); this.viewParameters.realScale = scale * PixelsPerInch.PDF_TO_CSS_UNITS; for (const editor of this.#editorsToRescale) { editor.onScaleChanging(); } this.#currentDrawingSession?.onScaleChanging(); } onRotationChanging({ pagesRotation }) { this.commitOrRemove(); this.viewParameters.rotation = pagesRotation; } #getAnchorElementForSelection({ anchorNode }) { return anchorNode.nodeType === Node.TEXT_NODE ? anchorNode.parentElement : anchorNode; } #getLayerForTextLayer(textLayer) { const { currentLayer } = this; if (currentLayer.hasTextLayer(textLayer)) { return currentLayer; } for (const layer of this.#allLayers.values()) { if (layer.hasTextLayer(textLayer)) { return layer; } } return null; } highlightSelection(methodOfCreation = "", comment = false) { const selection = document.getSelection(); if (!selection || selection.isCollapsed) { return; } const { anchorNode, anchorOffset, focusNode, focusOffset } = selection; const text$2 = selection.toString(); const anchorElement = this.#getAnchorElementForSelection(selection); const textLayer = anchorElement.closest(".textLayer"); const boxes = this.getSelectionBoxes(textLayer); if (!boxes) { return; } selection.empty(); const layer = this.#getLayerForTextLayer(textLayer); const isNoneMode = this.#mode === AnnotationEditorType.NONE; const callback = () => { const editor = layer?.createAndAddNewEditor({ x: 0, y: 0 }, false, { methodOfCreation, boxes, anchorNode, anchorOffset, focusNode, focusOffset, text: text$2 }); if (isNoneMode) { this.showAllEditors("highlight", true, true); } if (comment) { editor?.editComment(); } }; if (isNoneMode) { this.switchToMode(AnnotationEditorType.HIGHLIGHT, callback); return; } callback(); } commentSelection(methodOfCreation = "") { this.highlightSelection(methodOfCreation, true); } #displayFloatingToolbar() { const selection = document.getSelection(); if (!selection || selection.isCollapsed) { return; } const anchorElement = this.#getAnchorElementForSelection(selection); const textLayer = anchorElement.closest(".textLayer"); const boxes = this.getSelectionBoxes(textLayer); if (!boxes) { return; } this.#floatingToolbar ||= new FloatingToolbar(this); this.#floatingToolbar.show(textLayer, boxes, this.direction === "ltr"); } getAndRemoveDataFromAnnotationStorage(annotationId) { if (!this.#annotationStorage) { return null; } const key = `${AnnotationEditorPrefix}${annotationId}`; const storedValue = this.#annotationStorage.getRawValue(key); if (storedValue) { this.#annotationStorage.remove(key); } return storedValue; } addToAnnotationStorage(editor) { if (!editor.isEmpty() && this.#annotationStorage && !this.#annotationStorage.has(editor.id)) { this.#annotationStorage.setValue(editor.id, editor); } } a11yAlert(messageId, args = null) { const viewerAlert = this.#viewerAlert; if (!viewerAlert) { return; } viewerAlert.setAttribute("data-l10n-id", messageId); if (args) { viewerAlert.setAttribute("data-l10n-args", JSON.stringify(args)); } else { viewerAlert.removeAttribute("data-l10n-args"); } } #selectionChange() { const selection = document.getSelection(); if (!selection || selection.isCollapsed) { if (this.#selectedTextNode) { this.#floatingToolbar?.hide(); this.#selectedTextNode = null; this.#dispatchUpdateStates({ hasSelectedText: false }); } return; } const { anchorNode } = selection; if (anchorNode === this.#selectedTextNode) { return; } const anchorElement = this.#getAnchorElementForSelection(selection); const textLayer = anchorElement.closest(".textLayer"); if (!textLayer) { if (this.#selectedTextNode) { this.#floatingToolbar?.hide(); this.#selectedTextNode = null; this.#dispatchUpdateStates({ hasSelectedText: false }); } return; } this.#floatingToolbar?.hide(); this.#selectedTextNode = anchorNode; this.#dispatchUpdateStates({ hasSelectedText: true }); if (this.#mode !== AnnotationEditorType.HIGHLIGHT && this.#mode !== AnnotationEditorType.NONE) { return; } if (this.#mode === AnnotationEditorType.HIGHLIGHT) { this.showAllEditors("highlight", true, true); } this.#highlightWhenShiftUp = this.isShiftKeyDown; if (!this.isShiftKeyDown) { const activeLayer = this.#mode === AnnotationEditorType.HIGHLIGHT ? this.#getLayerForTextLayer(textLayer) : null; activeLayer?.toggleDrawing(); if (this.#isPointerDown) { const ac = new AbortController(); const signal = this.combinedSignal(ac); const pointerup = (e$10) => { if (e$10.type === "pointerup" && e$10.button !== 0) { return; } ac.abort(); activeLayer?.toggleDrawing(true); if (e$10.type === "pointerup") { this.#onSelectEnd("main_toolbar"); } }; window.addEventListener("pointerup", pointerup, { signal }); window.addEventListener("blur", pointerup, { signal }); } else { activeLayer?.toggleDrawing(true); this.#onSelectEnd("main_toolbar"); } } } #onSelectEnd(methodOfCreation = "") { if (this.#mode === AnnotationEditorType.HIGHLIGHT) { this.highlightSelection(methodOfCreation); } else if (this.#enableHighlightFloatingButton) { this.#displayFloatingToolbar(); } } #addSelectionListener() { document.addEventListener("selectionchange", this.#selectionChange.bind(this), { signal: this._signal }); } #addFocusManager() { if (this.#focusManagerAC) { return; } this.#focusManagerAC = new AbortController(); const signal = this.combinedSignal(this.#focusManagerAC); window.addEventListener("focus", this.focus.bind(this), { signal }); window.addEventListener("blur", this.blur.bind(this), { signal }); } #removeFocusManager() { this.#focusManagerAC?.abort(); this.#focusManagerAC = null; } blur() { this.isShiftKeyDown = false; if (this.#highlightWhenShiftUp) { this.#highlightWhenShiftUp = false; this.#onSelectEnd("main_toolbar"); } if (!this.hasSelection) { return; } const { activeElement } = document; for (const editor of this.#selectedEditors) { if (editor.div.contains(activeElement)) { this.#lastActiveElement = [editor, activeElement]; editor._focusEventsAllowed = false; break; } } } focus() { if (!this.#lastActiveElement) { return; } const [lastEditor, lastActiveElement] = this.#lastActiveElement; this.#lastActiveElement = null; lastActiveElement.addEventListener("focusin", () => { lastEditor._focusEventsAllowed = true; }, { once: true, signal: this._signal }); lastActiveElement.focus(); } #addKeyboardManager() { if (this.#keyboardManagerAC) { return; } this.#keyboardManagerAC = new AbortController(); const signal = this.combinedSignal(this.#keyboardManagerAC); window.addEventListener("keydown", this.keydown.bind(this), { signal }); window.addEventListener("keyup", this.keyup.bind(this), { signal }); } #removeKeyboardManager() { this.#keyboardManagerAC?.abort(); this.#keyboardManagerAC = null; } #addCopyPasteListeners() { if (this.#copyPasteAC) { return; } this.#copyPasteAC = new AbortController(); const signal = this.combinedSignal(this.#copyPasteAC); document.addEventListener("copy", this.copy.bind(this), { signal }); document.addEventListener("cut", this.cut.bind(this), { signal }); document.addEventListener("paste", this.paste.bind(this), { signal }); } #removeCopyPasteListeners() { this.#copyPasteAC?.abort(); this.#copyPasteAC = null; } #addDragAndDropListeners() { const signal = this._signal; document.addEventListener("dragover", this.dragOver.bind(this), { signal }); document.addEventListener("drop", this.drop.bind(this), { signal }); } addEditListeners() { this.#addKeyboardManager(); this.setEditingState(true); } removeEditListeners() { this.#removeKeyboardManager(); this.setEditingState(false); } dragOver(event) { for (const { type } of event.dataTransfer.items) { for (const editorType of this.#editorTypes) { if (editorType.isHandlingMimeForPasting(type)) { event.dataTransfer.dropEffect = "copy"; event.preventDefault(); return; } } } } drop(event) { for (const item of event.dataTransfer.items) { for (const editorType of this.#editorTypes) { if (editorType.isHandlingMimeForPasting(item.type)) { editorType.paste(item, this.currentLayer); event.preventDefault(); return; } } } } copy(event) { event.preventDefault(); this.#activeEditor?.commitOrRemove(); if (!this.hasSelection) { return; } const editors = []; for (const editor of this.#selectedEditors) { const serialized = editor.serialize(true); if (serialized) { editors.push(serialized); } } if (editors.length === 0) { return; } event.clipboardData.setData("application/pdfjs", JSON.stringify(editors)); } cut(event) { this.copy(event); this.delete(); } async paste(event) { event.preventDefault(); const { clipboardData } = event; for (const item of clipboardData.items) { for (const editorType of this.#editorTypes) { if (editorType.isHandlingMimeForPasting(item.type)) { editorType.paste(item, this.currentLayer); return; } } } let data = clipboardData.getData("application/pdfjs"); if (!data) { return; } try { data = JSON.parse(data); } catch (ex) { warn$2(`paste: "${ex.message}".`); return; } if (!Array.isArray(data)) { return; } this.unselectAll(); const layer = this.currentLayer; try { const newEditors = []; for (const editor of data) { const deserializedEditor = await layer.deserialize(editor); if (!deserializedEditor) { return; } newEditors.push(deserializedEditor); } const cmd = () => { for (const editor of newEditors) { this.#addEditorToLayer(editor); } this.#selectEditors(newEditors); }; const undo = () => { for (const editor of newEditors) { editor.remove(); } }; this.addCommands({ cmd, undo, mustExec: true }); } catch (ex) { warn$2(`paste: "${ex.message}".`); } } keydown(event) { if (!this.isShiftKeyDown && event.key === "Shift") { this.isShiftKeyDown = true; } if (this.#mode !== AnnotationEditorType.NONE && !this.isEditorHandlingKeyboard) { AnnotationEditorUIManager._keyboardManager.exec(this, event); } } keyup(event) { if (this.isShiftKeyDown && event.key === "Shift") { this.isShiftKeyDown = false; if (this.#highlightWhenShiftUp) { this.#highlightWhenShiftUp = false; this.#onSelectEnd("main_toolbar"); } } } onEditingAction({ name }) { switch (name) { case "undo": case "redo": case "delete": case "selectAll": this[name](); break; case "highlightSelection": this.highlightSelection("context_menu"); break; case "commentSelection": this.commentSelection("context_menu"); break; } } #dispatchUpdateStates(details) { const hasChanged = Object.entries(details).some(([key, value]) => this.#previousStates[key] !== value); if (hasChanged) { this._eventBus.dispatch("annotationeditorstateschanged", { source: this, details: Object.assign(this.#previousStates, details) }); if (this.#mode === AnnotationEditorType.HIGHLIGHT && details.hasSelectedEditor === false) { this.#dispatchUpdateUI([[AnnotationEditorParamsType.HIGHLIGHT_FREE, true]]); } } } #dispatchUpdateUI(details) { this._eventBus.dispatch("annotationeditorparamschanged", { source: this, details }); } setEditingState(isEditing) { if (isEditing) { this.#addFocusManager(); this.#addCopyPasteListeners(); this.#dispatchUpdateStates({ isEditing: this.#mode !== AnnotationEditorType.NONE, isEmpty: this.#isEmpty(), hasSomethingToUndo: this.#commandManager.hasSomethingToUndo(), hasSomethingToRedo: this.#commandManager.hasSomethingToRedo(), hasSelectedEditor: false }); } else { this.#removeFocusManager(); this.#removeCopyPasteListeners(); this.#dispatchUpdateStates({ isEditing: false }); this.disableUserSelect(false); } } registerEditorTypes(types) { if (this.#editorTypes) { return; } this.#editorTypes = types; for (const editorType of this.#editorTypes) { this.#dispatchUpdateUI(editorType.defaultPropertiesToUpdate); } } getId() { return this.#idManager.id; } get currentLayer() { return this.#allLayers.get(this.#currentPageIndex); } getLayer(pageIndex) { return this.#allLayers.get(pageIndex); } get currentPageIndex() { return this.#currentPageIndex; } addLayer(layer) { this.#allLayers.set(layer.pageIndex, layer); if (this.#isEnabled) { layer.enable(); } else { layer.disable(); } } removeLayer(layer) { this.#allLayers.delete(layer.pageIndex); } async updateMode(mode, editId = null, isFromKeyboard = false, mustEnterInEditMode = false, editComment = false) { if (this.#mode === mode) { return; } if (this.#updateModeCapability) { await this.#updateModeCapability.promise; if (!this.#updateModeCapability) { return; } } this.#updateModeCapability = Promise.withResolvers(); this.#currentDrawingSession?.commitOrRemove(); if (this.#mode === AnnotationEditorType.POPUP) { this.#commentManager?.hideSidebar(); } this.#commentManager?.destroyPopup(); this.#mode = mode; if (mode === AnnotationEditorType.NONE) { this.setEditingState(false); this.#disableAll(); for (const editor of this.#allEditors.values()) { editor.hideStandaloneCommentButton(); } this._editorUndoBar?.hide(); this.toggleComment(null); this.#updateModeCapability.resolve(); return; } for (const editor of this.#allEditors.values()) { editor.addStandaloneCommentButton(); } if (mode === AnnotationEditorType.SIGNATURE) { await this.#signatureManager?.loadSignatures(); } this.setEditingState(true); await this.#enableAll(); this.unselectAll(); for (const layer of this.#allLayers.values()) { layer.updateMode(mode); } if (mode === AnnotationEditorType.POPUP) { this.#allEditableAnnotations ||= await this.#pdfDocument.getAnnotationsByType(new Set(this.#editorTypes.map((editorClass) => editorClass._editorType))); const elementIds = new Set(); const allComments = []; for (const editor of this.#allEditors.values()) { const { annotationElementId, hasComment, deleted } = editor; if (annotationElementId) { elementIds.add(annotationElementId); } if (hasComment && !deleted) { allComments.push(editor.getData()); } } for (const annotation of this.#allEditableAnnotations) { const { id, popupRef, contentsObj } = annotation; if (popupRef && contentsObj?.str && !elementIds.has(id) && !this.#deletedAnnotationsElementIds.has(id)) { allComments.push(annotation); } } this.#commentManager?.showSidebar(allComments); } if (!editId) { if (isFromKeyboard) { this.addNewEditorFromKeyboard(); } this.#updateModeCapability.resolve(); return; } for (const editor of this.#allEditors.values()) { if (editor.uid === editId) { this.setSelected(editor); if (editComment) { editor.editComment(); } else if (mustEnterInEditMode) { editor.enterInEditMode(); } else { editor.focus(); } } else { editor.unselect(); } } this.#updateModeCapability.resolve(); } addNewEditorFromKeyboard() { if (this.currentLayer.canCreateNewEmptyEditor()) { this.currentLayer.addNewEditor(); } } updateToolbar(options) { if (options.mode === this.#mode) { return; } this._eventBus.dispatch("switchannotationeditormode", { source: this, ...options }); } updateParams(type, value) { if (!this.#editorTypes) { return; } switch (type) { case AnnotationEditorParamsType.CREATE: this.currentLayer.addNewEditor(value); return; case AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL: this._eventBus.dispatch("reporttelemetry", { source: this, details: { type: "editing", data: { type: "highlight", action: "toggle_visibility" } } }); (this.#showAllStates ||= new Map()).set(type, value); this.showAllEditors("highlight", value); break; } if (this.hasSelection) { for (const editor of this.#selectedEditors) { editor.updateParams(type, value); } } else { for (const editorType of this.#editorTypes) { editorType.updateDefaultParams(type, value); } } } showAllEditors(type, visible, updateButton = false) { for (const editor of this.#allEditors.values()) { if (editor.editorType === type) { editor.show(visible); } } const state$1 = this.#showAllStates?.get(AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL) ?? true; if (state$1 !== visible) { this.#dispatchUpdateUI([[AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL, visible]]); } } enableWaiting(mustWait = false) { if (this.#isWaiting === mustWait) { return; } this.#isWaiting = mustWait; for (const layer of this.#allLayers.values()) { if (mustWait) { layer.disableClick(); } else { layer.enableClick(); } layer.div.classList.toggle("waiting", mustWait); } } async #enableAll() { if (!this.#isEnabled) { this.#isEnabled = true; const promises = []; for (const layer of this.#allLayers.values()) { promises.push(layer.enable()); } await Promise.all(promises); for (const editor of this.#allEditors.values()) { editor.enable(); } } } #disableAll() { this.unselectAll(); if (this.#isEnabled) { this.#isEnabled = false; for (const layer of this.#allLayers.values()) { layer.disable(); } for (const editor of this.#allEditors.values()) { editor.disable(); } } } *getEditors(pageIndex) { for (const editor of this.#allEditors.values()) { if (editor.pageIndex === pageIndex) { yield editor; } } } getEditor(id) { return this.#allEditors.get(id); } addEditor(editor) { this.#allEditors.set(editor.id, editor); } removeEditor(editor) { if (editor.div.contains(document.activeElement)) { if (this.#focusMainContainerTimeoutId) { clearTimeout(this.#focusMainContainerTimeoutId); } this.#focusMainContainerTimeoutId = setTimeout(() => { this.focusMainContainer(); this.#focusMainContainerTimeoutId = null; }, 0); } this.#allEditors.delete(editor.id); if (editor.annotationElementId) { this.#missingCanvases?.delete(editor.annotationElementId); } this.unselect(editor); if (!editor.annotationElementId || !this.#deletedAnnotationsElementIds.has(editor.annotationElementId)) { this.#annotationStorage?.remove(editor.id); } } addDeletedAnnotationElement(editor) { this.#deletedAnnotationsElementIds.add(editor.annotationElementId); this.addChangedExistingAnnotation(editor); editor.deleted = true; } isDeletedAnnotationElement(annotationElementId) { return this.#deletedAnnotationsElementIds.has(annotationElementId); } removeDeletedAnnotationElement(editor) { this.#deletedAnnotationsElementIds.delete(editor.annotationElementId); this.removeChangedExistingAnnotation(editor); editor.deleted = false; } #addEditorToLayer(editor) { const layer = this.#allLayers.get(editor.pageIndex); if (layer) { layer.addOrRebuild(editor); } else { this.addEditor(editor); this.addToAnnotationStorage(editor); } } setActiveEditor(editor) { if (this.#activeEditor === editor) { return; } this.#activeEditor = editor; if (editor) { this.#dispatchUpdateUI(editor.propertiesToUpdate); } } get #lastSelectedEditor() { let ed = null; for (ed of this.#selectedEditors) {} return ed; } updateUI(editor) { if (this.#lastSelectedEditor === editor) { this.#dispatchUpdateUI(editor.propertiesToUpdate); } } updateUIForDefaultProperties(editorType) { this.#dispatchUpdateUI(editorType.defaultPropertiesToUpdate); } toggleSelected(editor) { if (this.#selectedEditors.has(editor)) { this.#selectedEditors.delete(editor); editor.unselect(); this.#dispatchUpdateStates({ hasSelectedEditor: this.hasSelection }); return; } this.#selectedEditors.add(editor); editor.select(); this.#dispatchUpdateUI(editor.propertiesToUpdate); this.#dispatchUpdateStates({ hasSelectedEditor: true }); } setSelected(editor) { this.updateToolbar({ mode: editor.mode, editId: editor.uid }); this.#currentDrawingSession?.commitOrRemove(); for (const ed of this.#selectedEditors) { if (ed !== editor) { ed.unselect(); } } this.#selectedEditors.clear(); this.#selectedEditors.add(editor); editor.select(); this.#dispatchUpdateUI(editor.propertiesToUpdate); this.#dispatchUpdateStates({ hasSelectedEditor: true }); } isSelected(editor) { return this.#selectedEditors.has(editor); } get firstSelectedEditor() { return this.#selectedEditors.values().next().value; } unselect(editor) { editor.unselect(); this.#selectedEditors.delete(editor); this.#dispatchUpdateStates({ hasSelectedEditor: this.hasSelection }); } get hasSelection() { return this.#selectedEditors.size !== 0; } get isEnterHandled() { return this.#selectedEditors.size === 1 && this.firstSelectedEditor.isEnterHandled; } undo() { this.#commandManager.undo(); this.#dispatchUpdateStates({ hasSomethingToUndo: this.#commandManager.hasSomethingToUndo(), hasSomethingToRedo: true, isEmpty: this.#isEmpty() }); this._editorUndoBar?.hide(); } redo() { this.#commandManager.redo(); this.#dispatchUpdateStates({ hasSomethingToUndo: true, hasSomethingToRedo: this.#commandManager.hasSomethingToRedo(), isEmpty: this.#isEmpty() }); } addCommands(params) { this.#commandManager.add(params); this.#dispatchUpdateStates({ hasSomethingToUndo: true, hasSomethingToRedo: false, isEmpty: this.#isEmpty() }); } cleanUndoStack(type) { this.#commandManager.cleanType(type); } #isEmpty() { if (this.#allEditors.size === 0) { return true; } if (this.#allEditors.size === 1) { for (const editor of this.#allEditors.values()) { return editor.isEmpty(); } } return false; } delete() { this.commitOrRemove(); const drawingEditor = this.currentLayer?.endDrawingSession(true); if (!this.hasSelection && !drawingEditor) { return; } const editors = drawingEditor ? [drawingEditor] : [...this.#selectedEditors]; const cmd = () => { this._editorUndoBar?.show(undo, editors.length === 1 ? editors[0].editorType : editors.length); for (const editor of editors) { editor.remove(); } }; const undo = () => { for (const editor of editors) { this.#addEditorToLayer(editor); } }; this.addCommands({ cmd, undo, mustExec: true }); } commitOrRemove() { this.#activeEditor?.commitOrRemove(); } hasSomethingToControl() { return this.#activeEditor || this.hasSelection; } #selectEditors(editors) { for (const editor of this.#selectedEditors) { editor.unselect(); } this.#selectedEditors.clear(); for (const editor of editors) { if (editor.isEmpty()) { continue; } this.#selectedEditors.add(editor); editor.select(); } this.#dispatchUpdateStates({ hasSelectedEditor: this.hasSelection }); } selectAll() { for (const editor of this.#selectedEditors) { editor.commit(); } this.#selectEditors(this.#allEditors.values()); } unselectAll() { if (this.#activeEditor) { this.#activeEditor.commitOrRemove(); if (this.#mode !== AnnotationEditorType.NONE) { return; } } if (this.#currentDrawingSession?.commitOrRemove()) { return; } if (!this.hasSelection) { return; } for (const editor of this.#selectedEditors) { editor.unselect(); } this.#selectedEditors.clear(); this.#dispatchUpdateStates({ hasSelectedEditor: false }); } translateSelectedEditors(x$2, y$3, noCommit = false) { if (!noCommit) { this.commitOrRemove(); } if (!this.hasSelection) { return; } this.#translation[0] += x$2; this.#translation[1] += y$3; const [totalX, totalY] = this.#translation; const editors = [...this.#selectedEditors]; const TIME_TO_WAIT = 1e3; if (this.#translationTimeoutId) { clearTimeout(this.#translationTimeoutId); } this.#translationTimeoutId = setTimeout(() => { this.#translationTimeoutId = null; this.#translation[0] = this.#translation[1] = 0; this.addCommands({ cmd: () => { for (const editor of editors) { if (this.#allEditors.has(editor.id)) { editor.translateInPage(totalX, totalY); editor.translationDone(); } } }, undo: () => { for (const editor of editors) { if (this.#allEditors.has(editor.id)) { editor.translateInPage(-totalX, -totalY); editor.translationDone(); } } }, mustExec: false }); }, TIME_TO_WAIT); for (const editor of editors) { editor.translateInPage(x$2, y$3); editor.translationDone(); } } setUpDragSession() { if (!this.hasSelection) { return; } this.disableUserSelect(true); this.#draggingEditors = new Map(); for (const editor of this.#selectedEditors) { this.#draggingEditors.set(editor, { savedX: editor.x, savedY: editor.y, savedPageIndex: editor.pageIndex, newX: 0, newY: 0, newPageIndex: -1 }); } } endDragSession() { if (!this.#draggingEditors) { return false; } this.disableUserSelect(false); const map$2 = this.#draggingEditors; this.#draggingEditors = null; let mustBeAddedInUndoStack = false; for (const [{ x: x$2, y: y$3, pageIndex }, value] of map$2) { value.newX = x$2; value.newY = y$3; value.newPageIndex = pageIndex; mustBeAddedInUndoStack ||= x$2 !== value.savedX || y$3 !== value.savedY || pageIndex !== value.savedPageIndex; } if (!mustBeAddedInUndoStack) { return false; } const move = (editor, x$2, y$3, pageIndex) => { if (this.#allEditors.has(editor.id)) { const parent = this.#allLayers.get(pageIndex); if (parent) { editor._setParentAndPosition(parent, x$2, y$3); } else { editor.pageIndex = pageIndex; editor.x = x$2; editor.y = y$3; } } }; this.addCommands({ cmd: () => { for (const [editor, { newX, newY, newPageIndex }] of map$2) { move(editor, newX, newY, newPageIndex); } }, undo: () => { for (const [editor, { savedX, savedY, savedPageIndex }] of map$2) { move(editor, savedX, savedY, savedPageIndex); } }, mustExec: true }); return true; } dragSelectedEditors(tx, ty) { if (!this.#draggingEditors) { return; } for (const editor of this.#draggingEditors.keys()) { editor.drag(tx, ty); } } rebuild(editor) { if (editor.parent === null) { const parent = this.getLayer(editor.pageIndex); if (parent) { parent.changeParent(editor); parent.addOrRebuild(editor); } else { this.addEditor(editor); this.addToAnnotationStorage(editor); editor.rebuild(); } } else { editor.parent.addOrRebuild(editor); } } get isEditorHandlingKeyboard() { return this.getActive()?.shouldGetKeyboardEvents() || this.#selectedEditors.size === 1 && this.firstSelectedEditor.shouldGetKeyboardEvents(); } isActive(editor) { return this.#activeEditor === editor; } getActive() { return this.#activeEditor; } getMode() { return this.#mode; } isEditingMode() { return this.#mode !== AnnotationEditorType.NONE; } get imageManager() { return shadow(this, "imageManager", new ImageManager()); } getSelectionBoxes(textLayer) { if (!textLayer) { return null; } const selection = document.getSelection(); for (let i$7 = 0, ii = selection.rangeCount; i$7 < ii; i$7++) { if (!textLayer.contains(selection.getRangeAt(i$7).commonAncestorContainer)) { return null; } } const { x: layerX, y: layerY, width: parentWidth, height: parentHeight } = textLayer.getBoundingClientRect(); let rotator; switch (textLayer.getAttribute("data-main-rotation")) { case "90": rotator = (x$2, y$3, w$2, h$5) => ({ x: (y$3 - layerY) / parentHeight, y: 1 - (x$2 + w$2 - layerX) / parentWidth, width: h$5 / parentHeight, height: w$2 / parentWidth }); break; case "180": rotator = (x$2, y$3, w$2, h$5) => ({ x: 1 - (x$2 + w$2 - layerX) / parentWidth, y: 1 - (y$3 + h$5 - layerY) / parentHeight, width: w$2 / parentWidth, height: h$5 / parentHeight }); break; case "270": rotator = (x$2, y$3, w$2, h$5) => ({ x: 1 - (y$3 + h$5 - layerY) / parentHeight, y: (x$2 - layerX) / parentWidth, width: h$5 / parentHeight, height: w$2 / parentWidth }); break; default: rotator = (x$2, y$3, w$2, h$5) => ({ x: (x$2 - layerX) / parentWidth, y: (y$3 - layerY) / parentHeight, width: w$2 / parentWidth, height: h$5 / parentHeight }); break; } const boxes = []; for (let i$7 = 0, ii = selection.rangeCount; i$7 < ii; i$7++) { const range = selection.getRangeAt(i$7); if (range.collapsed) { continue; } for (const { x: x$2, y: y$3, width, height } of range.getClientRects()) { if (width === 0 || height === 0) { continue; } boxes.push(rotator(x$2, y$3, width, height)); } } return boxes.length === 0 ? null : boxes; } addChangedExistingAnnotation({ annotationElementId, id }) { (this.#changedExistingAnnotations ||= new Map()).set(annotationElementId, id); } removeChangedExistingAnnotation({ annotationElementId }) { this.#changedExistingAnnotations?.delete(annotationElementId); } renderAnnotationElement(annotation) { const editorId = this.#changedExistingAnnotations?.get(annotation.data.id); if (!editorId) { return; } const editor = this.#annotationStorage.getRawValue(editorId); if (!editor) { return; } if (this.#mode === AnnotationEditorType.NONE && !editor.hasBeenModified) { return; } editor.renderAnnotationElement(annotation); } setMissingCanvas(annotationId, annotationElementId, canvas) { const editor = this.#missingCanvases?.get(annotationId); if (!editor) { return; } editor.setCanvas(annotationElementId, canvas); this.#missingCanvases.delete(annotationId); } addMissingCanvas(annotationId, editor) { (this.#missingCanvases ||= new Map()).set(annotationId, editor); } }; ; AltText = class AltText { #altText = null; #altTextDecorative = false; #altTextButton = null; #altTextButtonLabel = null; #altTextTooltip = null; #altTextTooltipTimeout = null; #altTextWasFromKeyBoard = false; #badge = null; #editor = null; #guessedText = null; #textWithDisclaimer = null; #useNewAltTextFlow = false; static #l10nNewButton = null; static _l10n = null; constructor(editor) { this.#editor = editor; this.#useNewAltTextFlow = editor._uiManager.useNewAltTextFlow; AltText.#l10nNewButton ||= Object.freeze({ added: "pdfjs-editor-new-alt-text-added-button", "added-label": "pdfjs-editor-new-alt-text-added-button-label", missing: "pdfjs-editor-new-alt-text-missing-button", "missing-label": "pdfjs-editor-new-alt-text-missing-button-label", review: "pdfjs-editor-new-alt-text-to-review-button", "review-label": "pdfjs-editor-new-alt-text-to-review-button-label" }); } static initialize(l10n) { AltText._l10n ??= l10n; } async render() { const altText = this.#altTextButton = document.createElement("button"); altText.className = "altText"; altText.tabIndex = "0"; const label = this.#altTextButtonLabel = document.createElement("span"); altText.append(label); if (this.#useNewAltTextFlow) { altText.classList.add("new"); altText.setAttribute("data-l10n-id", AltText.#l10nNewButton.missing); label.setAttribute("data-l10n-id", AltText.#l10nNewButton["missing-label"]); } else { altText.setAttribute("data-l10n-id", "pdfjs-editor-alt-text-button"); label.setAttribute("data-l10n-id", "pdfjs-editor-alt-text-button-label"); } const signal = this.#editor._uiManager._signal; altText.addEventListener("contextmenu", noContextMenu, { signal }); altText.addEventListener("pointerdown", (event) => event.stopPropagation(), { signal }); const onClick = (event) => { event.preventDefault(); this.#editor._uiManager.editAltText(this.#editor); if (this.#useNewAltTextFlow) { this.#editor._reportTelemetry({ action: "pdfjs.image.alt_text.image_status_label_clicked", data: { label: this.#label } }); } }; altText.addEventListener("click", onClick, { capture: true, signal }); altText.addEventListener("keydown", (event) => { if (event.target === altText && event.key === "Enter") { this.#altTextWasFromKeyBoard = true; onClick(event); } }, { signal }); await this.#setState(); return altText; } get #label() { return this.#altText && "added" || this.#altText === null && this.guessedText && "review" || "missing"; } finish() { if (!this.#altTextButton) { return; } this.#altTextButton.focus({ focusVisible: this.#altTextWasFromKeyBoard }); this.#altTextWasFromKeyBoard = false; } isEmpty() { if (this.#useNewAltTextFlow) { return this.#altText === null; } return !this.#altText && !this.#altTextDecorative; } hasData() { if (this.#useNewAltTextFlow) { return this.#altText !== null || !!this.#guessedText; } return this.isEmpty(); } get guessedText() { return this.#guessedText; } async setGuessedText(guessedText) { if (this.#altText !== null) { return; } this.#guessedText = guessedText; this.#textWithDisclaimer = await AltText._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer", { generatedAltText: guessedText }); this.#setState(); } toggleAltTextBadge(visibility = false) { if (!this.#useNewAltTextFlow || this.#altText) { this.#badge?.remove(); this.#badge = null; return; } if (!this.#badge) { const badge = this.#badge = document.createElement("div"); badge.className = "noAltTextBadge"; this.#editor.div.append(badge); } this.#badge.classList.toggle("hidden", !visibility); } serialize(isForCopying) { let altText = this.#altText; if (!isForCopying && this.#guessedText === altText) { altText = this.#textWithDisclaimer; } return { altText, decorative: this.#altTextDecorative, guessedText: this.#guessedText, textWithDisclaimer: this.#textWithDisclaimer }; } get data() { return { altText: this.#altText, decorative: this.#altTextDecorative }; } set data({ altText, decorative, guessedText, textWithDisclaimer, cancel = false }) { if (guessedText) { this.#guessedText = guessedText; this.#textWithDisclaimer = textWithDisclaimer; } if (this.#altText === altText && this.#altTextDecorative === decorative) { return; } if (!cancel) { this.#altText = altText; this.#altTextDecorative = decorative; } this.#setState(); } toggle(enabled = false) { if (!this.#altTextButton) { return; } if (!enabled && this.#altTextTooltipTimeout) { clearTimeout(this.#altTextTooltipTimeout); this.#altTextTooltipTimeout = null; } this.#altTextButton.disabled = !enabled; } shown() { this.#editor._reportTelemetry({ action: "pdfjs.image.alt_text.image_status_label_displayed", data: { label: this.#label } }); } destroy() { this.#altTextButton?.remove(); this.#altTextButton = null; this.#altTextButtonLabel = null; this.#altTextTooltip = null; this.#badge?.remove(); this.#badge = null; } async #setState() { const button = this.#altTextButton; if (!button) { return; } if (this.#useNewAltTextFlow) { button.classList.toggle("done", !!this.#altText); button.setAttribute("data-l10n-id", AltText.#l10nNewButton[this.#label]); this.#altTextButtonLabel?.setAttribute("data-l10n-id", AltText.#l10nNewButton[`${this.#label}-label`]); if (!this.#altText) { this.#altTextTooltip?.remove(); return; } } else { if (!this.#altText && !this.#altTextDecorative) { button.classList.remove("done"); this.#altTextTooltip?.remove(); return; } button.classList.add("done"); button.setAttribute("data-l10n-id", "pdfjs-editor-alt-text-edit-button"); } let tooltip = this.#altTextTooltip; if (!tooltip) { this.#altTextTooltip = tooltip = document.createElement("span"); tooltip.className = "tooltip"; tooltip.setAttribute("role", "tooltip"); tooltip.id = `alt-text-tooltip-${this.#editor.id}`; const DELAY_TO_SHOW_TOOLTIP = 100; const signal = this.#editor._uiManager._signal; signal.addEventListener("abort", () => { clearTimeout(this.#altTextTooltipTimeout); this.#altTextTooltipTimeout = null; }, { once: true }); button.addEventListener("mouseenter", () => { this.#altTextTooltipTimeout = setTimeout(() => { this.#altTextTooltipTimeout = null; this.#altTextTooltip.classList.add("show"); this.#editor._reportTelemetry({ action: "alt_text_tooltip" }); }, DELAY_TO_SHOW_TOOLTIP); }, { signal }); button.addEventListener("mouseleave", () => { if (this.#altTextTooltipTimeout) { clearTimeout(this.#altTextTooltipTimeout); this.#altTextTooltipTimeout = null; } this.#altTextTooltip?.classList.remove("show"); }, { signal }); } if (this.#altTextDecorative) { tooltip.setAttribute("data-l10n-id", "pdfjs-editor-alt-text-decorative-tooltip"); } else { tooltip.removeAttribute("data-l10n-id"); tooltip.textContent = this.#altText; } if (!tooltip.parentNode) { button.append(tooltip); } const element = this.#editor.getElementForAltText(); element?.setAttribute("aria-describedby", tooltip.id); } }; ; Comment = class { #commentStandaloneButton = null; #commentToolbarButton = null; #commentWasFromKeyBoard = false; #editor = null; #initialText = null; #richText = null; #text = null; #date = null; #deleted = false; #popupPosition = null; constructor(editor) { this.#editor = editor; } renderForToolbar() { const button = this.#commentToolbarButton = document.createElement("button"); button.className = "comment"; return this.#render(button, false); } renderForStandalone() { const button = this.#commentStandaloneButton = document.createElement("button"); button.className = "annotationCommentButton"; const position = this.#editor.commentButtonPosition; if (position) { const { style } = button; style.insetInlineEnd = `calc(${100 * (this.#editor._uiManager.direction === "ltr" ? 1 - position[0] : position[0])}% - var(--comment-button-dim))`; style.top = `calc(${100 * position[1]}% - var(--comment-button-dim))`; const color = this.#editor.commentButtonColor; if (color) { style.backgroundColor = color; } } return this.#render(button, true); } focusButton() { setTimeout(() => { (this.#commentStandaloneButton ?? this.#commentToolbarButton)?.focus(); }, 0); } onUpdatedColor() { if (!this.#commentStandaloneButton) { return; } const color = this.#editor.commentButtonColor; if (color) { this.#commentStandaloneButton.style.backgroundColor = color; } this.#editor._uiManager.updatePopupColor(this.#editor); } get commentButtonWidth() { return (this.#commentStandaloneButton?.getBoundingClientRect().width ?? 0) / this.#editor.parent.boundingClientRect.width; } get commentPopupPositionInLayer() { if (this.#popupPosition) { return this.#popupPosition; } if (!this.#commentStandaloneButton) { return null; } const { x: x$2, y: y$3, height } = this.#commentStandaloneButton.getBoundingClientRect(); const { x: parentX, y: parentY, width: parentWidth, height: parentHeight } = this.#editor.parent.boundingClientRect; return [(x$2 - parentX) / parentWidth, (y$3 + height - parentY) / parentHeight]; } set commentPopupPositionInLayer(pos) { this.#popupPosition = pos; } hasDefaultPopupPosition() { return this.#popupPosition === null; } removeStandaloneCommentButton() { this.#commentStandaloneButton?.remove(); this.#commentStandaloneButton = null; } removeToolbarCommentButton() { this.#commentToolbarButton?.remove(); this.#commentToolbarButton = null; } setCommentButtonStates({ selected, hasPopup }) { if (!this.#commentStandaloneButton) { return; } this.#commentStandaloneButton.classList.toggle("selected", selected); this.#commentStandaloneButton.ariaExpanded = hasPopup; } #render(comment, isStandalone) { if (!this.#editor._uiManager.hasCommentManager()) { return null; } comment.tabIndex = "0"; comment.ariaHasPopup = "dialog"; if (isStandalone) { comment.ariaControls = "commentPopup"; comment.setAttribute("data-l10n-id", "pdfjs-show-comment-button"); } else { comment.ariaControlsElements = [this.#editor._uiManager.getCommentDialogElement()]; comment.setAttribute("data-l10n-id", "pdfjs-editor-add-comment-button"); } const signal = this.#editor._uiManager._signal; if (!(signal instanceof AbortSignal) || signal.aborted) { return comment; } comment.addEventListener("contextmenu", noContextMenu, { signal }); if (isStandalone) { comment.addEventListener("focusin", (e$10) => { this.#editor._focusEventsAllowed = false; stopEvent(e$10); }, { capture: true, signal }); comment.addEventListener("focusout", (e$10) => { this.#editor._focusEventsAllowed = true; stopEvent(e$10); }, { capture: true, signal }); } comment.addEventListener("pointerdown", (event) => event.stopPropagation(), { signal }); const onClick = (event) => { event.preventDefault(); if (comment === this.#commentToolbarButton) { this.edit(); } else { this.#editor.toggleComment(true); } }; comment.addEventListener("click", onClick, { capture: true, signal }); comment.addEventListener("keydown", (event) => { if (event.target === comment && event.key === "Enter") { this.#commentWasFromKeyBoard = true; onClick(event); } }, { signal }); comment.addEventListener("pointerenter", () => { this.#editor.toggleComment(false, true); }, { signal }); comment.addEventListener("pointerleave", () => { this.#editor.toggleComment(false, false); }, { signal }); return comment; } edit(options) { const position = this.commentPopupPositionInLayer; let posX, posY; if (position) { [posX, posY] = position; } else { [posX, posY] = this.#editor.commentButtonPosition; const { width, height, x: x$2, y: y$3 } = this.#editor; posX = x$2 + posX * width; posY = y$3 + posY * height; } const parentDimensions = this.#editor.parent.boundingClientRect; const { x: parentX, y: parentY, width: parentWidth, height: parentHeight } = parentDimensions; this.#editor._uiManager.editComment(this.#editor, parentX + posX * parentWidth, parentY + posY * parentHeight, { ...options, parentDimensions }); } finish() { if (!this.#commentToolbarButton) { return; } this.#commentToolbarButton.focus({ focusVisible: this.#commentWasFromKeyBoard }); this.#commentWasFromKeyBoard = false; } isDeleted() { return this.#deleted || this.#text === ""; } isEmpty() { return this.#text === null; } hasBeenEdited() { return this.isDeleted() || this.#text !== this.#initialText; } serialize() { return this.data; } get data() { return { text: this.#text, richText: this.#richText, date: this.#date, deleted: this.isDeleted() }; } set data(text$2) { if (text$2 !== this.#text) { this.#richText = null; } if (text$2 === null) { this.#text = ""; this.#deleted = true; return; } this.#text = text$2; this.#date = new Date(); this.#deleted = false; } setInitialText(text$2, richText = null) { this.#initialText = text$2; this.data = text$2; this.#date = null; this.#richText = richText; } shown() {} destroy() { this.#commentToolbarButton?.remove(); this.#commentToolbarButton = null; this.#commentStandaloneButton?.remove(); this.#commentStandaloneButton = null; this.#text = ""; this.#richText = null; this.#date = null; this.#editor = null; this.#commentWasFromKeyBoard = false; this.#deleted = false; } }; ; TouchManager = class TouchManager { #container; #isPinching = false; #isPinchingStopped = null; #isPinchingDisabled; #onPinchStart; #onPinching; #onPinchEnd; #pointerDownAC = null; #signal; #touchInfo = null; #touchManagerAC; #touchMoveAC = null; constructor({ container, isPinchingDisabled = null, isPinchingStopped = null, onPinchStart = null, onPinching = null, onPinchEnd = null, signal }) { this.#container = container; this.#isPinchingStopped = isPinchingStopped; this.#isPinchingDisabled = isPinchingDisabled; this.#onPinchStart = onPinchStart; this.#onPinching = onPinching; this.#onPinchEnd = onPinchEnd; this.#touchManagerAC = new AbortController(); this.#signal = AbortSignal.any([signal, this.#touchManagerAC.signal]); container.addEventListener("touchstart", this.#onTouchStart.bind(this), { passive: false, signal: this.#signal }); } get MIN_TOUCH_DISTANCE_TO_PINCH() { return 35 / OutputScale.pixelRatio; } #onTouchStart(evt) { if (this.#isPinchingDisabled?.()) { return; } if (evt.touches.length === 1) { if (this.#pointerDownAC) { return; } const pointerDownAC = this.#pointerDownAC = new AbortController(); const signal = AbortSignal.any([this.#signal, pointerDownAC.signal]); const container = this.#container; const opts = { capture: true, signal, passive: false }; const cancelPointerDown = (e$10) => { if (e$10.pointerType === "touch") { this.#pointerDownAC?.abort(); this.#pointerDownAC = null; } }; container.addEventListener("pointerdown", (e$10) => { if (e$10.pointerType === "touch") { stopEvent(e$10); cancelPointerDown(e$10); } }, opts); container.addEventListener("pointerup", cancelPointerDown, opts); container.addEventListener("pointercancel", cancelPointerDown, opts); return; } if (!this.#touchMoveAC) { this.#touchMoveAC = new AbortController(); const signal = AbortSignal.any([this.#signal, this.#touchMoveAC.signal]); const container = this.#container; const opt = { signal, capture: false, passive: false }; container.addEventListener("touchmove", this.#onTouchMove.bind(this), opt); const onTouchEnd = this.#onTouchEnd.bind(this); container.addEventListener("touchend", onTouchEnd, opt); container.addEventListener("touchcancel", onTouchEnd, opt); opt.capture = true; container.addEventListener("pointerdown", stopEvent, opt); container.addEventListener("pointermove", stopEvent, opt); container.addEventListener("pointercancel", stopEvent, opt); container.addEventListener("pointerup", stopEvent, opt); this.#onPinchStart?.(); } stopEvent(evt); if (evt.touches.length !== 2 || this.#isPinchingStopped?.()) { this.#touchInfo = null; return; } let [touch0, touch1] = evt.touches; if (touch0.identifier > touch1.identifier) { [touch0, touch1] = [touch1, touch0]; } this.#touchInfo = { touch0X: touch0.screenX, touch0Y: touch0.screenY, touch1X: touch1.screenX, touch1Y: touch1.screenY }; } #onTouchMove(evt) { if (!this.#touchInfo || evt.touches.length !== 2) { return; } stopEvent(evt); let [touch0, touch1] = evt.touches; if (touch0.identifier > touch1.identifier) { [touch0, touch1] = [touch1, touch0]; } const { screenX: screen0X, screenY: screen0Y } = touch0; const { screenX: screen1X, screenY: screen1Y } = touch1; const touchInfo = this.#touchInfo; const { touch0X: pTouch0X, touch0Y: pTouch0Y, touch1X: pTouch1X, touch1Y: pTouch1Y } = touchInfo; const prevGapX = pTouch1X - pTouch0X; const prevGapY = pTouch1Y - pTouch0Y; const currGapX = screen1X - screen0X; const currGapY = screen1Y - screen0Y; const distance = Math.hypot(currGapX, currGapY) || 1; const pDistance = Math.hypot(prevGapX, prevGapY) || 1; if (!this.#isPinching && Math.abs(pDistance - distance) <= TouchManager.MIN_TOUCH_DISTANCE_TO_PINCH) { return; } touchInfo.touch0X = screen0X; touchInfo.touch0Y = screen0Y; touchInfo.touch1X = screen1X; touchInfo.touch1Y = screen1Y; if (!this.#isPinching) { this.#isPinching = true; return; } const origin = [(screen0X + screen1X) / 2, (screen0Y + screen1Y) / 2]; this.#onPinching?.(origin, pDistance, distance); } #onTouchEnd(evt) { if (evt.touches.length >= 2) { return; } if (this.#touchMoveAC) { this.#touchMoveAC.abort(); this.#touchMoveAC = null; this.#onPinchEnd?.(); } if (!this.#touchInfo) { return; } stopEvent(evt); this.#touchInfo = null; this.#isPinching = false; } destroy() { this.#touchManagerAC?.abort(); this.#touchManagerAC = null; this.#pointerDownAC?.abort(); this.#pointerDownAC = null; } }; ; AnnotationEditor = class AnnotationEditor { #accessibilityData = null; #allResizerDivs = null; #altText = null; #comment = null; #commentStandaloneButton = null; #disabled = false; #dragPointerId = null; #dragPointerType = ""; #resizersDiv = null; #lastPointerCoords = null; #savedDimensions = null; #fakeAnnotation = null; #focusAC = null; #focusedResizerName = ""; #hasBeenClicked = false; #initialRect = null; #isEditing = false; #isInEditMode = false; #isResizerEnabledForKeyboard = false; #moveInDOMTimeout = null; #prevDragX = 0; #prevDragY = 0; #telemetryTimeouts = null; #touchManager = null; isSelected = false; _isCopy = false; _editToolbar = null; _initialOptions = Object.create(null); _initialData = null; _isVisible = true; _uiManager = null; _focusEventsAllowed = true; static _l10n = null; static _l10nResizer = null; #isDraggable = false; #zIndex = AnnotationEditor._zIndex++; static _borderLineWidth = -1; static _colorManager = new ColorManager(); static _zIndex = 1; static _telemetryTimeout = 1e3; static get _resizerKeyboardManager() { const resize = AnnotationEditor.prototype._resizeWithKeyboard; const small = AnnotationEditorUIManager.TRANSLATE_SMALL; const big = AnnotationEditorUIManager.TRANSLATE_BIG; return shadow(this, "_resizerKeyboardManager", new KeyboardManager([ [ ["ArrowLeft", "mac+ArrowLeft"], resize, { args: [-small, 0] } ], [ ["ctrl+ArrowLeft", "mac+shift+ArrowLeft"], resize, { args: [-big, 0] } ], [ ["ArrowRight", "mac+ArrowRight"], resize, { args: [small, 0] } ], [ ["ctrl+ArrowRight", "mac+shift+ArrowRight"], resize, { args: [big, 0] } ], [ ["ArrowUp", "mac+ArrowUp"], resize, { args: [0, -small] } ], [ ["ctrl+ArrowUp", "mac+shift+ArrowUp"], resize, { args: [0, -big] } ], [ ["ArrowDown", "mac+ArrowDown"], resize, { args: [0, small] } ], [ ["ctrl+ArrowDown", "mac+shift+ArrowDown"], resize, { args: [0, big] } ], [["Escape", "mac+Escape"], AnnotationEditor.prototype._stopResizingWithKeyboard] ])); } constructor(parameters) { this.parent = parameters.parent; this.id = parameters.id; this.width = this.height = null; this.pageIndex = parameters.parent.pageIndex; this.name = parameters.name; this.div = null; this._uiManager = parameters.uiManager; this.annotationElementId = null; this._willKeepAspectRatio = false; this._initialOptions.isCentered = parameters.isCentered; this._structTreeParentId = null; this.annotationElementId = parameters.annotationElementId || null; this.creationDate = parameters.creationDate || new Date(); this.modificationDate = parameters.modificationDate || null; this.canAddComment = true; const { rotation, rawDims: { pageWidth, pageHeight, pageX, pageY } } = this.parent.viewport; this.rotation = rotation; this.pageRotation = (360 + rotation - this._uiManager.viewParameters.rotation) % 360; this.pageDimensions = [pageWidth, pageHeight]; this.pageTranslation = [pageX, pageY]; const [width, height] = this.parentDimensions; this.x = parameters.x / width; this.y = parameters.y / height; this.isAttachedToDOM = false; this.deleted = false; } get editorType() { return Object.getPrototypeOf(this).constructor._type; } get mode() { return Object.getPrototypeOf(this).constructor._editorType; } static get isDrawer() { return false; } static get _defaultLineColor() { return shadow(this, "_defaultLineColor", this._colorManager.getHexCode("CanvasText")); } static deleteAnnotationElement(editor) { const fakeEditor = new FakeEditor({ id: editor.parent.getNextId(), parent: editor.parent, uiManager: editor._uiManager }); fakeEditor.annotationElementId = editor.annotationElementId; fakeEditor.deleted = true; fakeEditor._uiManager.addToAnnotationStorage(fakeEditor); } static initialize(l10n, _uiManager) { AnnotationEditor._l10n ??= l10n; AnnotationEditor._l10nResizer ||= Object.freeze({ topLeft: "pdfjs-editor-resizer-top-left", topMiddle: "pdfjs-editor-resizer-top-middle", topRight: "pdfjs-editor-resizer-top-right", middleRight: "pdfjs-editor-resizer-middle-right", bottomRight: "pdfjs-editor-resizer-bottom-right", bottomMiddle: "pdfjs-editor-resizer-bottom-middle", bottomLeft: "pdfjs-editor-resizer-bottom-left", middleLeft: "pdfjs-editor-resizer-middle-left" }); if (AnnotationEditor._borderLineWidth !== -1) { return; } const style = getComputedStyle(document.documentElement); AnnotationEditor._borderLineWidth = parseFloat(style.getPropertyValue("--outline-width")) || 0; } static updateDefaultParams(_type, _value) {} static get defaultPropertiesToUpdate() { return []; } static isHandlingMimeForPasting(mime) { return false; } static paste(item, parent) { unreachable("Not implemented"); } get propertiesToUpdate() { return []; } get _isDraggable() { return this.#isDraggable; } set _isDraggable(value) { this.#isDraggable = value; this.div?.classList.toggle("draggable", value); } get uid() { return this.annotationElementId || this.id; } get isEnterHandled() { return true; } center() { const [pageWidth, pageHeight] = this.pageDimensions; switch (this.parentRotation) { case 90: this.x -= this.height * pageHeight / (pageWidth * 2); this.y += this.width * pageWidth / (pageHeight * 2); break; case 180: this.x += this.width / 2; this.y += this.height / 2; break; case 270: this.x += this.height * pageHeight / (pageWidth * 2); this.y -= this.width * pageWidth / (pageHeight * 2); break; default: this.x -= this.width / 2; this.y -= this.height / 2; break; } this.fixAndSetPosition(); } addCommands(params) { this._uiManager.addCommands(params); } get currentLayer() { return this._uiManager.currentLayer; } setInBackground() { this.div.style.zIndex = 0; } setInForeground() { this.div.style.zIndex = this.#zIndex; } setParent(parent) { if (parent !== null) { this.pageIndex = parent.pageIndex; this.pageDimensions = parent.pageDimensions; } else { this.#stopResizing(); this.#fakeAnnotation?.remove(); this.#fakeAnnotation = null; } this.parent = parent; } focusin(event) { if (!this._focusEventsAllowed) { return; } if (!this.#hasBeenClicked) { this.parent.setSelected(this); } else { this.#hasBeenClicked = false; } } focusout(event) { if (!this._focusEventsAllowed) { return; } if (!this.isAttachedToDOM) { return; } const target = event.relatedTarget; if (target?.closest(`#${this.id}`)) { return; } event.preventDefault(); if (!this.parent?.isMultipleSelection) { this.commitOrRemove(); } } commitOrRemove() { if (this.isEmpty()) { this.remove(); } else { this.commit(); } } commit() { if (!this.isInEditMode()) { return; } this.addToAnnotationStorage(); } addToAnnotationStorage() { this._uiManager.addToAnnotationStorage(this); } setAt(x$2, y$3, tx, ty) { const [width, height] = this.parentDimensions; [tx, ty] = this.screenToPageTranslation(tx, ty); this.x = (x$2 + tx) / width; this.y = (y$3 + ty) / height; this.fixAndSetPosition(); } _moveAfterPaste(baseX, baseY) { const [parentWidth, parentHeight] = this.parentDimensions; this.setAt(baseX * parentWidth, baseY * parentHeight, this.width * parentWidth, this.height * parentHeight); this._onTranslated(); } #translate([width, height], x$2, y$3) { [x$2, y$3] = this.screenToPageTranslation(x$2, y$3); this.x += x$2 / width; this.y += y$3 / height; this._onTranslating(this.x, this.y); this.fixAndSetPosition(); } translate(x$2, y$3) { this.#translate(this.parentDimensions, x$2, y$3); } translateInPage(x$2, y$3) { this.#initialRect ||= [ this.x, this.y, this.width, this.height ]; this.#translate(this.pageDimensions, x$2, y$3); this.div.scrollIntoView({ block: "nearest" }); } translationDone() { this._onTranslated(this.x, this.y); } drag(tx, ty) { this.#initialRect ||= [ this.x, this.y, this.width, this.height ]; const { div, parentDimensions: [parentWidth, parentHeight] } = this; this.x += tx / parentWidth; this.y += ty / parentHeight; if (this.parent && (this.x < 0 || this.x > 1 || this.y < 0 || this.y > 1)) { const { x: x$3, y: y$4 } = this.div.getBoundingClientRect(); if (this.parent.findNewParent(this, x$3, y$4)) { this.x -= Math.floor(this.x); this.y -= Math.floor(this.y); } } let { x: x$2, y: y$3 } = this; const [bx, by] = this.getBaseTranslation(); x$2 += bx; y$3 += by; const { style } = div; style.left = `${(100 * x$2).toFixed(2)}%`; style.top = `${(100 * y$3).toFixed(2)}%`; this._onTranslating(x$2, y$3); div.scrollIntoView({ block: "nearest" }); } _onTranslating(x$2, y$3) {} _onTranslated(x$2, y$3) {} get _hasBeenMoved() { return !!this.#initialRect && (this.#initialRect[0] !== this.x || this.#initialRect[1] !== this.y); } get _hasBeenResized() { return !!this.#initialRect && (this.#initialRect[2] !== this.width || this.#initialRect[3] !== this.height); } getBaseTranslation() { const [parentWidth, parentHeight] = this.parentDimensions; const { _borderLineWidth } = AnnotationEditor; const x$2 = _borderLineWidth / parentWidth; const y$3 = _borderLineWidth / parentHeight; switch (this.rotation) { case 90: return [-x$2, y$3]; case 180: return [x$2, y$3]; case 270: return [x$2, -y$3]; default: return [-x$2, -y$3]; } } get _mustFixPosition() { return true; } fixAndSetPosition(rotation = this.rotation) { const { div: { style }, pageDimensions: [pageWidth, pageHeight] } = this; let { x: x$2, y: y$3, width, height } = this; width *= pageWidth; height *= pageHeight; x$2 *= pageWidth; y$3 *= pageHeight; if (this._mustFixPosition) { switch (rotation) { case 0: x$2 = MathClamp(x$2, 0, pageWidth - width); y$3 = MathClamp(y$3, 0, pageHeight - height); break; case 90: x$2 = MathClamp(x$2, 0, pageWidth - height); y$3 = MathClamp(y$3, width, pageHeight); break; case 180: x$2 = MathClamp(x$2, width, pageWidth); y$3 = MathClamp(y$3, height, pageHeight); break; case 270: x$2 = MathClamp(x$2, height, pageWidth); y$3 = MathClamp(y$3, 0, pageHeight - width); break; } } this.x = x$2 /= pageWidth; this.y = y$3 /= pageHeight; const [bx, by] = this.getBaseTranslation(); x$2 += bx; y$3 += by; style.left = `${(100 * x$2).toFixed(2)}%`; style.top = `${(100 * y$3).toFixed(2)}%`; this.moveInDOM(); } static #rotatePoint(x$2, y$3, angle) { switch (angle) { case 90: return [y$3, -x$2]; case 180: return [-x$2, -y$3]; case 270: return [-y$3, x$2]; default: return [x$2, y$3]; } } screenToPageTranslation(x$2, y$3) { return AnnotationEditor.#rotatePoint(x$2, y$3, this.parentRotation); } pageTranslationToScreen(x$2, y$3) { return AnnotationEditor.#rotatePoint(x$2, y$3, 360 - this.parentRotation); } #getRotationMatrix(rotation) { switch (rotation) { case 90: { const [pageWidth, pageHeight] = this.pageDimensions; return [ 0, -pageWidth / pageHeight, pageHeight / pageWidth, 0 ]; } case 180: return [ -1, 0, 0, -1 ]; case 270: { const [pageWidth, pageHeight] = this.pageDimensions; return [ 0, pageWidth / pageHeight, -pageHeight / pageWidth, 0 ]; } default: return [ 1, 0, 0, 1 ]; } } get parentScale() { return this._uiManager.viewParameters.realScale; } get parentRotation() { return (this._uiManager.viewParameters.rotation + this.pageRotation) % 360; } get parentDimensions() { const { parentScale, pageDimensions: [pageWidth, pageHeight] } = this; return [pageWidth * parentScale, pageHeight * parentScale]; } setDims() { const { div: { style }, width, height } = this; style.width = `${(100 * width).toFixed(2)}%`; style.height = `${(100 * height).toFixed(2)}%`; } getInitialTranslation() { return [0, 0]; } #createResizers() { if (this.#resizersDiv) { return; } this.#resizersDiv = document.createElement("div"); this.#resizersDiv.classList.add("resizers"); const classes = this._willKeepAspectRatio ? [ "topLeft", "topRight", "bottomRight", "bottomLeft" ] : [ "topLeft", "topMiddle", "topRight", "middleRight", "bottomRight", "bottomMiddle", "bottomLeft", "middleLeft" ]; const signal = this._uiManager._signal; for (const name of classes) { const div = document.createElement("div"); this.#resizersDiv.append(div); div.classList.add("resizer", name); div.setAttribute("data-resizer-name", name); div.addEventListener("pointerdown", this.#resizerPointerdown.bind(this, name), { signal }); div.addEventListener("contextmenu", noContextMenu, { signal }); div.tabIndex = -1; } this.div.prepend(this.#resizersDiv); } #resizerPointerdown(name, event) { event.preventDefault(); const { isMac } = util_FeatureTest.platform; if (event.button !== 0 || event.ctrlKey && isMac) { return; } this.#altText?.toggle(false); const savedDraggable = this._isDraggable; this._isDraggable = false; this.#lastPointerCoords = [event.screenX, event.screenY]; const ac = new AbortController(); const signal = this._uiManager.combinedSignal(ac); this.parent.togglePointerEvents(false); window.addEventListener("pointermove", this.#resizerPointermove.bind(this, name), { passive: true, capture: true, signal }); window.addEventListener("touchmove", stopEvent, { passive: false, signal }); window.addEventListener("contextmenu", noContextMenu, { signal }); this.#savedDimensions = { savedX: this.x, savedY: this.y, savedWidth: this.width, savedHeight: this.height }; const savedParentCursor = this.parent.div.style.cursor; const savedCursor = this.div.style.cursor; this.div.style.cursor = this.parent.div.style.cursor = window.getComputedStyle(event.target).cursor; const pointerUpCallback = () => { ac.abort(); this.parent.togglePointerEvents(true); this.#altText?.toggle(true); this._isDraggable = savedDraggable; this.parent.div.style.cursor = savedParentCursor; this.div.style.cursor = savedCursor; this.#addResizeToUndoStack(); }; window.addEventListener("pointerup", pointerUpCallback, { signal }); window.addEventListener("blur", pointerUpCallback, { signal }); } #resize(x$2, y$3, width, height) { this.width = width; this.height = height; this.x = x$2; this.y = y$3; this.setDims(); this.fixAndSetPosition(); this._onResized(); } _onResized() {} #addResizeToUndoStack() { if (!this.#savedDimensions) { return; } const { savedX, savedY, savedWidth, savedHeight } = this.#savedDimensions; this.#savedDimensions = null; const newX = this.x; const newY = this.y; const newWidth = this.width; const newHeight = this.height; if (newX === savedX && newY === savedY && newWidth === savedWidth && newHeight === savedHeight) { return; } this.addCommands({ cmd: this.#resize.bind(this, newX, newY, newWidth, newHeight), undo: this.#resize.bind(this, savedX, savedY, savedWidth, savedHeight), mustExec: true }); } static _round(x$2) { return Math.round(x$2 * 1e4) / 1e4; } #resizerPointermove(name, event) { const [parentWidth, parentHeight] = this.parentDimensions; const savedX = this.x; const savedY = this.y; const savedWidth = this.width; const savedHeight = this.height; const minWidth = AnnotationEditor.MIN_SIZE / parentWidth; const minHeight = AnnotationEditor.MIN_SIZE / parentHeight; const rotationMatrix = this.#getRotationMatrix(this.rotation); const transf = (x$2, y$3) => [rotationMatrix[0] * x$2 + rotationMatrix[2] * y$3, rotationMatrix[1] * x$2 + rotationMatrix[3] * y$3]; const invRotationMatrix = this.#getRotationMatrix(360 - this.rotation); const invTransf = (x$2, y$3) => [invRotationMatrix[0] * x$2 + invRotationMatrix[2] * y$3, invRotationMatrix[1] * x$2 + invRotationMatrix[3] * y$3]; let getPoint; let getOpposite; let isDiagonal = false; let isHorizontal = false; switch (name) { case "topLeft": isDiagonal = true; getPoint = (w$2, h$5) => [0, 0]; getOpposite = (w$2, h$5) => [w$2, h$5]; break; case "topMiddle": getPoint = (w$2, h$5) => [w$2 / 2, 0]; getOpposite = (w$2, h$5) => [w$2 / 2, h$5]; break; case "topRight": isDiagonal = true; getPoint = (w$2, h$5) => [w$2, 0]; getOpposite = (w$2, h$5) => [0, h$5]; break; case "middleRight": isHorizontal = true; getPoint = (w$2, h$5) => [w$2, h$5 / 2]; getOpposite = (w$2, h$5) => [0, h$5 / 2]; break; case "bottomRight": isDiagonal = true; getPoint = (w$2, h$5) => [w$2, h$5]; getOpposite = (w$2, h$5) => [0, 0]; break; case "bottomMiddle": getPoint = (w$2, h$5) => [w$2 / 2, h$5]; getOpposite = (w$2, h$5) => [w$2 / 2, 0]; break; case "bottomLeft": isDiagonal = true; getPoint = (w$2, h$5) => [0, h$5]; getOpposite = (w$2, h$5) => [w$2, 0]; break; case "middleLeft": isHorizontal = true; getPoint = (w$2, h$5) => [0, h$5 / 2]; getOpposite = (w$2, h$5) => [w$2, h$5 / 2]; break; } const point = getPoint(savedWidth, savedHeight); const oppositePoint = getOpposite(savedWidth, savedHeight); let transfOppositePoint = transf(...oppositePoint); const oppositeX = AnnotationEditor._round(savedX + transfOppositePoint[0]); const oppositeY = AnnotationEditor._round(savedY + transfOppositePoint[1]); let ratioX = 1; let ratioY = 1; let deltaX, deltaY; if (!event.fromKeyboard) { const { screenX, screenY } = event; const [lastScreenX, lastScreenY] = this.#lastPointerCoords; [deltaX, deltaY] = this.screenToPageTranslation(screenX - lastScreenX, screenY - lastScreenY); this.#lastPointerCoords[0] = screenX; this.#lastPointerCoords[1] = screenY; } else { ({deltaX, deltaY} = event); } [deltaX, deltaY] = invTransf(deltaX / parentWidth, deltaY / parentHeight); if (isDiagonal) { const oldDiag = Math.hypot(savedWidth, savedHeight); ratioX = ratioY = Math.max(Math.min(Math.hypot(oppositePoint[0] - point[0] - deltaX, oppositePoint[1] - point[1] - deltaY) / oldDiag, 1 / savedWidth, 1 / savedHeight), minWidth / savedWidth, minHeight / savedHeight); } else if (isHorizontal) { ratioX = MathClamp(Math.abs(oppositePoint[0] - point[0] - deltaX), minWidth, 1) / savedWidth; } else { ratioY = MathClamp(Math.abs(oppositePoint[1] - point[1] - deltaY), minHeight, 1) / savedHeight; } const newWidth = AnnotationEditor._round(savedWidth * ratioX); const newHeight = AnnotationEditor._round(savedHeight * ratioY); transfOppositePoint = transf(...getOpposite(newWidth, newHeight)); const newX = oppositeX - transfOppositePoint[0]; const newY = oppositeY - transfOppositePoint[1]; this.#initialRect ||= [ this.x, this.y, this.width, this.height ]; this.width = newWidth; this.height = newHeight; this.x = newX; this.y = newY; this.setDims(); this.fixAndSetPosition(); this._onResizing(); } _onResizing() {} altTextFinish() { this.#altText?.finish(); } get toolbarButtons() { return null; } async addEditToolbar() { if (this._editToolbar || this.#isInEditMode) { return this._editToolbar; } this._editToolbar = new EditorToolbar(this); this.div.append(this._editToolbar.render()); const { toolbarButtons } = this; if (toolbarButtons) { for (const [name, tool] of toolbarButtons) { await this._editToolbar.addButton(name, tool); } } if (!this.hasComment) { this._editToolbar.addButton("comment", this.addCommentButton()); } this._editToolbar.addButton("delete"); return this._editToolbar; } addCommentButtonInToolbar() { this._editToolbar?.addButtonBefore("comment", this.addCommentButton(), ".deleteButton"); } removeCommentButtonFromToolbar() { this._editToolbar?.removeButton("comment"); } removeEditToolbar() { this._editToolbar?.remove(); this._editToolbar = null; this.#altText?.destroy(); } addContainer(container) { const editToolbarDiv = this._editToolbar?.div; if (editToolbarDiv) { editToolbarDiv.before(container); } else { this.div.append(container); } } getClientDimensions() { return this.div.getBoundingClientRect(); } createAltText() { if (!this.#altText) { AltText.initialize(AnnotationEditor._l10n); this.#altText = new AltText(this); if (this.#accessibilityData) { this.#altText.data = this.#accessibilityData; this.#accessibilityData = null; } } return this.#altText; } get altTextData() { return this.#altText?.data; } set altTextData(data) { if (!this.#altText) { return; } this.#altText.data = data; } get guessedAltText() { return this.#altText?.guessedText; } async setGuessedAltText(text$2) { await this.#altText?.setGuessedText(text$2); } serializeAltText(isForCopying) { return this.#altText?.serialize(isForCopying); } hasAltText() { return !!this.#altText && !this.#altText.isEmpty(); } hasAltTextData() { return this.#altText?.hasData() ?? false; } focusCommentButton() { this.#comment?.focusButton(); } addCommentButton() { return this.canAddComment ? this.#comment ||= new Comment(this) : null; } addStandaloneCommentButton() { if (!this._uiManager.hasCommentManager()) { return; } if (this.#commentStandaloneButton) { if (this._uiManager.isEditingMode()) { this.#commentStandaloneButton.classList.remove("hidden"); } return; } if (!this.hasComment) { return; } this.#commentStandaloneButton = this.#comment.renderForStandalone(); this.div.append(this.#commentStandaloneButton); } removeStandaloneCommentButton() { this.#comment.removeStandaloneCommentButton(); this.#commentStandaloneButton = null; } hideStandaloneCommentButton() { this.#commentStandaloneButton?.classList.add("hidden"); } get comment() { const { data: { richText, text: text$2, date, deleted } } = this.#comment; return { text: text$2, richText, date, deleted, color: this.getNonHCMColor(), opacity: this.opacity ?? 1 }; } set comment(text$2) { this.#comment ||= new Comment(this); this.#comment.data = text$2; if (this.hasComment) { this.removeCommentButtonFromToolbar(); this.addStandaloneCommentButton(); this._uiManager.updateComment(this); } else { this.addCommentButtonInToolbar(); this.removeStandaloneCommentButton(); this._uiManager.removeComment(this); } } setCommentData({ comment, popupRef, richText }) { if (!popupRef) { return; } this.#comment ||= new Comment(this); this.#comment.setInitialText(comment, richText); if (!this.annotationElementId) { return; } const storedData = this._uiManager.getAndRemoveDataFromAnnotationStorage(this.annotationElementId); if (storedData) { this.updateFromAnnotationLayer(storedData); } } get hasEditedComment() { return this.#comment?.hasBeenEdited(); } get hasDeletedComment() { return this.#comment?.isDeleted(); } get hasComment() { return !!this.#comment && !this.#comment.isEmpty() && !this.#comment.isDeleted(); } async editComment(options) { this.#comment ||= new Comment(this); this.#comment.edit(options); } toggleComment(isSelected, visibility = undefined) { if (this.hasComment) { this._uiManager.toggleComment(this, isSelected, visibility); } } setSelectedCommentButton(selected) { this.#comment.setSelectedButton(selected); } addComment(serialized) { if (this.hasEditedComment) { const DEFAULT_POPUP_WIDTH = 180; const DEFAULT_POPUP_HEIGHT = 100; const [, , , trY] = serialized.rect; const [pageWidth] = this.pageDimensions; const [pageX] = this.pageTranslation; const blX = pageX + pageWidth + 1; const blY = trY - DEFAULT_POPUP_HEIGHT; const trX = blX + DEFAULT_POPUP_WIDTH; serialized.popup = { contents: this.comment.text, deleted: this.comment.deleted, rect: [ blX, blY, trX, trY ] }; } } updateFromAnnotationLayer({ popup: { contents, deleted } }) { this.#comment.data = deleted ? null : contents; } get parentBoundingClientRect() { return this.parent.boundingClientRect; } render() { const div = this.div = document.createElement("div"); div.setAttribute("data-editor-rotation", (360 - this.rotation) % 360); div.className = this.name; div.setAttribute("id", this.id); div.tabIndex = this.#disabled ? -1 : 0; div.setAttribute("role", "application"); if (this.defaultL10nId) { div.setAttribute("data-l10n-id", this.defaultL10nId); } if (!this._isVisible) { div.classList.add("hidden"); } this.setInForeground(); this.#addFocusListeners(); const [parentWidth, parentHeight] = this.parentDimensions; if (this.parentRotation % 180 !== 0) { div.style.maxWidth = `${(100 * parentHeight / parentWidth).toFixed(2)}%`; div.style.maxHeight = `${(100 * parentWidth / parentHeight).toFixed(2)}%`; } const [tx, ty] = this.getInitialTranslation(); this.translate(tx, ty); bindEvents(this, div, [ "keydown", "pointerdown", "dblclick" ]); if (this.isResizable && this._uiManager._supportsPinchToZoom) { this.#touchManager ||= new TouchManager({ container: div, isPinchingDisabled: () => !this.isSelected, onPinchStart: this.#touchPinchStartCallback.bind(this), onPinching: this.#touchPinchCallback.bind(this), onPinchEnd: this.#touchPinchEndCallback.bind(this), signal: this._uiManager._signal }); } this.addStandaloneCommentButton(); this._uiManager._editorUndoBar?.hide(); return div; } #touchPinchStartCallback() { this.#savedDimensions = { savedX: this.x, savedY: this.y, savedWidth: this.width, savedHeight: this.height }; this.#altText?.toggle(false); this.parent.togglePointerEvents(false); } #touchPinchCallback(_origin, prevDistance, distance) { const slowDownFactor = .7; let factor = slowDownFactor * (distance / prevDistance) + 1 - slowDownFactor; if (factor === 1) { return; } const rotationMatrix = this.#getRotationMatrix(this.rotation); const transf = (x$2, y$3) => [rotationMatrix[0] * x$2 + rotationMatrix[2] * y$3, rotationMatrix[1] * x$2 + rotationMatrix[3] * y$3]; const [parentWidth, parentHeight] = this.parentDimensions; const savedX = this.x; const savedY = this.y; const savedWidth = this.width; const savedHeight = this.height; const minWidth = AnnotationEditor.MIN_SIZE / parentWidth; const minHeight = AnnotationEditor.MIN_SIZE / parentHeight; factor = Math.max(Math.min(factor, 1 / savedWidth, 1 / savedHeight), minWidth / savedWidth, minHeight / savedHeight); const newWidth = AnnotationEditor._round(savedWidth * factor); const newHeight = AnnotationEditor._round(savedHeight * factor); if (newWidth === savedWidth && newHeight === savedHeight) { return; } this.#initialRect ||= [ savedX, savedY, savedWidth, savedHeight ]; const transfCenterPoint = transf(savedWidth / 2, savedHeight / 2); const centerX = AnnotationEditor._round(savedX + transfCenterPoint[0]); const centerY = AnnotationEditor._round(savedY + transfCenterPoint[1]); const newTransfCenterPoint = transf(newWidth / 2, newHeight / 2); this.x = centerX - newTransfCenterPoint[0]; this.y = centerY - newTransfCenterPoint[1]; this.width = newWidth; this.height = newHeight; this.setDims(); this.fixAndSetPosition(); this._onResizing(); } #touchPinchEndCallback() { this.#altText?.toggle(true); this.parent.togglePointerEvents(true); this.#addResizeToUndoStack(); } pointerdown(event) { const { isMac } = util_FeatureTest.platform; if (event.button !== 0 || event.ctrlKey && isMac) { event.preventDefault(); return; } this.#hasBeenClicked = true; if (this._isDraggable) { this.#setUpDragSession(event); return; } this.#selectOnPointerEvent(event); } #selectOnPointerEvent(event) { const { isMac } = util_FeatureTest.platform; if (event.ctrlKey && !isMac || event.shiftKey || event.metaKey && isMac) { this.parent.toggleSelected(this); } else { this.parent.setSelected(this); } } #setUpDragSession(event) { const { isSelected } = this; this._uiManager.setUpDragSession(); let hasDraggingStarted = false; const ac = new AbortController(); const signal = this._uiManager.combinedSignal(ac); const opts = { capture: true, passive: false, signal }; const cancelDrag = (e$10) => { ac.abort(); this.#dragPointerId = null; this.#hasBeenClicked = false; if (!this._uiManager.endDragSession()) { this.#selectOnPointerEvent(e$10); } if (hasDraggingStarted) { this._onStopDragging(); } }; if (isSelected) { this.#prevDragX = event.clientX; this.#prevDragY = event.clientY; this.#dragPointerId = event.pointerId; this.#dragPointerType = event.pointerType; window.addEventListener("pointermove", (e$10) => { if (!hasDraggingStarted) { hasDraggingStarted = true; this._uiManager.toggleComment(this, true, false); this._onStartDragging(); } const { clientX: x$2, clientY: y$3, pointerId } = e$10; if (pointerId !== this.#dragPointerId) { stopEvent(e$10); return; } const [tx, ty] = this.screenToPageTranslation(x$2 - this.#prevDragX, y$3 - this.#prevDragY); this.#prevDragX = x$2; this.#prevDragY = y$3; this._uiManager.dragSelectedEditors(tx, ty); }, opts); window.addEventListener("touchmove", stopEvent, opts); window.addEventListener("pointerdown", (e$10) => { if (e$10.pointerType === this.#dragPointerType) { if (this.#touchManager || e$10.isPrimary) { cancelDrag(e$10); } } stopEvent(e$10); }, opts); } const pointerUpCallback = (e$10) => { if (!this.#dragPointerId || this.#dragPointerId === e$10.pointerId) { cancelDrag(e$10); return; } stopEvent(e$10); }; window.addEventListener("pointerup", pointerUpCallback, { signal }); window.addEventListener("blur", pointerUpCallback, { signal }); } _onStartDragging() {} _onStopDragging() {} moveInDOM() { if (this.#moveInDOMTimeout) { clearTimeout(this.#moveInDOMTimeout); } this.#moveInDOMTimeout = setTimeout(() => { this.#moveInDOMTimeout = null; this.parent?.moveEditorInDOM(this); }, 0); } _setParentAndPosition(parent, x$2, y$3) { parent.changeParent(this); this.x = x$2; this.y = y$3; this.fixAndSetPosition(); this._onTranslated(); } getRect(tx, ty, rotation = this.rotation) { const scale = this.parentScale; const [pageWidth, pageHeight] = this.pageDimensions; const [pageX, pageY] = this.pageTranslation; const shiftX = tx / scale; const shiftY = ty / scale; const x$2 = this.x * pageWidth; const y$3 = this.y * pageHeight; const width = this.width * pageWidth; const height = this.height * pageHeight; switch (rotation) { case 0: return [ x$2 + shiftX + pageX, pageHeight - y$3 - shiftY - height + pageY, x$2 + shiftX + width + pageX, pageHeight - y$3 - shiftY + pageY ]; case 90: return [ x$2 + shiftY + pageX, pageHeight - y$3 + shiftX + pageY, x$2 + shiftY + height + pageX, pageHeight - y$3 + shiftX + width + pageY ]; case 180: return [ x$2 - shiftX - width + pageX, pageHeight - y$3 + shiftY + pageY, x$2 - shiftX + pageX, pageHeight - y$3 + shiftY + height + pageY ]; case 270: return [ x$2 - shiftY - height + pageX, pageHeight - y$3 - shiftX - width + pageY, x$2 - shiftY + pageX, pageHeight - y$3 - shiftX + pageY ]; default: throw new Error("Invalid rotation"); } } getRectInCurrentCoords(rect, pageHeight) { const [x1, y1, x2, y2] = rect; const width = x2 - x1; const height = y2 - y1; switch (this.rotation) { case 0: return [ x1, pageHeight - y2, width, height ]; case 90: return [ x1, pageHeight - y1, height, width ]; case 180: return [ x2, pageHeight - y1, width, height ]; case 270: return [ x2, pageHeight - y2, height, width ]; default: throw new Error("Invalid rotation"); } } getPDFRect() { return this.getRect(0, 0); } getNonHCMColor() { return this.color && AnnotationEditor._colorManager.convert(this._uiManager.getNonHCMColor(this.color)); } onUpdatedColor() { this.#comment?.onUpdatedColor(); } getData() { const { comment: { text: str, color, date, opacity, deleted, richText }, uid: id, pageIndex, creationDate, modificationDate } = this; return { id, pageIndex, rect: this.getPDFRect(), richText, contentsObj: { str }, creationDate, modificationDate: date || modificationDate, popupRef: !deleted, color, opacity }; } onceAdded(focus) {} isEmpty() { return false; } enableEditMode() { if (this.isInEditMode()) { return false; } this.parent.setEditingState(false); this.#isInEditMode = true; return true; } disableEditMode() { if (!this.isInEditMode()) { return false; } this.parent.setEditingState(true); this.#isInEditMode = false; return true; } isInEditMode() { return this.#isInEditMode; } shouldGetKeyboardEvents() { return this.#isResizerEnabledForKeyboard; } needsToBeRebuilt() { return this.div && !this.isAttachedToDOM; } get isOnScreen() { const { top, left, bottom, right } = this.getClientDimensions(); const { innerHeight, innerWidth } = window; return left < innerWidth && right > 0 && top < innerHeight && bottom > 0; } #addFocusListeners() { if (this.#focusAC || !this.div) { return; } this.#focusAC = new AbortController(); const signal = this._uiManager.combinedSignal(this.#focusAC); this.div.addEventListener("focusin", this.focusin.bind(this), { signal }); this.div.addEventListener("focusout", this.focusout.bind(this), { signal }); } rebuild() { this.#addFocusListeners(); } rotate(_angle) {} resize() {} serializeDeleted() { return { id: this.annotationElementId, deleted: true, pageIndex: this.pageIndex, popupRef: this._initialData?.popupRef || "" }; } serialize(isForCopying = false, context = null) { return { annotationType: this.mode, pageIndex: this.pageIndex, rect: this.getPDFRect(), rotation: this.rotation, structTreeParentId: this._structTreeParentId, popupRef: this._initialData?.popupRef || "" }; } static async deserialize(data, parent, uiManager) { const editor = new this.prototype.constructor({ parent, id: parent.getNextId(), uiManager, annotationElementId: data.annotationElementId, creationDate: data.creationDate, modificationDate: data.modificationDate }); editor.rotation = data.rotation; editor.#accessibilityData = data.accessibilityData; editor._isCopy = data.isCopy || false; const [pageWidth, pageHeight] = editor.pageDimensions; const [x$2, y$3, width, height] = editor.getRectInCurrentCoords(data.rect, pageHeight); editor.x = x$2 / pageWidth; editor.y = y$3 / pageHeight; editor.width = width / pageWidth; editor.height = height / pageHeight; return editor; } get hasBeenModified() { return !!this.annotationElementId && (this.deleted || this.serialize() !== null); } remove() { this.#focusAC?.abort(); this.#focusAC = null; if (!this.isEmpty()) { this.commit(); } if (this.parent) { this.parent.remove(this); } else { this._uiManager.removeEditor(this); } this.hideCommentPopup(); if (this.#moveInDOMTimeout) { clearTimeout(this.#moveInDOMTimeout); this.#moveInDOMTimeout = null; } this.#stopResizing(); this.removeEditToolbar(); if (this.#telemetryTimeouts) { for (const timeout of this.#telemetryTimeouts.values()) { clearTimeout(timeout); } this.#telemetryTimeouts = null; } this.parent = null; this.#touchManager?.destroy(); this.#touchManager = null; this.#fakeAnnotation?.remove(); this.#fakeAnnotation = null; } get isResizable() { return false; } makeResizable() { if (this.isResizable) { this.#createResizers(); this.#resizersDiv.classList.remove("hidden"); } } get toolbarPosition() { return null; } get commentButtonPosition() { return this._uiManager.direction === "ltr" ? [1, 0] : [0, 0]; } get commentButtonPositionInPage() { const { commentButtonPosition: [posX, posY] } = this; const [blX, blY, trX, trY] = this.getPDFRect(); return [AnnotationEditor._round(blX + (trX - blX) * posX), AnnotationEditor._round(blY + (trY - blY) * (1 - posY))]; } get commentButtonColor() { return this._uiManager.makeCommentColor(this.getNonHCMColor(), this.opacity); } get commentPopupPosition() { return this.#comment.commentPopupPositionInLayer; } set commentPopupPosition(pos) { this.#comment.commentPopupPositionInLayer = pos; } hasDefaultPopupPosition() { return this.#comment.hasDefaultPopupPosition(); } get commentButtonWidth() { return this.#comment.commentButtonWidth; } get elementBeforePopup() { return this.div; } setCommentButtonStates(options) { this.#comment?.setCommentButtonStates(options); } keydown(event) { if (!this.isResizable || event.target !== this.div || event.key !== "Enter") { return; } this._uiManager.setSelected(this); this.#savedDimensions = { savedX: this.x, savedY: this.y, savedWidth: this.width, savedHeight: this.height }; const children = this.#resizersDiv.children; if (!this.#allResizerDivs) { this.#allResizerDivs = Array.from(children); const boundResizerKeydown = this.#resizerKeydown.bind(this); const boundResizerBlur = this.#resizerBlur.bind(this); const signal = this._uiManager._signal; for (const div of this.#allResizerDivs) { const name = div.getAttribute("data-resizer-name"); div.setAttribute("role", "spinbutton"); div.addEventListener("keydown", boundResizerKeydown, { signal }); div.addEventListener("blur", boundResizerBlur, { signal }); div.addEventListener("focus", this.#resizerFocus.bind(this, name), { signal }); div.setAttribute("data-l10n-id", AnnotationEditor._l10nResizer[name]); } } const first = this.#allResizerDivs[0]; let firstPosition = 0; for (const div of children) { if (div === first) { break; } firstPosition++; } const nextFirstPosition = (360 - this.rotation + this.parentRotation) % 360 / 90 * (this.#allResizerDivs.length / 4); if (nextFirstPosition !== firstPosition) { if (nextFirstPosition < firstPosition) { for (let i$8 = 0; i$8 < firstPosition - nextFirstPosition; i$8++) { this.#resizersDiv.append(this.#resizersDiv.firstChild); } } else if (nextFirstPosition > firstPosition) { for (let i$8 = 0; i$8 < nextFirstPosition - firstPosition; i$8++) { this.#resizersDiv.firstChild.before(this.#resizersDiv.lastChild); } } let i$7 = 0; for (const child of children) { const div = this.#allResizerDivs[i$7++]; const name = div.getAttribute("data-resizer-name"); child.setAttribute("data-l10n-id", AnnotationEditor._l10nResizer[name]); } } this.#setResizerTabIndex(0); this.#isResizerEnabledForKeyboard = true; this.#resizersDiv.firstChild.focus({ focusVisible: true }); event.preventDefault(); event.stopImmediatePropagation(); } #resizerKeydown(event) { AnnotationEditor._resizerKeyboardManager.exec(this, event); } #resizerBlur(event) { if (this.#isResizerEnabledForKeyboard && event.relatedTarget?.parentNode !== this.#resizersDiv) { this.#stopResizing(); } } #resizerFocus(name) { this.#focusedResizerName = this.#isResizerEnabledForKeyboard ? name : ""; } #setResizerTabIndex(value) { if (!this.#allResizerDivs) { return; } for (const div of this.#allResizerDivs) { div.tabIndex = value; } } _resizeWithKeyboard(x$2, y$3) { if (!this.#isResizerEnabledForKeyboard) { return; } this.#resizerPointermove(this.#focusedResizerName, { deltaX: x$2, deltaY: y$3, fromKeyboard: true }); } #stopResizing() { this.#isResizerEnabledForKeyboard = false; this.#setResizerTabIndex(-1); this.#addResizeToUndoStack(); } _stopResizingWithKeyboard() { this.#stopResizing(); this.div.focus(); } select() { if (this.isSelected && this._editToolbar) { this._editToolbar.show(); return; } this.isSelected = true; this.makeResizable(); this.div?.classList.add("selectedEditor"); if (!this._editToolbar) { this.addEditToolbar().then(() => { if (this.div?.classList.contains("selectedEditor")) { this._editToolbar?.show(); } }); return; } this._editToolbar?.show(); this.#altText?.toggleAltTextBadge(false); } focus() { if (this.div && !this.div.contains(document.activeElement)) { setTimeout(() => this.div?.focus({ preventScroll: true }), 0); } } unselect() { if (!this.isSelected) { return; } this.isSelected = false; this.#resizersDiv?.classList.add("hidden"); this.div?.classList.remove("selectedEditor"); if (this.div?.contains(document.activeElement)) { this._uiManager.currentLayer.div.focus({ preventScroll: true }); } this._editToolbar?.hide(); this.#altText?.toggleAltTextBadge(true); this.hideCommentPopup(); } hideCommentPopup() { if (this.hasComment) { this._uiManager.toggleComment(null); } } updateParams(type, value) {} disableEditing() {} enableEditing() {} get canChangeContent() { return false; } enterInEditMode() { if (!this.canChangeContent) { return; } this.enableEditMode(); this.div.focus(); } dblclick(event) { if (event.target.nodeName === "BUTTON") { return; } this.enterInEditMode(); this.parent.updateToolbar({ mode: this.constructor._editorType, editId: this.uid }); } getElementForAltText() { return this.div; } get contentDiv() { return this.div; } get isEditing() { return this.#isEditing; } set isEditing(value) { this.#isEditing = value; if (!this.parent) { return; } if (value) { this.parent.setSelected(this); this.parent.setActiveEditor(this); } else { this.parent.setActiveEditor(null); } } static get MIN_SIZE() { return 16; } static canCreateNewEmptyEditor() { return true; } get telemetryInitialData() { return { action: "added" }; } get telemetryFinalData() { return null; } _reportTelemetry(data, mustWait = false) { if (mustWait) { this.#telemetryTimeouts ||= new Map(); const { action } = data; let timeout = this.#telemetryTimeouts.get(action); if (timeout) { clearTimeout(timeout); } timeout = setTimeout(() => { this._reportTelemetry(data); this.#telemetryTimeouts.delete(action); if (this.#telemetryTimeouts.size === 0) { this.#telemetryTimeouts = null; } }, AnnotationEditor._telemetryTimeout); this.#telemetryTimeouts.set(action, timeout); return; } data.type ||= this.editorType; this._uiManager._eventBus.dispatch("reporttelemetry", { source: this, details: { type: "editing", data } }); } show(visible = this._isVisible) { this.div.classList.toggle("hidden", !visible); this._isVisible = visible; } enable() { if (this.div) { this.div.tabIndex = 0; } this.#disabled = false; } disable() { if (this.div) { this.div.tabIndex = -1; } this.#disabled = true; } updateFakeAnnotationElement(annotationLayer) { if (!this.#fakeAnnotation && !this.deleted) { this.#fakeAnnotation = annotationLayer.addFakeAnnotation(this); return; } if (this.deleted) { this.#fakeAnnotation.remove(); this.#fakeAnnotation = null; return; } if (this.hasEditedComment || this._hasBeenMoved || this._hasBeenResized) { this.#fakeAnnotation.updateEdited({ rect: this.getPDFRect(), popup: this.comment }); } } renderAnnotationElement(annotation) { if (this.deleted) { annotation.hide(); return null; } let content = annotation.container.querySelector(".annotationContent"); if (!content) { content = document.createElement("div"); content.classList.add("annotationContent", this.editorType); annotation.container.prepend(content); } else if (content.nodeName === "CANVAS") { const canvas = content; content = document.createElement("div"); content.classList.add("annotationContent", this.editorType); canvas.before(content); } return content; } resetAnnotationElement(annotation) { const { firstChild } = annotation.container; if (firstChild?.nodeName === "DIV" && firstChild.classList.contains("annotationContent")) { firstChild.remove(); } } }; FakeEditor = class extends AnnotationEditor { constructor(params) { super(params); this.annotationElementId = params.annotationElementId; this.deleted = true; } serialize() { return this.serializeDeleted(); } }; ; SEED = 3285377520; MASK_HIGH = 4294901760; MASK_LOW = 65535; MurmurHash3_64 = class { constructor(seed) { this.h1 = seed ? seed & 4294967295 : SEED; this.h2 = seed ? seed & 4294967295 : SEED; } update(input) { let data, length; if (typeof input === "string") { data = new Uint8Array(input.length * 2); length = 0; for (let i$7 = 0, ii = input.length; i$7 < ii; i$7++) { const code = input.charCodeAt(i$7); if (code <= 255) { data[length++] = code; } else { data[length++] = code >>> 8; data[length++] = code & 255; } } } else if (ArrayBuffer.isView(input)) { data = input.slice(); length = data.byteLength; } else { throw new Error("Invalid data format, must be a string or TypedArray."); } const blockCounts = length >> 2; const tailLength = length - blockCounts * 4; const dataUint32 = new Uint32Array(data.buffer, 0, blockCounts); let k1 = 0, k2 = 0; let h1 = this.h1, h2 = this.h2; const C1 = 3432918353, C2 = 461845907; const C1_LOW = C1 & MASK_LOW, C2_LOW = C2 & MASK_LOW; for (let i$7 = 0; i$7 < blockCounts; i$7++) { if (i$7 & 1) { k1 = dataUint32[i$7]; k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW; k1 = k1 << 15 | k1 >>> 17; k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW; h1 ^= k1; h1 = h1 << 13 | h1 >>> 19; h1 = h1 * 5 + 3864292196; } else { k2 = dataUint32[i$7]; k2 = k2 * C1 & MASK_HIGH | k2 * C1_LOW & MASK_LOW; k2 = k2 << 15 | k2 >>> 17; k2 = k2 * C2 & MASK_HIGH | k2 * C2_LOW & MASK_LOW; h2 ^= k2; h2 = h2 << 13 | h2 >>> 19; h2 = h2 * 5 + 3864292196; } } k1 = 0; switch (tailLength) { case 3: k1 ^= data[blockCounts * 4 + 2] << 16; case 2: k1 ^= data[blockCounts * 4 + 1] << 8; case 1: k1 ^= data[blockCounts * 4]; k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW; k1 = k1 << 15 | k1 >>> 17; k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW; if (blockCounts & 1) { h1 ^= k1; } else { h2 ^= k1; } } this.h1 = h1; this.h2 = h2; } hexdigest() { let h1 = this.h1, h2 = this.h2; h1 ^= h2 >>> 1; h1 = h1 * 3981806797 & MASK_HIGH | h1 * 36045 & MASK_LOW; h2 = h2 * 4283543511 & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 2950163797 & MASK_HIGH) >>> 16; h1 ^= h2 >>> 1; h1 = h1 * 444984403 & MASK_HIGH | h1 * 60499 & MASK_LOW; h2 = h2 * 3301882366 & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 3120437893 & MASK_HIGH) >>> 16; h1 ^= h2 >>> 1; return (h1 >>> 0).toString(16).padStart(8, "0") + (h2 >>> 0).toString(16).padStart(8, "0"); } }; ; SerializableEmpty = Object.freeze({ map: null, hash: "", transfer: undefined }); AnnotationStorage = class { #modified = false; #modifiedIds = null; #editorsMap = null; #storage = new Map(); constructor() { this.onSetModified = null; this.onResetModified = null; this.onAnnotationEditor = null; } getValue(key, defaultValue) { const value = this.#storage.get(key); if (value === undefined) { return defaultValue; } return Object.assign(defaultValue, value); } getRawValue(key) { return this.#storage.get(key); } remove(key) { const storedValue = this.#storage.get(key); if (storedValue === undefined) { return; } if (storedValue instanceof AnnotationEditor) { this.#editorsMap.delete(storedValue.annotationElementId); } this.#storage.delete(key); if (this.#storage.size === 0) { this.resetModified(); } if (typeof this.onAnnotationEditor === "function") { for (const value of this.#storage.values()) { if (value instanceof AnnotationEditor) { return; } } this.onAnnotationEditor(null); } } setValue(key, value) { const obj = this.#storage.get(key); let modified = false; if (obj !== undefined) { for (const [entry, val$1] of Object.entries(value)) { if (obj[entry] !== val$1) { modified = true; obj[entry] = val$1; } } } else { modified = true; this.#storage.set(key, value); } if (modified) { this.#setModified(); } if (value instanceof AnnotationEditor) { (this.#editorsMap ||= new Map()).set(value.annotationElementId, value); if (typeof this.onAnnotationEditor === "function") { this.onAnnotationEditor(value.constructor._type); } } } has(key) { return this.#storage.has(key); } get size() { return this.#storage.size; } #setModified() { if (!this.#modified) { this.#modified = true; if (typeof this.onSetModified === "function") { this.onSetModified(); } } } resetModified() { if (this.#modified) { this.#modified = false; if (typeof this.onResetModified === "function") { this.onResetModified(); } } } get print() { return new PrintAnnotationStorage(this); } get serializable() { if (this.#storage.size === 0) { return SerializableEmpty; } const map$2 = new Map(), hash = new MurmurHash3_64(), transfer = []; const context = Object.create(null); let hasBitmap = false; for (const [key, val$1] of this.#storage) { const serialized = val$1 instanceof AnnotationEditor ? val$1.serialize(false, context) : val$1; if (serialized) { map$2.set(key, serialized); hash.update(`${key}:${JSON.stringify(serialized)}`); hasBitmap ||= !!serialized.bitmap; } } if (hasBitmap) { for (const value of map$2.values()) { if (value.bitmap) { transfer.push(value.bitmap); } } } return map$2.size > 0 ? { map: map$2, hash: hash.hexdigest(), transfer } : SerializableEmpty; } get editorStats() { let stats = null; const typeToEditor = new Map(); let numberOfEditedComments = 0; let numberOfDeletedComments = 0; for (const value of this.#storage.values()) { if (!(value instanceof AnnotationEditor)) { if (value.popup) { if (value.popup.deleted) { numberOfDeletedComments += 1; } else { numberOfEditedComments += 1; } } continue; } if (value.isCommentDeleted) { numberOfDeletedComments += 1; } else if (value.hasEditedComment) { numberOfEditedComments += 1; } const editorStats = value.telemetryFinalData; if (!editorStats) { continue; } const { type } = editorStats; if (!typeToEditor.has(type)) { typeToEditor.set(type, Object.getPrototypeOf(value).constructor); } stats ||= Object.create(null); const map$2 = stats[type] ||= new Map(); for (const [key, val$1] of Object.entries(editorStats)) { if (key === "type") { continue; } let counters = map$2.get(key); if (!counters) { counters = new Map(); map$2.set(key, counters); } const count = counters.get(val$1) ?? 0; counters.set(val$1, count + 1); } } if (numberOfDeletedComments > 0 || numberOfEditedComments > 0) { stats ||= Object.create(null); stats.comments = { deleted: numberOfDeletedComments, edited: numberOfEditedComments }; } if (!stats) { return null; } for (const [type, editor] of typeToEditor) { stats[type] = editor.computeTelemetryFinalData(stats[type]); } return stats; } resetModifiedIds() { this.#modifiedIds = null; } updateEditor(annotationId, data) { const value = this.#editorsMap?.get(annotationId); if (value) { value.updateFromAnnotationLayer(data); return true; } return false; } getEditor(annotationId) { return this.#editorsMap?.get(annotationId) || null; } get modifiedIds() { if (this.#modifiedIds) { return this.#modifiedIds; } const ids = []; if (this.#editorsMap) { for (const value of this.#editorsMap.values()) { if (!value.serialize()) { continue; } ids.push(value.annotationElementId); } } return this.#modifiedIds = { ids: new Set(ids), hash: ids.join(",") }; } [Symbol.iterator]() { return this.#storage.entries(); } }; PrintAnnotationStorage = class extends AnnotationStorage { #serializable; constructor(parent) { super(); const { map: map$2, hash, transfer } = parent.serializable; const clone = structuredClone(map$2, transfer ? { transfer } : null); this.#serializable = { map: clone, hash, transfer }; } get print() { unreachable("Should not call PrintAnnotationStorage.print"); } get serializable() { return this.#serializable; } get modifiedIds() { return shadow(this, "modifiedIds", { ids: new Set(), hash: "" }); } }; ; FontLoader = class { #systemFonts = new Set(); constructor({ ownerDocument = globalThis.document, styleElement = null }) { this._document = ownerDocument; this.nativeFontFaces = new Set(); this.styleElement = null; this.loadingRequests = []; this.loadTestFontId = 0; } addNativeFontFace(nativeFontFace) { this.nativeFontFaces.add(nativeFontFace); this._document.fonts.add(nativeFontFace); } removeNativeFontFace(nativeFontFace) { this.nativeFontFaces.delete(nativeFontFace); this._document.fonts.delete(nativeFontFace); } insertRule(rule) { if (!this.styleElement) { this.styleElement = this._document.createElement("style"); this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement); } const styleSheet = this.styleElement.sheet; styleSheet.insertRule(rule, styleSheet.cssRules.length); } clear() { for (const nativeFontFace of this.nativeFontFaces) { this._document.fonts.delete(nativeFontFace); } this.nativeFontFaces.clear(); this.#systemFonts.clear(); if (this.styleElement) { this.styleElement.remove(); this.styleElement = null; } } async loadSystemFont({ systemFontInfo: info$1, disableFontFace, _inspectFont }) { if (!info$1 || this.#systemFonts.has(info$1.loadedName)) { return; } assert$1(!disableFontFace, "loadSystemFont shouldn't be called when `disableFontFace` is set."); if (this.isFontLoadingAPISupported) { const { loadedName, src, style } = info$1; const fontFace = new FontFace(loadedName, src, style); this.addNativeFontFace(fontFace); try { await fontFace.load(); this.#systemFonts.add(loadedName); _inspectFont?.(info$1); } catch { warn$2(`Cannot load system font: ${info$1.baseFontName}, installing it could help to improve PDF rendering.`); this.removeNativeFontFace(fontFace); } return; } unreachable("Not implemented: loadSystemFont without the Font Loading API."); } async bind(font) { if (font.attached || font.missingFile && !font.systemFontInfo) { return; } font.attached = true; if (font.systemFontInfo) { await this.loadSystemFont(font); return; } if (this.isFontLoadingAPISupported) { const nativeFontFace = font.createNativeFontFace(); if (nativeFontFace) { this.addNativeFontFace(nativeFontFace); try { await nativeFontFace.loaded; } catch (ex) { warn$2(`Failed to load font '${nativeFontFace.family}': '${ex}'.`); font.disableFontFace = true; throw ex; } } return; } const rule = font.createFontFaceRule(); if (rule) { this.insertRule(rule); if (this.isSyncFontLoadingSupported) { return; } await new Promise((resolve) => { const request = this._queueLoadingCallback(resolve); this._prepareFontLoadEvent(font, request); }); } } get isFontLoadingAPISupported() { const hasFonts = !!this._document?.fonts; return shadow(this, "isFontLoadingAPISupported", hasFonts); } get isSyncFontLoadingSupported() { return shadow(this, "isSyncFontLoadingSupported", isNodeJS || util_FeatureTest.platform.isFirefox); } _queueLoadingCallback(callback) { function completeRequest() { assert$1(!request.done, "completeRequest() cannot be called twice."); request.done = true; while (loadingRequests.length > 0 && loadingRequests[0].done) { const otherRequest = loadingRequests.shift(); setTimeout(otherRequest.callback, 0); } } const { loadingRequests } = this; const request = { done: false, complete: completeRequest, callback }; loadingRequests.push(request); return request; } get _loadTestFont() { const testFont = atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQA" + "FQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAA" + "ALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgA" + "AAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1" + "AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD" + "6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACM" + "AooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4D" + "IP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAA" + "AAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUA" + "AQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgAB" + "AAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABY" + "AAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAA" + "AC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAA" + "AAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQAC" + "AQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3" + "Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTj" + "FQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="); return shadow(this, "_loadTestFont", testFont); } _prepareFontLoadEvent(font, request) { function int32(data$1, offset) { return data$1.charCodeAt(offset) << 24 | data$1.charCodeAt(offset + 1) << 16 | data$1.charCodeAt(offset + 2) << 8 | data$1.charCodeAt(offset + 3) & 255; } function spliceString(s$5, offset, remove, insert) { const chunk1 = s$5.substring(0, offset); const chunk2 = s$5.substring(offset + remove); return chunk1 + insert + chunk2; } let i$7, ii; const canvas = this._document.createElement("canvas"); canvas.width = 1; canvas.height = 1; const ctx = canvas.getContext("2d"); let called = 0; function isFontReady(name, callback) { if (++called > 30) { warn$2("Load test font never loaded."); callback(); return; } ctx.font = "30px " + name; ctx.fillText(".", 0, 20); const imageData = ctx.getImageData(0, 0, 1, 1); if (imageData.data[3] > 0) { callback(); return; } setTimeout(isFontReady.bind(null, name, callback)); } const loadTestFontId = `lt${Date.now()}${this.loadTestFontId++}`; let data = this._loadTestFont; const COMMENT_OFFSET = 976; data = spliceString(data, COMMENT_OFFSET, loadTestFontId.length, loadTestFontId); const CFF_CHECKSUM_OFFSET = 16; const XXXX_VALUE = 1482184792; let checksum = int32(data, CFF_CHECKSUM_OFFSET); for (i$7 = 0, ii = loadTestFontId.length - 3; i$7 < ii; i$7 += 4) { checksum = checksum - XXXX_VALUE + int32(loadTestFontId, i$7) | 0; } if (i$7 < loadTestFontId.length) { checksum = checksum - XXXX_VALUE + int32(loadTestFontId + "XXX", i$7) | 0; } data = spliceString(data, CFF_CHECKSUM_OFFSET, 4, string32(checksum)); const url = `url(data:font/opentype;base64,${btoa(data)});`; const rule = `@font-face {font-family:"${loadTestFontId}";src:${url}}`; this.insertRule(rule); const div = this._document.createElement("div"); div.style.visibility = "hidden"; div.style.width = div.style.height = "10px"; div.style.position = "absolute"; div.style.top = div.style.left = "0px"; for (const name of [font.loadedName, loadTestFontId]) { const span = this._document.createElement("span"); span.textContent = "Hi"; span.style.fontFamily = name; div.append(span); } this._document.body.append(div); isFontReady(loadTestFontId, () => { div.remove(); request.complete(); }); } }; FontFaceObject = class { #fontData; constructor(translatedData, inspectFont = null, extra, charProcOperatorList) { this.compiledGlyphs = Object.create(null); this.#fontData = translatedData; this._inspectFont = inspectFont; if (extra) { Object.assign(this, extra); } if (charProcOperatorList) { this.charProcOperatorList = charProcOperatorList; } } createNativeFontFace() { if (!this.data || this.disableFontFace) { return null; } let nativeFontFace; if (!this.cssFontInfo) { nativeFontFace = new FontFace(this.loadedName, this.data, {}); } else { const css$2 = { weight: this.cssFontInfo.fontWeight }; if (this.cssFontInfo.italicAngle) { css$2.style = `oblique ${this.cssFontInfo.italicAngle}deg`; } nativeFontFace = new FontFace(this.cssFontInfo.fontFamily, this.data, css$2); } this._inspectFont?.(this); return nativeFontFace; } createFontFaceRule() { if (!this.data || this.disableFontFace) { return null; } const url = `url(data:${this.mimetype};base64,${toBase64Util(this.data)});`; let rule; if (!this.cssFontInfo) { rule = `@font-face {font-family:"${this.loadedName}";src:${url}}`; } else { let css$2 = `font-weight: ${this.cssFontInfo.fontWeight};`; if (this.cssFontInfo.italicAngle) { css$2 += `font-style: oblique ${this.cssFontInfo.italicAngle}deg;`; } rule = `@font-face {font-family:"${this.cssFontInfo.fontFamily}";${css$2}src:${url}}`; } this._inspectFont?.(this, url); return rule; } getPathGenerator(objs, character) { if (this.compiledGlyphs[character] !== undefined) { return this.compiledGlyphs[character]; } const objId = this.loadedName + "_path_" + character; let cmds; try { cmds = objs.get(objId); } catch (ex) { warn$2(`getPathGenerator - ignoring character: "${ex}".`); } const path$1 = makePathFromDrawOPS(cmds); if (!this.fontExtraProperties) { objs.delete(objId); } return this.compiledGlyphs[character] = path$1; } get black() { return this.#fontData.black; } get bold() { return this.#fontData.bold; } get disableFontFace() { return this.#fontData.disableFontFace ?? false; } get fontExtraProperties() { return this.#fontData.fontExtraProperties ?? false; } get isInvalidPDFjsFont() { return this.#fontData.isInvalidPDFjsFont; } get isType3Font() { return this.#fontData.isType3Font; } get italic() { return this.#fontData.italic; } get missingFile() { return this.#fontData.missingFile; } get remeasure() { return this.#fontData.remeasure; } get vertical() { return this.#fontData.vertical; } get ascent() { return this.#fontData.ascent; } get defaultWidth() { return this.#fontData.defaultWidth; } get descent() { return this.#fontData.descent; } get bbox() { return this.#fontData.bbox; } get fontMatrix() { return this.#fontData.fontMatrix; } get fallbackName() { return this.#fontData.fallbackName; } get loadedName() { return this.#fontData.loadedName; } get mimetype() { return this.#fontData.mimetype; } get name() { return this.#fontData.name; } get data() { return this.#fontData.data; } clearData() { this.#fontData.clearData(); } get cssFontInfo() { return this.#fontData.cssFontInfo; } get systemFontInfo() { return this.#fontData.systemFontInfo; } get defaultVMetrics() { return this.#fontData.defaultVMetrics; } }; ; CssFontInfo = class CssFontInfo { #buffer; #view; #decoder; static strings = [ "fontFamily", "fontWeight", "italicAngle" ]; static write(info$1) { const encoder = new TextEncoder(); const encodedStrings = {}; let stringsLength = 0; for (const prop of CssFontInfo.strings) { const encoded = encoder.encode(info$1[prop]); encodedStrings[prop] = encoded; stringsLength += 4 + encoded.length; } const buffer = new ArrayBuffer(stringsLength); const data = new Uint8Array(buffer); const view = new DataView(buffer); let offset = 0; for (const prop of CssFontInfo.strings) { const encoded = encodedStrings[prop]; const length = encoded.length; view.setUint32(offset, length); data.set(encoded, offset + 4); offset += 4 + length; } assert$1(offset === buffer.byteLength, "CssFontInfo.write: Buffer overflow"); return buffer; } constructor(buffer) { this.#buffer = buffer; this.#view = new DataView(this.#buffer); this.#decoder = new TextDecoder(); } #readString(index) { assert$1(index < CssFontInfo.strings.length, "Invalid string index"); let offset = 0; for (let i$7 = 0; i$7 < index; i$7++) { offset += this.#view.getUint32(offset) + 4; } const length = this.#view.getUint32(offset); return this.#decoder.decode(new Uint8Array(this.#buffer, offset + 4, length)); } get fontFamily() { return this.#readString(0); } get fontWeight() { return this.#readString(1); } get italicAngle() { return this.#readString(2); } }; SystemFontInfo = class SystemFontInfo { #buffer; #view; #decoder; static strings = [ "css", "loadedName", "baseFontName", "src" ]; static write(info$1) { const encoder = new TextEncoder(); const encodedStrings = {}; let stringsLength = 0; for (const prop of SystemFontInfo.strings) { const encoded = encoder.encode(info$1[prop]); encodedStrings[prop] = encoded; stringsLength += 4 + encoded.length; } stringsLength += 4; let encodedStyleStyle, encodedStyleWeight, lengthEstimate = 1 + stringsLength; if (info$1.style) { encodedStyleStyle = encoder.encode(info$1.style.style); encodedStyleWeight = encoder.encode(info$1.style.weight); lengthEstimate += 4 + encodedStyleStyle.length + 4 + encodedStyleWeight.length; } const buffer = new ArrayBuffer(lengthEstimate); const data = new Uint8Array(buffer); const view = new DataView(buffer); let offset = 0; view.setUint8(offset++, info$1.guessFallback ? 1 : 0); view.setUint32(offset, 0); offset += 4; stringsLength = 0; for (const prop of SystemFontInfo.strings) { const encoded = encodedStrings[prop]; const length = encoded.length; stringsLength += 4 + length; view.setUint32(offset, length); data.set(encoded, offset + 4); offset += 4 + length; } view.setUint32(offset - stringsLength - 4, stringsLength); if (info$1.style) { view.setUint32(offset, encodedStyleStyle.length); data.set(encodedStyleStyle, offset + 4); offset += 4 + encodedStyleStyle.length; view.setUint32(offset, encodedStyleWeight.length); data.set(encodedStyleWeight, offset + 4); offset += 4 + encodedStyleWeight.length; } assert$1(offset <= buffer.byteLength, "SubstitionInfo.write: Buffer overflow"); return buffer.transferToFixedLength(offset); } constructor(buffer) { this.#buffer = buffer; this.#view = new DataView(this.#buffer); this.#decoder = new TextDecoder(); } get guessFallback() { return this.#view.getUint8(0) !== 0; } #readString(index) { assert$1(index < SystemFontInfo.strings.length, "Invalid string index"); let offset = 5; for (let i$7 = 0; i$7 < index; i$7++) { offset += this.#view.getUint32(offset) + 4; } const length = this.#view.getUint32(offset); return this.#decoder.decode(new Uint8Array(this.#buffer, offset + 4, length)); } get css() { return this.#readString(0); } get loadedName() { return this.#readString(1); } get baseFontName() { return this.#readString(2); } get src() { return this.#readString(3); } get style() { let offset = 1; offset += 4 + this.#view.getUint32(offset); const styleLength = this.#view.getUint32(offset); const style = this.#decoder.decode(new Uint8Array(this.#buffer, offset + 4, styleLength)); offset += 4 + styleLength; const weightLength = this.#view.getUint32(offset); const weight = this.#decoder.decode(new Uint8Array(this.#buffer, offset + 4, weightLength)); return { style, weight }; } }; FontInfo = class FontInfo { static bools = [ "black", "bold", "disableFontFace", "fontExtraProperties", "isInvalidPDFjsFont", "isType3Font", "italic", "missingFile", "remeasure", "vertical" ]; static numbers = [ "ascent", "defaultWidth", "descent" ]; static strings = [ "fallbackName", "loadedName", "mimetype", "name" ]; static #OFFSET_NUMBERS = Math.ceil(this.bools.length * 2 / 8); static #OFFSET_BBOX = this.#OFFSET_NUMBERS + this.numbers.length * 8; static #OFFSET_FONT_MATRIX = this.#OFFSET_BBOX + 1 + 2 * 4; static #OFFSET_DEFAULT_VMETRICS = this.#OFFSET_FONT_MATRIX + 1 + 8 * 6; static #OFFSET_STRINGS = this.#OFFSET_DEFAULT_VMETRICS + 1 + 2 * 3; #buffer; #decoder; #view; constructor({ data, extra }) { this.#buffer = data; this.#decoder = new TextDecoder(); this.#view = new DataView(this.#buffer); if (extra) { Object.assign(this, extra); } } #readBoolean(index) { assert$1(index < FontInfo.bools.length, "Invalid boolean index"); const byteOffset = Math.floor(index / 4); const bitOffset = index * 2 % 8; const value = this.#view.getUint8(byteOffset) >> bitOffset & 3; return value === 0 ? undefined : value === 2; } get black() { return this.#readBoolean(0); } get bold() { return this.#readBoolean(1); } get disableFontFace() { return this.#readBoolean(2); } get fontExtraProperties() { return this.#readBoolean(3); } get isInvalidPDFjsFont() { return this.#readBoolean(4); } get isType3Font() { return this.#readBoolean(5); } get italic() { return this.#readBoolean(6); } get missingFile() { return this.#readBoolean(7); } get remeasure() { return this.#readBoolean(8); } get vertical() { return this.#readBoolean(9); } #readNumber(index) { assert$1(index < FontInfo.numbers.length, "Invalid number index"); return this.#view.getFloat64(FontInfo.#OFFSET_NUMBERS + index * 8); } get ascent() { return this.#readNumber(0); } get defaultWidth() { return this.#readNumber(1); } get descent() { return this.#readNumber(2); } get bbox() { let offset = FontInfo.#OFFSET_BBOX; const numCoords = this.#view.getUint8(offset); if (numCoords === 0) { return undefined; } offset += 1; const bbox = []; for (let i$7 = 0; i$7 < 4; i$7++) { bbox.push(this.#view.getInt16(offset, true)); offset += 2; } return bbox; } get fontMatrix() { let offset = FontInfo.#OFFSET_FONT_MATRIX; const numPoints = this.#view.getUint8(offset); if (numPoints === 0) { return undefined; } offset += 1; const fontMatrix = []; for (let i$7 = 0; i$7 < 6; i$7++) { fontMatrix.push(this.#view.getFloat64(offset, true)); offset += 8; } return fontMatrix; } get defaultVMetrics() { let offset = FontInfo.#OFFSET_DEFAULT_VMETRICS; const numMetrics = this.#view.getUint8(offset); if (numMetrics === 0) { return undefined; } offset += 1; const defaultVMetrics = []; for (let i$7 = 0; i$7 < 3; i$7++) { defaultVMetrics.push(this.#view.getInt16(offset, true)); offset += 2; } return defaultVMetrics; } #readString(index) { assert$1(index < FontInfo.strings.length, "Invalid string index"); let offset = FontInfo.#OFFSET_STRINGS + 4; for (let i$7 = 0; i$7 < index; i$7++) { offset += this.#view.getUint32(offset) + 4; } const length = this.#view.getUint32(offset); const stringData = new Uint8Array(length); stringData.set(new Uint8Array(this.#buffer, offset + 4, length)); return this.#decoder.decode(stringData); } get fallbackName() { return this.#readString(0); } get loadedName() { return this.#readString(1); } get mimetype() { return this.#readString(2); } get name() { return this.#readString(3); } get data() { let offset = FontInfo.#OFFSET_STRINGS; const stringsLength = this.#view.getUint32(offset); offset += 4 + stringsLength; const systemFontInfoLength = this.#view.getUint32(offset); offset += 4 + systemFontInfoLength; const cssFontInfoLength = this.#view.getUint32(offset); offset += 4 + cssFontInfoLength; const length = this.#view.getUint32(offset); if (length === 0) { return undefined; } return new Uint8Array(this.#buffer, offset + 4, length); } clearData() { let offset = FontInfo.#OFFSET_STRINGS; const stringsLength = this.#view.getUint32(offset); offset += 4 + stringsLength; const systemFontInfoLength = this.#view.getUint32(offset); offset += 4 + systemFontInfoLength; const cssFontInfoLength = this.#view.getUint32(offset); offset += 4 + cssFontInfoLength; const length = this.#view.getUint32(offset); const data = new Uint8Array(this.#buffer, offset + 4, length); data.fill(0); this.#view.setUint32(offset, 0); } get cssFontInfo() { let offset = FontInfo.#OFFSET_STRINGS; const stringsLength = this.#view.getUint32(offset); offset += 4 + stringsLength; const systemFontInfoLength = this.#view.getUint32(offset); offset += 4 + systemFontInfoLength; const cssFontInfoLength = this.#view.getUint32(offset); if (cssFontInfoLength === 0) { return null; } const cssFontInfoData = new Uint8Array(cssFontInfoLength); cssFontInfoData.set(new Uint8Array(this.#buffer, offset + 4, cssFontInfoLength)); return new CssFontInfo(cssFontInfoData.buffer); } get systemFontInfo() { let offset = FontInfo.#OFFSET_STRINGS; const stringsLength = this.#view.getUint32(offset); offset += 4 + stringsLength; const systemFontInfoLength = this.#view.getUint32(offset); if (systemFontInfoLength === 0) { return null; } const systemFontInfoData = new Uint8Array(systemFontInfoLength); systemFontInfoData.set(new Uint8Array(this.#buffer, offset + 4, systemFontInfoLength)); return new SystemFontInfo(systemFontInfoData.buffer); } static write(font) { const systemFontInfoBuffer = font.systemFontInfo ? SystemFontInfo.write(font.systemFontInfo) : null; const cssFontInfoBuffer = font.cssFontInfo ? CssFontInfo.write(font.cssFontInfo) : null; const encoder = new TextEncoder(); const encodedStrings = {}; let stringsLength = 0; for (const prop of FontInfo.strings) { encodedStrings[prop] = encoder.encode(font[prop]); stringsLength += 4 + encodedStrings[prop].length; } const lengthEstimate = FontInfo.#OFFSET_STRINGS + 4 + stringsLength + 4 + (systemFontInfoBuffer ? systemFontInfoBuffer.byteLength : 0) + 4 + (cssFontInfoBuffer ? cssFontInfoBuffer.byteLength : 0) + 4 + (font.data ? font.data.length : 0); const buffer = new ArrayBuffer(lengthEstimate); const data = new Uint8Array(buffer); const view = new DataView(buffer); let offset = 0; const numBools = FontInfo.bools.length; let boolByte = 0, boolBit = 0; for (let i$7 = 0; i$7 < numBools; i$7++) { const value = font[FontInfo.bools[i$7]]; const bits = value === undefined ? 0 : value ? 2 : 1; boolByte |= bits << boolBit; boolBit += 2; if (boolBit === 8 || i$7 === numBools - 1) { view.setUint8(offset++, boolByte); boolByte = 0; boolBit = 0; } } assert$1(offset === FontInfo.#OFFSET_NUMBERS, "FontInfo.write: Boolean properties offset mismatch"); for (const prop of FontInfo.numbers) { view.setFloat64(offset, font[prop]); offset += 8; } assert$1(offset === FontInfo.#OFFSET_BBOX, "FontInfo.write: Number properties offset mismatch"); if (font.bbox) { view.setUint8(offset++, 4); for (const coord of font.bbox) { view.setInt16(offset, coord, true); offset += 2; } } else { view.setUint8(offset++, 0); offset += 2 * 4; } assert$1(offset === FontInfo.#OFFSET_FONT_MATRIX, "FontInfo.write: BBox properties offset mismatch"); if (font.fontMatrix) { view.setUint8(offset++, 6); for (const point of font.fontMatrix) { view.setFloat64(offset, point, true); offset += 8; } } else { view.setUint8(offset++, 0); offset += 8 * 6; } assert$1(offset === FontInfo.#OFFSET_DEFAULT_VMETRICS, "FontInfo.write: FontMatrix properties offset mismatch"); if (font.defaultVMetrics) { view.setUint8(offset++, 1); for (const metric of font.defaultVMetrics) { view.setInt16(offset, metric, true); offset += 2; } } else { view.setUint8(offset++, 0); offset += 3 * 2; } assert$1(offset === FontInfo.#OFFSET_STRINGS, "FontInfo.write: DefaultVMetrics properties offset mismatch"); view.setUint32(FontInfo.#OFFSET_STRINGS, 0); offset += 4; for (const prop of FontInfo.strings) { const encoded = encodedStrings[prop]; const length = encoded.length; view.setUint32(offset, length); data.set(encoded, offset + 4); offset += 4 + length; } view.setUint32(FontInfo.#OFFSET_STRINGS, offset - FontInfo.#OFFSET_STRINGS - 4); if (!systemFontInfoBuffer) { view.setUint32(offset, 0); offset += 4; } else { const length = systemFontInfoBuffer.byteLength; view.setUint32(offset, length); assert$1(offset + 4 + length <= buffer.byteLength, "FontInfo.write: Buffer overflow at systemFontInfo"); data.set(new Uint8Array(systemFontInfoBuffer), offset + 4); offset += 4 + length; } if (!cssFontInfoBuffer) { view.setUint32(offset, 0); offset += 4; } else { const length = cssFontInfoBuffer.byteLength; view.setUint32(offset, length); assert$1(offset + 4 + length <= buffer.byteLength, "FontInfo.write: Buffer overflow at cssFontInfo"); data.set(new Uint8Array(cssFontInfoBuffer), offset + 4); offset += 4 + length; } if (font.data === undefined) { view.setUint32(offset, 0); offset += 4; } else { view.setUint32(offset, font.data.length); data.set(font.data, offset + 4); offset += 4 + font.data.length; } assert$1(offset <= buffer.byteLength, "FontInfo.write: Buffer overflow"); return buffer.transferToFixedLength(offset); } }; PatternInfo = class PatternInfo { static #KIND = 0; static #HAS_BBOX = 1; static #HAS_BACKGROUND = 2; static #SHADING_TYPE = 3; static #N_COORD = 4; static #N_COLOR = 8; static #N_STOP = 12; static #N_FIGURES = 16; constructor(buffer) { this.buffer = buffer; this.view = new DataView(buffer); this.data = new Uint8Array(buffer); } static write(ir) { let kind, bbox = null, coords = [], colors = [], colorStops = [], figures = [], shadingType = null, background = null; switch (ir[0]) { case "RadialAxial": kind = ir[1] === "axial" ? 1 : 2; bbox = ir[2]; colorStops = ir[3]; if (kind === 1) { coords.push(...ir[4], ...ir[5]); } else { coords.push(ir[4][0], ir[4][1], ir[6], ir[5][0], ir[5][1], ir[7]); } break; case "Mesh": kind = 3; shadingType = ir[1]; coords = ir[2]; colors = ir[3]; figures = ir[4] || []; bbox = ir[6]; background = ir[7]; break; default: throw new Error(`Unsupported pattern type: ${ir[0]}`); } const nCoord = Math.floor(coords.length / 2); const nColor = Math.floor(colors.length / 3); const nStop = colorStops.length; const nFigures = figures.length; let figuresSize = 0; for (const figure of figures) { figuresSize += 1; figuresSize = Math.ceil(figuresSize / 4) * 4; figuresSize += 4 + figure.coords.length * 4; figuresSize += 4 + figure.colors.length * 4; if (figure.verticesPerRow !== undefined) { figuresSize += 4; } } const byteLen = 20 + nCoord * 8 + nColor * 3 + nStop * 8 + (bbox ? 16 : 0) + (background ? 3 : 0) + figuresSize; const buffer = new ArrayBuffer(byteLen); const dataView = new DataView(buffer); const u8data = new Uint8Array(buffer); dataView.setUint8(PatternInfo.#KIND, kind); dataView.setUint8(PatternInfo.#HAS_BBOX, bbox ? 1 : 0); dataView.setUint8(PatternInfo.#HAS_BACKGROUND, background ? 1 : 0); dataView.setUint8(PatternInfo.#SHADING_TYPE, shadingType); dataView.setUint32(PatternInfo.#N_COORD, nCoord, true); dataView.setUint32(PatternInfo.#N_COLOR, nColor, true); dataView.setUint32(PatternInfo.#N_STOP, nStop, true); dataView.setUint32(PatternInfo.#N_FIGURES, nFigures, true); let offset = 20; const coordsView = new Float32Array(buffer, offset, nCoord * 2); coordsView.set(coords); offset += nCoord * 8; u8data.set(colors, offset); offset += nColor * 3; for (const [pos, hex] of colorStops) { dataView.setFloat32(offset, pos, true); offset += 4; dataView.setUint32(offset, parseInt(hex.slice(1), 16), true); offset += 4; } if (bbox) { for (const v$3 of bbox) { dataView.setFloat32(offset, v$3, true); offset += 4; } } if (background) { u8data.set(background, offset); offset += 3; } for (let i$7 = 0; i$7 < figures.length; i$7++) { const figure = figures[i$7]; dataView.setUint8(offset, figure.type); offset += 1; offset = Math.ceil(offset / 4) * 4; dataView.setUint32(offset, figure.coords.length, true); offset += 4; const figureCoordsView = new Int32Array(buffer, offset, figure.coords.length); figureCoordsView.set(figure.coords); offset += figure.coords.length * 4; dataView.setUint32(offset, figure.colors.length, true); offset += 4; const colorsView = new Int32Array(buffer, offset, figure.colors.length); colorsView.set(figure.colors); offset += figure.colors.length * 4; if (figure.verticesPerRow !== undefined) { dataView.setUint32(offset, figure.verticesPerRow, true); offset += 4; } } return buffer; } getIR() { const dataView = this.view; const kind = this.data[PatternInfo.#KIND]; const hasBBox = !!this.data[PatternInfo.#HAS_BBOX]; const hasBackground = !!this.data[PatternInfo.#HAS_BACKGROUND]; const nCoord = dataView.getUint32(PatternInfo.#N_COORD, true); const nColor = dataView.getUint32(PatternInfo.#N_COLOR, true); const nStop = dataView.getUint32(PatternInfo.#N_STOP, true); const nFigures = dataView.getUint32(PatternInfo.#N_FIGURES, true); let offset = 20; const coords = new Float32Array(this.buffer, offset, nCoord * 2); offset += nCoord * 8; const colors = new Uint8Array(this.buffer, offset, nColor * 3); offset += nColor * 3; const stops = []; for (let i$7 = 0; i$7 < nStop; ++i$7) { const p$3 = dataView.getFloat32(offset, true); offset += 4; const rgb = dataView.getUint32(offset, true); offset += 4; stops.push([p$3, `#${rgb.toString(16).padStart(6, "0")}`]); } let bbox = null; if (hasBBox) { bbox = []; for (let i$7 = 0; i$7 < 4; ++i$7) { bbox.push(dataView.getFloat32(offset, true)); offset += 4; } } let background = null; if (hasBackground) { background = new Uint8Array(this.buffer, offset, 3); offset += 3; } const figures = []; for (let i$7 = 0; i$7 < nFigures; ++i$7) { const type = dataView.getUint8(offset); offset += 1; offset = Math.ceil(offset / 4) * 4; const coordsLength = dataView.getUint32(offset, true); offset += 4; const figureCoords = new Int32Array(this.buffer, offset, coordsLength); offset += coordsLength * 4; const colorsLength = dataView.getUint32(offset, true); offset += 4; const figureColors = new Int32Array(this.buffer, offset, colorsLength); offset += colorsLength * 4; const figure = { type, coords: figureCoords, colors: figureColors }; if (type === MeshFigureType.LATTICE) { figure.verticesPerRow = dataView.getUint32(offset, true); offset += 4; } figures.push(figure); } if (kind === 1) { return [ "RadialAxial", "axial", bbox, stops, Array.from(coords.slice(0, 2)), Array.from(coords.slice(2, 4)), null, null ]; } if (kind === 2) { return [ "RadialAxial", "radial", bbox, stops, [coords[0], coords[1]], [coords[3], coords[4]], coords[2], coords[5] ]; } if (kind === 3) { const shadingType = this.data[PatternInfo.#SHADING_TYPE]; let bounds = null; if (coords.length > 0) { let minX = coords[0], maxX = coords[0]; let minY = coords[1], maxY = coords[1]; for (let i$7 = 0; i$7 < coords.length; i$7 += 2) { const x$2 = coords[i$7], y$3 = coords[i$7 + 1]; minX = minX > x$2 ? x$2 : minX; minY = minY > y$3 ? y$3 : minY; maxX = maxX < x$2 ? x$2 : maxX; maxY = maxY < y$3 ? y$3 : maxY; } bounds = [ minX, minY, maxX, maxY ]; } return [ "Mesh", shadingType, coords, colors, figures, bounds, bbox, background ]; } throw new Error(`Unsupported pattern kind: ${kind}`); } }; ; isRefProxy = (v$3) => typeof v$3 === "object" && Number.isInteger(v$3?.num) && v$3.num >= 0 && Number.isInteger(v$3?.gen) && v$3.gen >= 0; isNameProxy = (v$3) => typeof v$3 === "object" && typeof v$3?.name === "string"; isValidExplicitDest = _isValidExplicitDest.bind(null, isRefProxy, isNameProxy); LoopbackPort = class { #listeners = new Map(); #deferred = Promise.resolve(); postMessage(obj, transfer) { const event = { data: structuredClone(obj, transfer ? { transfer } : null) }; this.#deferred.then(() => { for (const [listener] of this.#listeners) { listener.call(this, event); } }); } addEventListener(name, listener, options = null) { let rmAbort = null; if (options?.signal instanceof AbortSignal) { const { signal } = options; if (signal.aborted) { warn$2("LoopbackPort - cannot use an `aborted` signal."); return; } const onAbort = () => this.removeEventListener(name, listener); rmAbort = () => signal.removeEventListener("abort", onAbort); signal.addEventListener("abort", onAbort); } this.#listeners.set(listener, rmAbort); } removeEventListener(name, listener) { const rmAbort = this.#listeners.get(listener); rmAbort?.(); this.#listeners.delete(listener); } terminate() { for (const [, rmAbort] of this.#listeners) { rmAbort?.(); } this.#listeners.clear(); } }; ; CallbackKind = { DATA: 1, ERROR: 2 }; StreamKind = { CANCEL: 1, CANCEL_COMPLETE: 2, CLOSE: 3, ENQUEUE: 4, ERROR: 5, PULL: 6, PULL_COMPLETE: 7, START_COMPLETE: 8 }; MessageHandler = class { #messageAC = new AbortController(); constructor(sourceName, targetName, comObj) { this.sourceName = sourceName; this.targetName = targetName; this.comObj = comObj; this.callbackId = 1; this.streamId = 1; this.streamSinks = Object.create(null); this.streamControllers = Object.create(null); this.callbackCapabilities = Object.create(null); this.actionHandler = Object.create(null); comObj.addEventListener("message", this.#onMessage.bind(this), { signal: this.#messageAC.signal }); } #onMessage({ data }) { if (data.targetName !== this.sourceName) { return; } if (data.stream) { this.#processStreamMessage(data); return; } if (data.callback) { const callbackId = data.callbackId; const capability = this.callbackCapabilities[callbackId]; if (!capability) { throw new Error(`Cannot resolve callback ${callbackId}`); } delete this.callbackCapabilities[callbackId]; if (data.callback === CallbackKind.DATA) { capability.resolve(data.data); } else if (data.callback === CallbackKind.ERROR) { capability.reject(wrapReason(data.reason)); } else { throw new Error("Unexpected callback case"); } return; } const action = this.actionHandler[data.action]; if (!action) { throw new Error(`Unknown action from worker: ${data.action}`); } if (data.callbackId) { const sourceName = this.sourceName, targetName = data.sourceName, comObj = this.comObj; Promise.try(action, data.data).then(function(result) { comObj.postMessage({ sourceName, targetName, callback: CallbackKind.DATA, callbackId: data.callbackId, data: result }); }, function(reason) { comObj.postMessage({ sourceName, targetName, callback: CallbackKind.ERROR, callbackId: data.callbackId, reason: wrapReason(reason) }); }); return; } if (data.streamId) { this.#createStreamSink(data); return; } action(data.data); } on(actionName, handler) { const ah = this.actionHandler; if (ah[actionName]) { throw new Error(`There is already an actionName called "${actionName}"`); } ah[actionName] = handler; } send(actionName, data, transfers) { this.comObj.postMessage({ sourceName: this.sourceName, targetName: this.targetName, action: actionName, data }, transfers); } sendWithPromise(actionName, data, transfers) { const callbackId = this.callbackId++; const capability = Promise.withResolvers(); this.callbackCapabilities[callbackId] = capability; try { this.comObj.postMessage({ sourceName: this.sourceName, targetName: this.targetName, action: actionName, callbackId, data }, transfers); } catch (ex) { capability.reject(ex); } return capability.promise; } sendWithStream(actionName, data, queueingStrategy, transfers) { const streamId = this.streamId++, sourceName = this.sourceName, targetName = this.targetName, comObj = this.comObj; return new ReadableStream({ start: (controller) => { const startCapability = Promise.withResolvers(); this.streamControllers[streamId] = { controller, startCall: startCapability, pullCall: null, cancelCall: null, isClosed: false }; comObj.postMessage({ sourceName, targetName, action: actionName, streamId, data, desiredSize: controller.desiredSize }, transfers); return startCapability.promise; }, pull: (controller) => { const pullCapability = Promise.withResolvers(); this.streamControllers[streamId].pullCall = pullCapability; comObj.postMessage({ sourceName, targetName, stream: StreamKind.PULL, streamId, desiredSize: controller.desiredSize }); return pullCapability.promise; }, cancel: (reason) => { assert$1(reason instanceof Error, "cancel must have a valid reason"); const cancelCapability = Promise.withResolvers(); this.streamControllers[streamId].cancelCall = cancelCapability; this.streamControllers[streamId].isClosed = true; comObj.postMessage({ sourceName, targetName, stream: StreamKind.CANCEL, streamId, reason: wrapReason(reason) }); return cancelCapability.promise; } }, queueingStrategy); } #createStreamSink(data) { const streamId = data.streamId, sourceName = this.sourceName, targetName = data.sourceName, comObj = this.comObj; const self$1 = this, action = this.actionHandler[data.action]; const streamSink = { enqueue(chunk, size = 1, transfers) { if (this.isCancelled) { return; } const lastDesiredSize = this.desiredSize; this.desiredSize -= size; if (lastDesiredSize > 0 && this.desiredSize <= 0) { this.sinkCapability = Promise.withResolvers(); this.ready = this.sinkCapability.promise; } comObj.postMessage({ sourceName, targetName, stream: StreamKind.ENQUEUE, streamId, chunk }, transfers); }, close() { if (this.isCancelled) { return; } this.isCancelled = true; comObj.postMessage({ sourceName, targetName, stream: StreamKind.CLOSE, streamId }); delete self$1.streamSinks[streamId]; }, error(reason) { assert$1(reason instanceof Error, "error must have a valid reason"); if (this.isCancelled) { return; } this.isCancelled = true; comObj.postMessage({ sourceName, targetName, stream: StreamKind.ERROR, streamId, reason: wrapReason(reason) }); }, sinkCapability: Promise.withResolvers(), onPull: null, onCancel: null, isCancelled: false, desiredSize: data.desiredSize, ready: null }; streamSink.sinkCapability.resolve(); streamSink.ready = streamSink.sinkCapability.promise; this.streamSinks[streamId] = streamSink; Promise.try(action, data.data, streamSink).then(function() { comObj.postMessage({ sourceName, targetName, stream: StreamKind.START_COMPLETE, streamId, success: true }); }, function(reason) { comObj.postMessage({ sourceName, targetName, stream: StreamKind.START_COMPLETE, streamId, reason: wrapReason(reason) }); }); } #processStreamMessage(data) { const streamId = data.streamId, sourceName = this.sourceName, targetName = data.sourceName, comObj = this.comObj; const streamController = this.streamControllers[streamId], streamSink = this.streamSinks[streamId]; switch (data.stream) { case StreamKind.START_COMPLETE: if (data.success) { streamController.startCall.resolve(); } else { streamController.startCall.reject(wrapReason(data.reason)); } break; case StreamKind.PULL_COMPLETE: if (data.success) { streamController.pullCall.resolve(); } else { streamController.pullCall.reject(wrapReason(data.reason)); } break; case StreamKind.PULL: if (!streamSink) { comObj.postMessage({ sourceName, targetName, stream: StreamKind.PULL_COMPLETE, streamId, success: true }); break; } if (streamSink.desiredSize <= 0 && data.desiredSize > 0) { streamSink.sinkCapability.resolve(); } streamSink.desiredSize = data.desiredSize; Promise.try(streamSink.onPull || onFn).then(function() { comObj.postMessage({ sourceName, targetName, stream: StreamKind.PULL_COMPLETE, streamId, success: true }); }, function(reason) { comObj.postMessage({ sourceName, targetName, stream: StreamKind.PULL_COMPLETE, streamId, reason: wrapReason(reason) }); }); break; case StreamKind.ENQUEUE: assert$1(streamController, "enqueue should have stream controller"); if (streamController.isClosed) { break; } streamController.controller.enqueue(data.chunk); break; case StreamKind.CLOSE: assert$1(streamController, "close should have stream controller"); if (streamController.isClosed) { break; } streamController.isClosed = true; streamController.controller.close(); this.#deleteStreamController(streamController, streamId); break; case StreamKind.ERROR: assert$1(streamController, "error should have stream controller"); streamController.controller.error(wrapReason(data.reason)); this.#deleteStreamController(streamController, streamId); break; case StreamKind.CANCEL_COMPLETE: if (data.success) { streamController.cancelCall.resolve(); } else { streamController.cancelCall.reject(wrapReason(data.reason)); } this.#deleteStreamController(streamController, streamId); break; case StreamKind.CANCEL: if (!streamSink) { break; } const dataReason = wrapReason(data.reason); Promise.try(streamSink.onCancel || onFn, dataReason).then(function() { comObj.postMessage({ sourceName, targetName, stream: StreamKind.CANCEL_COMPLETE, streamId, success: true }); }, function(reason) { comObj.postMessage({ sourceName, targetName, stream: StreamKind.CANCEL_COMPLETE, streamId, reason: wrapReason(reason) }); }); streamSink.sinkCapability.reject(dataReason); streamSink.isCancelled = true; delete this.streamSinks[streamId]; break; default: throw new Error("Unexpected stream case"); } } async #deleteStreamController(streamController, streamId) { await Promise.allSettled([ streamController.startCall?.promise, streamController.pullCall?.promise, streamController.cancelCall?.promise ]); delete this.streamControllers[streamId]; } destroy() { this.#messageAC?.abort(); this.#messageAC = null; } }; ; BaseCanvasFactory = class { #enableHWA = false; constructor({ enableHWA = false }) { this.#enableHWA = enableHWA; } create(width, height) { if (width <= 0 || height <= 0) { throw new Error("Invalid canvas size"); } const canvas = this._createCanvas(width, height); return { canvas, context: canvas.getContext("2d", { willReadFrequently: !this.#enableHWA }) }; } reset(canvasAndContext, width, height) { if (!canvasAndContext.canvas) { throw new Error("Canvas is not specified"); } if (width <= 0 || height <= 0) { throw new Error("Invalid canvas size"); } canvasAndContext.canvas.width = width; canvasAndContext.canvas.height = height; } destroy(canvasAndContext) { if (!canvasAndContext.canvas) { throw new Error("Canvas is not specified"); } canvasAndContext.canvas.width = 0; canvasAndContext.canvas.height = 0; canvasAndContext.canvas = null; canvasAndContext.context = null; } _createCanvas(width, height) { unreachable("Abstract method `_createCanvas` called."); } }; DOMCanvasFactory = class extends BaseCanvasFactory { constructor({ ownerDocument = globalThis.document, enableHWA = false }) { super({ enableHWA }); this._document = ownerDocument; } _createCanvas(width, height) { const canvas = this._document.createElement("canvas"); canvas.width = width; canvas.height = height; return canvas; } }; ; BaseCMapReaderFactory = class { constructor({ baseUrl = null, isCompressed = true }) { this.baseUrl = baseUrl; this.isCompressed = isCompressed; } async fetch({ name }) { if (!this.baseUrl) { throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided."); } if (!name) { throw new Error("CMap name must be specified."); } const url = this.baseUrl + name + (this.isCompressed ? ".bcmap" : ""); return this._fetch(url).then((cMapData) => ({ cMapData, isCompressed: this.isCompressed })).catch((reason) => { throw new Error(`Unable to load ${this.isCompressed ? "binary " : ""}CMap at: ${url}`); }); } async _fetch(url) { unreachable("Abstract method `_fetch` called."); } }; DOMCMapReaderFactory = class extends BaseCMapReaderFactory { async _fetch(url) { const data = await fetchData(url, this.isCompressed ? "arraybuffer" : "text"); return data instanceof ArrayBuffer ? new Uint8Array(data) : stringToBytes(data); } }; ; BaseFilterFactory = class { addFilter(maps) { return "none"; } addHCMFilter(fgColor, bgColor) { return "none"; } addAlphaFilter(map$2) { return "none"; } addLuminosityFilter(map$2) { return "none"; } addHighlightHCMFilter(filterName, fgColor, bgColor, newFgColor, newBgColor) { return "none"; } destroy(keepHCM = false) {} }; DOMFilterFactory = class extends BaseFilterFactory { #baseUrl; #_cache; #_defs; #docId; #document; #_hcmCache; #id = 0; constructor({ docId, ownerDocument = globalThis.document }) { super(); this.#docId = docId; this.#document = ownerDocument; } get #cache() { return this.#_cache ||= new Map(); } get #hcmCache() { return this.#_hcmCache ||= new Map(); } get #defs() { if (!this.#_defs) { const div = this.#document.createElement("div"); const { style } = div; style.visibility = "hidden"; style.contain = "strict"; style.width = style.height = 0; style.position = "absolute"; style.top = style.left = 0; style.zIndex = -1; const svg = this.#document.createElementNS(SVG_NS, "svg"); svg.setAttribute("width", 0); svg.setAttribute("height", 0); this.#_defs = this.#document.createElementNS(SVG_NS, "defs"); div.append(svg); svg.append(this.#_defs); this.#document.body.append(div); } return this.#_defs; } #createTables(maps) { if (maps.length === 1) { const mapR$1 = maps[0]; const buffer = new Array(256); for (let i$7 = 0; i$7 < 256; i$7++) { buffer[i$7] = mapR$1[i$7] / 255; } const table = buffer.join(","); return [ table, table, table ]; } const [mapR, mapG, mapB] = maps; const bufferR = new Array(256); const bufferG = new Array(256); const bufferB = new Array(256); for (let i$7 = 0; i$7 < 256; i$7++) { bufferR[i$7] = mapR[i$7] / 255; bufferG[i$7] = mapG[i$7] / 255; bufferB[i$7] = mapB[i$7] / 255; } return [ bufferR.join(","), bufferG.join(","), bufferB.join(",") ]; } #createUrl(id) { if (this.#baseUrl === undefined) { this.#baseUrl = ""; const url = this.#document.URL; if (url !== this.#document.baseURI) { if (isDataScheme(url)) { warn$2("#createUrl: ignore \"data:\"-URL for performance reasons."); } else { this.#baseUrl = updateUrlHash(url, ""); } } } return `url(${this.#baseUrl}#${id})`; } addFilter(maps) { if (!maps) { return "none"; } let value = this.#cache.get(maps); if (value) { return value; } const [tableR, tableG, tableB] = this.#createTables(maps); const key = maps.length === 1 ? tableR : `${tableR}${tableG}${tableB}`; value = this.#cache.get(key); if (value) { this.#cache.set(maps, value); return value; } const id = `g_${this.#docId}_transfer_map_${this.#id++}`; const url = this.#createUrl(id); this.#cache.set(maps, url); this.#cache.set(key, url); const filter = this.#createFilter(id); this.#addTransferMapConversion(tableR, tableG, tableB, filter); return url; } addHCMFilter(fgColor, bgColor) { const key = `${fgColor}-${bgColor}`; const filterName = "base"; let info$1 = this.#hcmCache.get(filterName); if (info$1?.key === key) { return info$1.url; } if (info$1) { info$1.filter?.remove(); info$1.key = key; info$1.url = "none"; info$1.filter = null; } else { info$1 = { key, url: "none", filter: null }; this.#hcmCache.set(filterName, info$1); } if (!fgColor || !bgColor) { return info$1.url; } const fgRGB = this.#getRGB(fgColor); fgColor = Util.makeHexColor(...fgRGB); const bgRGB = this.#getRGB(bgColor); bgColor = Util.makeHexColor(...bgRGB); this.#defs.style.color = ""; if (fgColor === "#000000" && bgColor === "#ffffff" || fgColor === bgColor) { return info$1.url; } const map$2 = new Array(256); for (let i$7 = 0; i$7 <= 255; i$7++) { const x$2 = i$7 / 255; map$2[i$7] = x$2 <= .03928 ? x$2 / 12.92 : ((x$2 + .055) / 1.055) ** 2.4; } const table = map$2.join(","); const id = `g_${this.#docId}_hcm_filter`; const filter = info$1.filter = this.#createFilter(id); this.#addTransferMapConversion(table, table, table, filter); this.#addGrayConversion(filter); const getSteps = (c$7, n$9) => { const start = fgRGB[c$7] / 255; const end = bgRGB[c$7] / 255; const arr = new Array(n$9 + 1); for (let i$7 = 0; i$7 <= n$9; i$7++) { arr[i$7] = start + i$7 / n$9 * (end - start); } return arr.join(","); }; this.#addTransferMapConversion(getSteps(0, 5), getSteps(1, 5), getSteps(2, 5), filter); info$1.url = this.#createUrl(id); return info$1.url; } addAlphaFilter(map$2) { let value = this.#cache.get(map$2); if (value) { return value; } const [tableA] = this.#createTables([map$2]); const key = `alpha_${tableA}`; value = this.#cache.get(key); if (value) { this.#cache.set(map$2, value); return value; } const id = `g_${this.#docId}_alpha_map_${this.#id++}`; const url = this.#createUrl(id); this.#cache.set(map$2, url); this.#cache.set(key, url); const filter = this.#createFilter(id); this.#addTransferMapAlphaConversion(tableA, filter); return url; } addLuminosityFilter(map$2) { let value = this.#cache.get(map$2 || "luminosity"); if (value) { return value; } let tableA, key; if (map$2) { [tableA] = this.#createTables([map$2]); key = `luminosity_${tableA}`; } else { key = "luminosity"; } value = this.#cache.get(key); if (value) { this.#cache.set(map$2, value); return value; } const id = `g_${this.#docId}_luminosity_map_${this.#id++}`; const url = this.#createUrl(id); this.#cache.set(map$2, url); this.#cache.set(key, url); const filter = this.#createFilter(id); this.#addLuminosityConversion(filter); if (map$2) { this.#addTransferMapAlphaConversion(tableA, filter); } return url; } addHighlightHCMFilter(filterName, fgColor, bgColor, newFgColor, newBgColor) { const key = `${fgColor}-${bgColor}-${newFgColor}-${newBgColor}`; let info$1 = this.#hcmCache.get(filterName); if (info$1?.key === key) { return info$1.url; } if (info$1) { info$1.filter?.remove(); info$1.key = key; info$1.url = "none"; info$1.filter = null; } else { info$1 = { key, url: "none", filter: null }; this.#hcmCache.set(filterName, info$1); } if (!fgColor || !bgColor) { return info$1.url; } const [fgRGB, bgRGB] = [fgColor, bgColor].map(this.#getRGB.bind(this)); let fgGray = Math.round(.2126 * fgRGB[0] + .7152 * fgRGB[1] + .0722 * fgRGB[2]); let bgGray = Math.round(.2126 * bgRGB[0] + .7152 * bgRGB[1] + .0722 * bgRGB[2]); let [newFgRGB, newBgRGB] = [newFgColor, newBgColor].map(this.#getRGB.bind(this)); if (bgGray < fgGray) { [fgGray, bgGray, newFgRGB, newBgRGB] = [ bgGray, fgGray, newBgRGB, newFgRGB ]; } this.#defs.style.color = ""; const getSteps = (fg, bg, n$9) => { const arr = new Array(256); const step = (bgGray - fgGray) / n$9; const newStart = fg / 255; const newStep = (bg - fg) / (255 * n$9); let prev = 0; for (let i$7 = 0; i$7 <= n$9; i$7++) { const k$2 = Math.round(fgGray + i$7 * step); const value = newStart + i$7 * newStep; for (let j$2 = prev; j$2 <= k$2; j$2++) { arr[j$2] = value; } prev = k$2 + 1; } for (let i$7 = prev; i$7 < 256; i$7++) { arr[i$7] = arr[prev - 1]; } return arr.join(","); }; const id = `g_${this.#docId}_hcm_${filterName}_filter`; const filter = info$1.filter = this.#createFilter(id); this.#addGrayConversion(filter); this.#addTransferMapConversion(getSteps(newFgRGB[0], newBgRGB[0], 5), getSteps(newFgRGB[1], newBgRGB[1], 5), getSteps(newFgRGB[2], newBgRGB[2], 5), filter); info$1.url = this.#createUrl(id); return info$1.url; } destroy(keepHCM = false) { if (keepHCM && this.#_hcmCache?.size) { return; } this.#_defs?.parentNode.parentNode.remove(); this.#_defs = null; this.#_cache?.clear(); this.#_cache = null; this.#_hcmCache?.clear(); this.#_hcmCache = null; this.#id = 0; } #addLuminosityConversion(filter) { const feColorMatrix = this.#document.createElementNS(SVG_NS, "feColorMatrix"); feColorMatrix.setAttribute("type", "matrix"); feColorMatrix.setAttribute("values", "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"); filter.append(feColorMatrix); } #addGrayConversion(filter) { const feColorMatrix = this.#document.createElementNS(SVG_NS, "feColorMatrix"); feColorMatrix.setAttribute("type", "matrix"); feColorMatrix.setAttribute("values", "0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"); filter.append(feColorMatrix); } #createFilter(id) { const filter = this.#document.createElementNS(SVG_NS, "filter"); filter.setAttribute("color-interpolation-filters", "sRGB"); filter.setAttribute("id", id); this.#defs.append(filter); return filter; } #appendFeFunc(feComponentTransfer, func, table) { const feFunc = this.#document.createElementNS(SVG_NS, func); feFunc.setAttribute("type", "discrete"); feFunc.setAttribute("tableValues", table); feComponentTransfer.append(feFunc); } #addTransferMapConversion(rTable, gTable, bTable, filter) { const feComponentTransfer = this.#document.createElementNS(SVG_NS, "feComponentTransfer"); filter.append(feComponentTransfer); this.#appendFeFunc(feComponentTransfer, "feFuncR", rTable); this.#appendFeFunc(feComponentTransfer, "feFuncG", gTable); this.#appendFeFunc(feComponentTransfer, "feFuncB", bTable); } #addTransferMapAlphaConversion(aTable, filter) { const feComponentTransfer = this.#document.createElementNS(SVG_NS, "feComponentTransfer"); filter.append(feComponentTransfer); this.#appendFeFunc(feComponentTransfer, "feFuncA", aTable); } #getRGB(color) { this.#defs.style.color = color; return getRGB(getComputedStyle(this.#defs).getPropertyValue("color")); } }; ; BaseStandardFontDataFactory = class { constructor({ baseUrl = null }) { this.baseUrl = baseUrl; } async fetch({ filename }) { if (!this.baseUrl) { throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided."); } if (!filename) { throw new Error("Font filename must be specified."); } const url = `${this.baseUrl}${filename}`; return this._fetch(url).catch((reason) => { throw new Error(`Unable to load font data at: ${url}`); }); } async _fetch(url) { unreachable("Abstract method `_fetch` called."); } }; DOMStandardFontDataFactory = class extends BaseStandardFontDataFactory { async _fetch(url) { const data = await fetchData(url, "arraybuffer"); return new Uint8Array(data); } }; ; BaseWasmFactory = class { constructor({ baseUrl = null }) { this.baseUrl = baseUrl; } async fetch({ filename }) { if (!this.baseUrl) { throw new Error("Ensure that the `wasmUrl` API parameter is provided."); } if (!filename) { throw new Error("Wasm filename must be specified."); } const url = `${this.baseUrl}${filename}`; return this._fetch(url).catch((reason) => { throw new Error(`Unable to load wasm data at: ${url}`); }); } async _fetch(url) { unreachable("Abstract method `_fetch` called."); } }; DOMWasmFactory = class extends BaseWasmFactory { async _fetch(url) { const data = await fetchData(url, "arraybuffer"); return new Uint8Array(data); } }; ; if (isNodeJS) { warn$2("Please use the `legacy` build in Node.js environments."); } NodeFilterFactory = class extends BaseFilterFactory {}; NodeCanvasFactory = class extends BaseCanvasFactory { _createCanvas(width, height) { const require$1 = process.getBuiltinModule("module").createRequire(import.meta.url); const canvas = require$1("@napi-rs/canvas"); return canvas.createCanvas(width, height); } }; NodeCMapReaderFactory = class extends BaseCMapReaderFactory { async _fetch(url) { return node_utils_fetchData(url); } }; NodeStandardFontDataFactory = class extends BaseStandardFontDataFactory { async _fetch(url) { return node_utils_fetchData(url); } }; NodeWasmFactory = class extends BaseWasmFactory { async _fetch(url) { return node_utils_fetchData(url); } }; ; FORCED_DEPENDENCY_LABEL = "__forcedDependency"; ({floor, ceil} = Math); EMPTY_BBOX = new Uint32Array(new Uint8Array([ 255, 255, 0, 0 ]).buffer)[0]; BBoxReader = class { #bboxes; #coords; constructor(bboxes, coords) { this.#bboxes = bboxes; this.#coords = coords; } get length() { return this.#bboxes.length; } isEmpty(i$7) { return this.#bboxes[i$7] === EMPTY_BBOX; } minX(i$7) { return this.#coords[i$7 * 4 + 0] / 256; } minY(i$7) { return this.#coords[i$7 * 4 + 1] / 256; } maxX(i$7) { return (this.#coords[i$7 * 4 + 2] + 1) / 256; } maxY(i$7) { return (this.#coords[i$7 * 4 + 3] + 1) / 256; } }; ensureDebugMetadata = (map$2, key) => { if (!map$2) { return undefined; } let value = map$2.get(key); if (!value) { value = { dependencies: new Set(), isRenderingOperation: false }; map$2.set(key, value); } return value; }; CanvasDependencyTracker = class { #simple = { __proto__: null }; #incremental = { __proto__: null, transform: [], moveText: [], sameLineText: [], [FORCED_DEPENDENCY_LABEL]: [] }; #namedDependencies = new Map(); #savesStack = []; #markedContentStack = []; #baseTransformStack = [[ 1, 0, 0, 1, 0, 0 ]]; #clipBox = [ -Infinity, -Infinity, Infinity, Infinity ]; #pendingBBox = new Float64Array([ Infinity, Infinity, -Infinity, -Infinity ]); #pendingBBoxIdx = -1; #pendingDependencies = new Set(); #operations = new Map(); #fontBBoxTrustworthy = new Map(); #canvasWidth; #canvasHeight; #bboxesCoords; #bboxes; #debugMetadata; constructor(canvas, operationsCount, recordDebugMetadata = false) { this.#canvasWidth = canvas.width; this.#canvasHeight = canvas.height; this.#initializeBBoxes(operationsCount); if (recordDebugMetadata) { this.#debugMetadata = new Map(); } } growOperationsCount(operationsCount) { if (operationsCount >= this.#bboxes.length) { this.#initializeBBoxes(operationsCount, this.#bboxes); } } #initializeBBoxes(operationsCount, oldBBoxes) { const buffer = new ArrayBuffer(operationsCount * 4); this.#bboxesCoords = new Uint8ClampedArray(buffer); this.#bboxes = new Uint32Array(buffer); if (oldBBoxes && oldBBoxes.length > 0) { this.#bboxes.set(oldBBoxes); this.#bboxes.fill(EMPTY_BBOX, oldBBoxes.length); } else { this.#bboxes.fill(EMPTY_BBOX); } } save(opIdx) { this.#simple = { __proto__: this.#simple }; this.#incremental = { __proto__: this.#incremental, transform: { __proto__: this.#incremental.transform }, moveText: { __proto__: this.#incremental.moveText }, sameLineText: { __proto__: this.#incremental.sameLineText }, [FORCED_DEPENDENCY_LABEL]: { __proto__: this.#incremental[FORCED_DEPENDENCY_LABEL] } }; this.#clipBox = { __proto__: this.#clipBox }; this.#savesStack.push(opIdx); return this; } restore(opIdx) { const previous = Object.getPrototypeOf(this.#simple); if (previous === null) { return this; } this.#simple = previous; this.#incremental = Object.getPrototypeOf(this.#incremental); this.#clipBox = Object.getPrototypeOf(this.#clipBox); const lastSave = this.#savesStack.pop(); if (lastSave !== undefined) { ensureDebugMetadata(this.#debugMetadata, opIdx)?.dependencies.add(lastSave); this.#bboxes[opIdx] = this.#bboxes[lastSave]; } return this; } recordOpenMarker(idx) { this.#savesStack.push(idx); return this; } getOpenMarker() { if (this.#savesStack.length === 0) { return null; } return this.#savesStack.at(-1); } recordCloseMarker(opIdx) { const lastSave = this.#savesStack.pop(); if (lastSave !== undefined) { ensureDebugMetadata(this.#debugMetadata, opIdx)?.dependencies.add(lastSave); this.#bboxes[opIdx] = this.#bboxes[lastSave]; } return this; } beginMarkedContent(opIdx) { this.#markedContentStack.push(opIdx); return this; } endMarkedContent(opIdx) { const lastSave = this.#markedContentStack.pop(); if (lastSave !== undefined) { ensureDebugMetadata(this.#debugMetadata, opIdx)?.dependencies.add(lastSave); this.#bboxes[opIdx] = this.#bboxes[lastSave]; } return this; } pushBaseTransform(ctx) { this.#baseTransformStack.push(Util.multiplyByDOMMatrix(this.#baseTransformStack.at(-1), ctx.getTransform())); return this; } popBaseTransform() { if (this.#baseTransformStack.length > 1) { this.#baseTransformStack.pop(); } return this; } recordSimpleData(name, idx) { this.#simple[name] = idx; return this; } recordIncrementalData(name, idx) { this.#incremental[name].push(idx); return this; } resetIncrementalData(name, idx) { this.#incremental[name].length = 0; return this; } recordNamedData(name, idx) { this.#namedDependencies.set(name, idx); return this; } recordSimpleDataFromNamed(name, depName, fallbackIdx) { this.#simple[name] = this.#namedDependencies.get(depName) ?? fallbackIdx; } recordFutureForcedDependency(name, idx) { this.recordIncrementalData(FORCED_DEPENDENCY_LABEL, idx); return this; } inheritSimpleDataAsFutureForcedDependencies(names) { for (const name of names) { if (name in this.#simple) { this.recordFutureForcedDependency(name, this.#simple[name]); } } return this; } inheritPendingDependenciesAsFutureForcedDependencies() { for (const dep of this.#pendingDependencies) { this.recordFutureForcedDependency(FORCED_DEPENDENCY_LABEL, dep); } return this; } resetBBox(idx) { if (this.#pendingBBoxIdx !== idx) { this.#pendingBBoxIdx = idx; this.#pendingBBox[0] = Infinity; this.#pendingBBox[1] = Infinity; this.#pendingBBox[2] = -Infinity; this.#pendingBBox[3] = -Infinity; } return this; } recordClipBox(idx, ctx, minX, maxX, minY, maxY) { const transform = Util.multiplyByDOMMatrix(this.#baseTransformStack.at(-1), ctx.getTransform()); const clipBox = [ Infinity, Infinity, -Infinity, -Infinity ]; Util.axialAlignedBoundingBox([ minX, minY, maxX, maxY ], transform, clipBox); const intersection = Util.intersect(this.#clipBox, clipBox); if (intersection) { this.#clipBox[0] = intersection[0]; this.#clipBox[1] = intersection[1]; this.#clipBox[2] = intersection[2]; this.#clipBox[3] = intersection[3]; } else { this.#clipBox[0] = this.#clipBox[1] = Infinity; this.#clipBox[2] = this.#clipBox[3] = -Infinity; } return this; } recordBBox(idx, ctx, minX, maxX, minY, maxY) { const clipBox = this.#clipBox; if (clipBox[0] === Infinity) { return this; } const transform = Util.multiplyByDOMMatrix(this.#baseTransformStack.at(-1), ctx.getTransform()); if (clipBox[0] === -Infinity) { Util.axialAlignedBoundingBox([ minX, minY, maxX, maxY ], transform, this.#pendingBBox); return this; } const bbox = [ Infinity, Infinity, -Infinity, -Infinity ]; Util.axialAlignedBoundingBox([ minX, minY, maxX, maxY ], transform, bbox); this.#pendingBBox[0] = Math.min(this.#pendingBBox[0], Math.max(bbox[0], clipBox[0])); this.#pendingBBox[1] = Math.min(this.#pendingBBox[1], Math.max(bbox[1], clipBox[1])); this.#pendingBBox[2] = Math.max(this.#pendingBBox[2], Math.min(bbox[2], clipBox[2])); this.#pendingBBox[3] = Math.max(this.#pendingBBox[3], Math.min(bbox[3], clipBox[3])); return this; } recordCharacterBBox(idx, ctx, font, scale = 1, x$2 = 0, y$3 = 0, getMeasure) { const fontBBox = font.bbox; let isBBoxTrustworthy; let computedBBox; if (fontBBox) { isBBoxTrustworthy = fontBBox[2] !== fontBBox[0] && fontBBox[3] !== fontBBox[1] && this.#fontBBoxTrustworthy.get(font); if (isBBoxTrustworthy !== false) { computedBBox = [ 0, 0, 0, 0 ]; Util.axialAlignedBoundingBox(fontBBox, font.fontMatrix, computedBBox); if (scale !== 1 || x$2 !== 0 || y$3 !== 0) { Util.scaleMinMax([ scale, 0, 0, -scale, x$2, y$3 ], computedBBox); } if (isBBoxTrustworthy) { return this.recordBBox(idx, ctx, computedBBox[0], computedBBox[2], computedBBox[1], computedBBox[3]); } } } if (!getMeasure) { return this.recordFullPageBBox(idx); } const measure = getMeasure(); if (fontBBox && computedBBox && isBBoxTrustworthy === undefined) { isBBoxTrustworthy = computedBBox[0] <= x$2 - measure.actualBoundingBoxLeft && computedBBox[2] >= x$2 + measure.actualBoundingBoxRight && computedBBox[1] <= y$3 - measure.actualBoundingBoxAscent && computedBBox[3] >= y$3 + measure.actualBoundingBoxDescent; this.#fontBBoxTrustworthy.set(font, isBBoxTrustworthy); if (isBBoxTrustworthy) { return this.recordBBox(idx, ctx, computedBBox[0], computedBBox[2], computedBBox[1], computedBBox[3]); } } return this.recordBBox(idx, ctx, x$2 - measure.actualBoundingBoxLeft, x$2 + measure.actualBoundingBoxRight, y$3 - measure.actualBoundingBoxAscent, y$3 + measure.actualBoundingBoxDescent); } recordFullPageBBox(idx) { this.#pendingBBox[0] = Math.max(0, this.#clipBox[0]); this.#pendingBBox[1] = Math.max(0, this.#clipBox[1]); this.#pendingBBox[2] = Math.min(this.#canvasWidth, this.#clipBox[2]); this.#pendingBBox[3] = Math.min(this.#canvasHeight, this.#clipBox[3]); return this; } getSimpleIndex(dependencyName) { return this.#simple[dependencyName]; } recordDependencies(idx, dependencyNames) { const pendingDependencies = this.#pendingDependencies; const simple = this.#simple; const incremental = this.#incremental; for (const name of dependencyNames) { if (name in this.#simple) { pendingDependencies.add(simple[name]); } else if (name in incremental) { incremental[name].forEach(pendingDependencies.add, pendingDependencies); } } return this; } recordNamedDependency(idx, name) { if (this.#namedDependencies.has(name)) { this.#pendingDependencies.add(this.#namedDependencies.get(name)); } return this; } recordOperation(idx, preserve = false) { this.recordDependencies(idx, [FORCED_DEPENDENCY_LABEL]); if (this.#debugMetadata) { const metadata = ensureDebugMetadata(this.#debugMetadata, idx); const { dependencies } = metadata; this.#pendingDependencies.forEach(dependencies.add, dependencies); this.#savesStack.forEach(dependencies.add, dependencies); this.#markedContentStack.forEach(dependencies.add, dependencies); dependencies.delete(idx); metadata.isRenderingOperation = true; } if (this.#pendingBBoxIdx === idx) { const minX = floor(this.#pendingBBox[0] * 256 / this.#canvasWidth); const minY = floor(this.#pendingBBox[1] * 256 / this.#canvasHeight); const maxX = ceil(this.#pendingBBox[2] * 256 / this.#canvasWidth); const maxY = ceil(this.#pendingBBox[3] * 256 / this.#canvasHeight); expandBBox(this.#bboxesCoords, idx, minX, minY, maxX, maxY); for (const depIdx of this.#pendingDependencies) { if (depIdx !== idx) { expandBBox(this.#bboxesCoords, depIdx, minX, minY, maxX, maxY); } } for (const saveIdx of this.#savesStack) { if (saveIdx !== idx) { expandBBox(this.#bboxesCoords, saveIdx, minX, minY, maxX, maxY); } } for (const saveIdx of this.#markedContentStack) { if (saveIdx !== idx) { expandBBox(this.#bboxesCoords, saveIdx, minX, minY, maxX, maxY); } } if (!preserve) { this.#pendingDependencies.clear(); this.#pendingBBoxIdx = -1; } } return this; } recordShowTextOperation(idx, preserve = false) { const deps = Array.from(this.#pendingDependencies); this.recordOperation(idx, preserve); this.recordIncrementalData("sameLineText", idx); for (const dep of deps) { this.recordIncrementalData("sameLineText", dep); } return this; } bboxToClipBoxDropOperation(idx, preserve = false) { if (this.#pendingBBoxIdx === idx) { this.#pendingBBoxIdx = -1; this.#clipBox[0] = Math.max(this.#clipBox[0], this.#pendingBBox[0]); this.#clipBox[1] = Math.max(this.#clipBox[1], this.#pendingBBox[1]); this.#clipBox[2] = Math.min(this.#clipBox[2], this.#pendingBBox[2]); this.#clipBox[3] = Math.min(this.#clipBox[3], this.#pendingBBox[3]); if (!preserve) { this.#pendingDependencies.clear(); } } return this; } _takePendingDependencies() { const pendingDependencies = this.#pendingDependencies; this.#pendingDependencies = new Set(); return pendingDependencies; } _extractOperation(idx) { const operation = this.#operations.get(idx); this.#operations.delete(idx); return operation; } _pushPendingDependencies(dependencies) { for (const dep of dependencies) { this.#pendingDependencies.add(dep); } } take() { this.#fontBBoxTrustworthy.clear(); return new BBoxReader(this.#bboxes, this.#bboxesCoords); } takeDebugMetadata() { return this.#debugMetadata; } }; CanvasNestedDependencyTracker = class CanvasNestedDependencyTracker { #dependencyTracker; #opIdx; #ignoreBBoxes; #nestingLevel = 0; #savesLevel = 0; constructor(dependencyTracker, opIdx, ignoreBBoxes) { if (dependencyTracker instanceof CanvasNestedDependencyTracker && dependencyTracker.#ignoreBBoxes === !!ignoreBBoxes) { return dependencyTracker; } this.#dependencyTracker = dependencyTracker; this.#opIdx = opIdx; this.#ignoreBBoxes = !!ignoreBBoxes; } growOperationsCount() { throw new Error("Unreachable"); } save(opIdx) { this.#savesLevel++; this.#dependencyTracker.save(this.#opIdx); return this; } restore(opIdx) { if (this.#savesLevel > 0) { this.#dependencyTracker.restore(this.#opIdx); this.#savesLevel--; } return this; } recordOpenMarker(idx) { this.#nestingLevel++; return this; } getOpenMarker() { return this.#nestingLevel > 0 ? this.#opIdx : this.#dependencyTracker.getOpenMarker(); } recordCloseMarker(idx) { this.#nestingLevel--; return this; } beginMarkedContent(opIdx) { return this; } endMarkedContent(opIdx) { return this; } pushBaseTransform(ctx) { this.#dependencyTracker.pushBaseTransform(ctx); return this; } popBaseTransform() { this.#dependencyTracker.popBaseTransform(); return this; } recordSimpleData(name, idx) { this.#dependencyTracker.recordSimpleData(name, this.#opIdx); return this; } recordIncrementalData(name, idx) { this.#dependencyTracker.recordIncrementalData(name, this.#opIdx); return this; } resetIncrementalData(name, idx) { this.#dependencyTracker.resetIncrementalData(name, this.#opIdx); return this; } recordNamedData(name, idx) { return this; } recordSimpleDataFromNamed(name, depName, fallbackIdx) { this.#dependencyTracker.recordSimpleDataFromNamed(name, depName, this.#opIdx); return this; } recordFutureForcedDependency(name, idx) { this.#dependencyTracker.recordFutureForcedDependency(name, this.#opIdx); return this; } inheritSimpleDataAsFutureForcedDependencies(names) { this.#dependencyTracker.inheritSimpleDataAsFutureForcedDependencies(names); return this; } inheritPendingDependenciesAsFutureForcedDependencies() { this.#dependencyTracker.inheritPendingDependenciesAsFutureForcedDependencies(); return this; } resetBBox(idx) { if (!this.#ignoreBBoxes) { this.#dependencyTracker.resetBBox(this.#opIdx); } return this; } recordClipBox(idx, ctx, minX, maxX, minY, maxY) { if (!this.#ignoreBBoxes) { this.#dependencyTracker.recordClipBox(this.#opIdx, ctx, minX, maxX, minY, maxY); } return this; } recordBBox(idx, ctx, minX, maxX, minY, maxY) { if (!this.#ignoreBBoxes) { this.#dependencyTracker.recordBBox(this.#opIdx, ctx, minX, maxX, minY, maxY); } return this; } recordCharacterBBox(idx, ctx, font, scale, x$2, y$3, getMeasure) { if (!this.#ignoreBBoxes) { this.#dependencyTracker.recordCharacterBBox(this.#opIdx, ctx, font, scale, x$2, y$3, getMeasure); } return this; } recordFullPageBBox(idx) { if (!this.#ignoreBBoxes) { this.#dependencyTracker.recordFullPageBBox(this.#opIdx); } return this; } getSimpleIndex(dependencyName) { return this.#dependencyTracker.getSimpleIndex(dependencyName); } recordDependencies(idx, dependencyNames) { this.#dependencyTracker.recordDependencies(this.#opIdx, dependencyNames); return this; } recordNamedDependency(idx, name) { this.#dependencyTracker.recordNamedDependency(this.#opIdx, name); return this; } recordOperation(idx) { this.#dependencyTracker.recordOperation(this.#opIdx, true); return this; } recordShowTextOperation(idx) { this.#dependencyTracker.recordShowTextOperation(this.#opIdx, true); return this; } bboxToClipBoxDropOperation(idx) { if (!this.#ignoreBBoxes) { this.#dependencyTracker.bboxToClipBoxDropOperation(this.#opIdx, true); } return this; } take() { throw new Error("Unreachable"); } takeDebugMetadata() { throw new Error("Unreachable"); } }; Dependencies = { stroke: [ "path", "transform", "filter", "strokeColor", "strokeAlpha", "lineWidth", "lineCap", "lineJoin", "miterLimit", "dash" ], fill: [ "path", "transform", "filter", "fillColor", "fillAlpha", "globalCompositeOperation", "SMask" ], imageXObject: [ "transform", "SMask", "filter", "fillAlpha", "strokeAlpha", "globalCompositeOperation" ], rawFillPath: [ "filter", "fillColor", "fillAlpha" ], showText: [ "transform", "leading", "charSpacing", "wordSpacing", "hScale", "textRise", "moveText", "textMatrix", "font", "fontObj", "filter", "fillColor", "textRenderingMode", "SMask", "fillAlpha", "strokeAlpha", "globalCompositeOperation", "sameLineText" ], transform: ["transform"], transformAndFill: ["transform", "fillColor"] }; ; PathType = { FILL: "Fill", STROKE: "Stroke", SHADING: "Shading" }; BaseShadingPattern = class { isModifyingCurrentTransform() { return false; } getPattern() { unreachable("Abstract method `getPattern` called."); } }; RadialAxialShadingPattern = class extends BaseShadingPattern { constructor(IR) { super(); this._type = IR[1]; this._bbox = IR[2]; this._colorStops = IR[3]; this._p0 = IR[4]; this._p1 = IR[5]; this._r0 = IR[6]; this._r1 = IR[7]; this.matrix = null; } _createGradient(ctx) { let grad; if (this._type === "axial") { grad = ctx.createLinearGradient(this._p0[0], this._p0[1], this._p1[0], this._p1[1]); } else if (this._type === "radial") { grad = ctx.createRadialGradient(this._p0[0], this._p0[1], this._r0, this._p1[0], this._p1[1], this._r1); } for (const colorStop of this._colorStops) { grad.addColorStop(colorStop[0], colorStop[1]); } return grad; } getPattern(ctx, owner, inverse, pathType) { let pattern; if (pathType === PathType.STROKE || pathType === PathType.FILL) { const ownerBBox = owner.current.getClippedPathBoundingBox(pathType, getCurrentTransform(ctx)) || [ 0, 0, 0, 0 ]; const width = Math.ceil(ownerBBox[2] - ownerBBox[0]) || 1; const height = Math.ceil(ownerBBox[3] - ownerBBox[1]) || 1; const tmpCanvas = owner.cachedCanvases.getCanvas("pattern", width, height); const tmpCtx = tmpCanvas.context; tmpCtx.clearRect(0, 0, tmpCtx.canvas.width, tmpCtx.canvas.height); tmpCtx.beginPath(); tmpCtx.rect(0, 0, tmpCtx.canvas.width, tmpCtx.canvas.height); tmpCtx.translate(-ownerBBox[0], -ownerBBox[1]); inverse = Util.transform(inverse, [ 1, 0, 0, 1, ownerBBox[0], ownerBBox[1] ]); tmpCtx.transform(...owner.baseTransform); if (this.matrix) { tmpCtx.transform(...this.matrix); } applyBoundingBox(tmpCtx, this._bbox); tmpCtx.fillStyle = this._createGradient(tmpCtx); tmpCtx.fill(); pattern = ctx.createPattern(tmpCanvas.canvas, "no-repeat"); const domMatrix = new DOMMatrix(inverse); pattern.setTransform(domMatrix); } else { applyBoundingBox(ctx, this._bbox); pattern = this._createGradient(ctx); } return pattern; } }; MeshShadingPattern = class extends BaseShadingPattern { constructor(IR) { super(); this._coords = IR[2]; this._colors = IR[3]; this._figures = IR[4]; this._bounds = IR[5]; this._bbox = IR[6]; this._background = IR[7]; this.matrix = null; } _createMeshCanvas(combinedScale, backgroundColor, cachedCanvases) { const EXPECTED_SCALE = 1.1; const MAX_PATTERN_SIZE = 3e3; const BORDER_SIZE = 2; const offsetX = Math.floor(this._bounds[0]); const offsetY = Math.floor(this._bounds[1]); const boundsWidth = Math.ceil(this._bounds[2]) - offsetX; const boundsHeight = Math.ceil(this._bounds[3]) - offsetY; const width = Math.min(Math.ceil(Math.abs(boundsWidth * combinedScale[0] * EXPECTED_SCALE)), MAX_PATTERN_SIZE); const height = Math.min(Math.ceil(Math.abs(boundsHeight * combinedScale[1] * EXPECTED_SCALE)), MAX_PATTERN_SIZE); const scaleX = boundsWidth / width; const scaleY = boundsHeight / height; const context = { coords: this._coords, colors: this._colors, offsetX: -offsetX, offsetY: -offsetY, scaleX: 1 / scaleX, scaleY: 1 / scaleY }; const paddedWidth = width + BORDER_SIZE * 2; const paddedHeight = height + BORDER_SIZE * 2; const tmpCanvas = cachedCanvases.getCanvas("mesh", paddedWidth, paddedHeight); const tmpCtx = tmpCanvas.context; const data = tmpCtx.createImageData(width, height); if (backgroundColor) { const bytes = data.data; for (let i$7 = 0, ii = bytes.length; i$7 < ii; i$7 += 4) { bytes[i$7] = backgroundColor[0]; bytes[i$7 + 1] = backgroundColor[1]; bytes[i$7 + 2] = backgroundColor[2]; bytes[i$7 + 3] = 255; } } for (const figure of this._figures) { drawFigure(data, figure, context); } tmpCtx.putImageData(data, BORDER_SIZE, BORDER_SIZE); const canvas = tmpCanvas.canvas; return { canvas, offsetX: offsetX - BORDER_SIZE * scaleX, offsetY: offsetY - BORDER_SIZE * scaleY, scaleX, scaleY }; } isModifyingCurrentTransform() { return true; } getPattern(ctx, owner, inverse, pathType) { applyBoundingBox(ctx, this._bbox); const scale = new Float32Array(2); if (pathType === PathType.SHADING) { Util.singularValueDecompose2dScale(getCurrentTransform(ctx), scale); } else if (this.matrix) { Util.singularValueDecompose2dScale(this.matrix, scale); const [matrixScaleX, matrixScaleY] = scale; Util.singularValueDecompose2dScale(owner.baseTransform, scale); scale[0] *= matrixScaleX; scale[1] *= matrixScaleY; } else { Util.singularValueDecompose2dScale(owner.baseTransform, scale); } const temporaryPatternCanvas = this._createMeshCanvas(scale, pathType === PathType.SHADING ? null : this._background, owner.cachedCanvases); if (pathType !== PathType.SHADING) { ctx.setTransform(...owner.baseTransform); if (this.matrix) { ctx.transform(...this.matrix); } } ctx.translate(temporaryPatternCanvas.offsetX, temporaryPatternCanvas.offsetY); ctx.scale(temporaryPatternCanvas.scaleX, temporaryPatternCanvas.scaleY); return ctx.createPattern(temporaryPatternCanvas.canvas, "no-repeat"); } }; DummyShadingPattern = class extends BaseShadingPattern { getPattern() { return "hotpink"; } }; PaintType = { COLORED: 1, UNCOLORED: 2 }; TilingPattern = class TilingPattern { static MAX_PATTERN_SIZE = 3e3; constructor(IR, ctx, canvasGraphicsFactory, baseTransform) { this.color = IR[1]; this.operatorList = IR[2]; this.matrix = IR[3]; this.bbox = IR[4]; this.xstep = IR[5]; this.ystep = IR[6]; this.paintType = IR[7]; this.tilingType = IR[8]; this.ctx = ctx; this.canvasGraphicsFactory = canvasGraphicsFactory; this.baseTransform = baseTransform; } createPatternCanvas(owner, opIdx) { const { bbox, operatorList, paintType, tilingType, color, canvasGraphicsFactory } = this; let { xstep, ystep } = this; xstep = Math.abs(xstep); ystep = Math.abs(ystep); info("TilingType: " + tilingType); const x0 = bbox[0], y0 = bbox[1], x1 = bbox[2], y1 = bbox[3]; const width = x1 - x0; const height = y1 - y0; const scale = new Float32Array(2); Util.singularValueDecompose2dScale(this.matrix, scale); const [matrixScaleX, matrixScaleY] = scale; Util.singularValueDecompose2dScale(this.baseTransform, scale); const combinedScaleX = matrixScaleX * scale[0]; const combinedScaleY = matrixScaleY * scale[1]; let canvasWidth = width, canvasHeight = height, redrawHorizontally = false, redrawVertically = false; const xScaledStep = Math.ceil(xstep * combinedScaleX); const yScaledStep = Math.ceil(ystep * combinedScaleY); const xScaledWidth = Math.ceil(width * combinedScaleX); const yScaledHeight = Math.ceil(height * combinedScaleY); if (xScaledStep >= xScaledWidth) { canvasWidth = xstep; } else { redrawHorizontally = true; } if (yScaledStep >= yScaledHeight) { canvasHeight = ystep; } else { redrawVertically = true; } const dimx = this.getSizeAndScale(canvasWidth, this.ctx.canvas.width, combinedScaleX); const dimy = this.getSizeAndScale(canvasHeight, this.ctx.canvas.height, combinedScaleY); const tmpCanvas = owner.cachedCanvases.getCanvas("pattern", dimx.size, dimy.size); const tmpCtx = tmpCanvas.context; const graphics = canvasGraphicsFactory.createCanvasGraphics(tmpCtx, opIdx); graphics.groupLevel = owner.groupLevel; this.setFillAndStrokeStyleToContext(graphics, paintType, color); tmpCtx.translate(-dimx.scale * x0, -dimy.scale * y0); graphics.transform(0, dimx.scale, 0, 0, dimy.scale, 0, 0); tmpCtx.save(); graphics.dependencyTracker?.save(); this.clipBbox(graphics, x0, y0, x1, y1); graphics.baseTransform = getCurrentTransform(graphics.ctx); graphics.executeOperatorList(operatorList); graphics.endDrawing(); graphics.dependencyTracker?.restore(); tmpCtx.restore(); if (redrawHorizontally || redrawVertically) { const image = tmpCanvas.canvas; if (redrawHorizontally) { canvasWidth = xstep; } if (redrawVertically) { canvasHeight = ystep; } const dimx2 = this.getSizeAndScale(canvasWidth, this.ctx.canvas.width, combinedScaleX); const dimy2 = this.getSizeAndScale(canvasHeight, this.ctx.canvas.height, combinedScaleY); const xSize = dimx2.size; const ySize = dimy2.size; const tmpCanvas2 = owner.cachedCanvases.getCanvas("pattern-workaround", xSize, ySize); const tmpCtx2 = tmpCanvas2.context; const ii = redrawHorizontally ? Math.floor(width / xstep) : 0; const jj = redrawVertically ? Math.floor(height / ystep) : 0; for (let i$7 = 0; i$7 <= ii; i$7++) { for (let j$2 = 0; j$2 <= jj; j$2++) { tmpCtx2.drawImage(image, xSize * i$7, ySize * j$2, xSize, ySize, 0, 0, xSize, ySize); } } return { canvas: tmpCanvas2.canvas, scaleX: dimx2.scale, scaleY: dimy2.scale, offsetX: x0, offsetY: y0 }; } return { canvas: tmpCanvas.canvas, scaleX: dimx.scale, scaleY: dimy.scale, offsetX: x0, offsetY: y0 }; } getSizeAndScale(step, realOutputSize, scale) { const maxSize = Math.max(TilingPattern.MAX_PATTERN_SIZE, realOutputSize); let size = Math.ceil(step * scale); if (size >= maxSize) { size = maxSize; } else { scale = size / step; } return { scale, size }; } clipBbox(graphics, x0, y0, x1, y1) { const bboxWidth = x1 - x0; const bboxHeight = y1 - y0; graphics.ctx.rect(x0, y0, bboxWidth, bboxHeight); Util.axialAlignedBoundingBox([ x0, y0, x1, y1 ], getCurrentTransform(graphics.ctx), graphics.current.minMax); graphics.clip(); graphics.endPath(); } setFillAndStrokeStyleToContext(graphics, paintType, color) { const context = graphics.ctx, current = graphics.current; switch (paintType) { case PaintType.COLORED: const { fillStyle, strokeStyle } = this.ctx; context.fillStyle = current.fillColor = fillStyle; context.strokeStyle = current.strokeColor = strokeStyle; break; case PaintType.UNCOLORED: context.fillStyle = context.strokeStyle = color; current.fillColor = current.strokeColor = color; break; default: throw new FormatError(`Unsupported paint type: ${paintType}`); } } isModifyingCurrentTransform() { return false; } getPattern(ctx, owner, inverse, pathType, opIdx) { let matrix = inverse; if (pathType !== PathType.SHADING) { matrix = Util.transform(matrix, owner.baseTransform); if (this.matrix) { matrix = Util.transform(matrix, this.matrix); } } const temporaryPatternCanvas = this.createPatternCanvas(owner, opIdx); let domMatrix = new DOMMatrix(matrix); domMatrix = domMatrix.translate(temporaryPatternCanvas.offsetX, temporaryPatternCanvas.offsetY); domMatrix = domMatrix.scale(1 / temporaryPatternCanvas.scaleX, 1 / temporaryPatternCanvas.scaleY); const pattern = ctx.createPattern(temporaryPatternCanvas.canvas, "repeat"); pattern.setTransform(domMatrix); return pattern; } }; ; ; MIN_FONT_SIZE = 16; MAX_FONT_SIZE = 100; EXECUTION_TIME = 15; EXECUTION_STEPS = 10; FULL_CHUNK_HEIGHT = 16; SCALE_MATRIX = new DOMMatrix(); XY = new Float32Array(2); MIN_MAX_INIT = new Float32Array([ Infinity, Infinity, -Infinity, -Infinity ]); CachedCanvases = class { constructor(canvasFactory) { this.canvasFactory = canvasFactory; this.cache = Object.create(null); } getCanvas(id, width, height) { let canvasEntry; if (this.cache[id] !== undefined) { canvasEntry = this.cache[id]; this.canvasFactory.reset(canvasEntry, width, height); } else { canvasEntry = this.canvasFactory.create(width, height); this.cache[id] = canvasEntry; } return canvasEntry; } delete(id) { delete this.cache[id]; } clear() { for (const id in this.cache) { const canvasEntry = this.cache[id]; this.canvasFactory.destroy(canvasEntry); delete this.cache[id]; } } }; CanvasExtraState = class { alphaIsShape = false; fontSize = 0; fontSizeScale = 1; textMatrix = null; textMatrixScale = 1; fontMatrix = FONT_IDENTITY_MATRIX; leading = 0; x = 0; y = 0; lineX = 0; lineY = 0; charSpacing = 0; wordSpacing = 0; textHScale = 1; textRenderingMode = TextRenderingMode.FILL; textRise = 0; fillColor = "#000000"; strokeColor = "#000000"; patternFill = false; patternStroke = false; fillAlpha = 1; strokeAlpha = 1; lineWidth = 1; activeSMask = null; transferMaps = "none"; constructor(width, height, preInit) { preInit?.(this); this.clipBox = new Float32Array([ 0, 0, width, height ]); this.minMax = MIN_MAX_INIT.slice(); } clone() { const clone = Object.create(this); clone.clipBox = this.clipBox.slice(); clone.minMax = this.minMax.slice(); return clone; } getPathBoundingBox(pathType = PathType.FILL, transform = null) { const box = this.minMax.slice(); if (pathType === PathType.STROKE) { if (!transform) { unreachable("Stroke bounding box must include transform."); } Util.singularValueDecompose2dScale(transform, XY); const xStrokePad = XY[0] * this.lineWidth / 2; const yStrokePad = XY[1] * this.lineWidth / 2; box[0] -= xStrokePad; box[1] -= yStrokePad; box[2] += xStrokePad; box[3] += yStrokePad; } return box; } updateClipFromPath() { const intersect = Util.intersect(this.clipBox, this.getPathBoundingBox()); this.startNewPathAndClipBox(intersect || [ 0, 0, 0, 0 ]); } isEmptyClip() { return this.minMax[0] === Infinity; } startNewPathAndClipBox(box) { this.clipBox.set(box, 0); this.minMax.set(MIN_MAX_INIT, 0); } getClippedPathBoundingBox(pathType = PathType.FILL, transform = null) { return Util.intersect(this.clipBox, this.getPathBoundingBox(pathType, transform)); } }; LINE_CAP_STYLES = [ "butt", "round", "square" ]; LINE_JOIN_STYLES = [ "miter", "round", "bevel" ]; NORMAL_CLIP = {}; EO_CLIP = {}; CanvasGraphics = class CanvasGraphics { constructor(canvasCtx, commonObjs, objs, canvasFactory, filterFactory, { optionalContentConfig, markedContentStack = null }, annotationCanvasMap, pageColors, dependencyTracker) { this.ctx = canvasCtx; this.current = new CanvasExtraState(this.ctx.canvas.width, this.ctx.canvas.height); this.stateStack = []; this.pendingClip = null; this.pendingEOFill = false; this.res = null; this.xobjs = null; this.commonObjs = commonObjs; this.objs = objs; this.canvasFactory = canvasFactory; this.filterFactory = filterFactory; this.groupStack = []; this.baseTransform = null; this.baseTransformStack = []; this.groupLevel = 0; this.smaskStack = []; this.smaskCounter = 0; this.tempSMask = null; this.suspendedCtx = null; this.contentVisible = true; this.markedContentStack = markedContentStack || []; this.optionalContentConfig = optionalContentConfig; this.cachedCanvases = new CachedCanvases(this.canvasFactory); this.cachedPatterns = new Map(); this.annotationCanvasMap = annotationCanvasMap; this.viewportScale = 1; this.outputScaleX = 1; this.outputScaleY = 1; this.pageColors = pageColors; this._cachedScaleForStroking = [-1, 0]; this._cachedGetSinglePixelWidth = null; this._cachedBitmapsMap = new Map(); this.dependencyTracker = dependencyTracker ?? null; } getObject(opIdx, data, fallback = null) { if (typeof data === "string") { this.dependencyTracker?.recordNamedDependency(opIdx, data); return data.startsWith("g_") ? this.commonObjs.get(data) : this.objs.get(data); } return fallback; } beginDrawing({ transform, viewport, transparency = false, background = null }) { const width = this.ctx.canvas.width; const height = this.ctx.canvas.height; const savedFillStyle = this.ctx.fillStyle; this.ctx.fillStyle = background || "#ffffff"; this.ctx.fillRect(0, 0, width, height); this.ctx.fillStyle = savedFillStyle; if (transparency) { const transparentCanvas = this.cachedCanvases.getCanvas("transparent", width, height); this.compositeCtx = this.ctx; this.transparentCanvas = transparentCanvas.canvas; this.ctx = transparentCanvas.context; this.ctx.save(); this.ctx.transform(...getCurrentTransform(this.compositeCtx)); } this.ctx.save(); resetCtxToDefault(this.ctx); if (transform) { this.ctx.transform(...transform); this.outputScaleX = transform[0]; this.outputScaleY = transform[0]; } this.ctx.transform(...viewport.transform); this.viewportScale = viewport.scale; this.baseTransform = getCurrentTransform(this.ctx); } executeOperatorList(operatorList, executionStartIdx, continueCallback, stepper, operationsFilter) { const argsArray = operatorList.argsArray; const fnArray = operatorList.fnArray; let i$7 = executionStartIdx || 0; const argsArrayLen = argsArray.length; if (argsArrayLen === i$7) { return i$7; } const chunkOperations = argsArrayLen - i$7 > EXECUTION_STEPS && typeof continueCallback === "function"; const endTime = chunkOperations ? Date.now() + EXECUTION_TIME : 0; let steps = 0; const commonObjs = this.commonObjs; const objs = this.objs; let fnId, fnArgs; while (true) { if (stepper !== undefined && i$7 === stepper.nextBreakPoint) { stepper.breakIt(i$7, continueCallback); return i$7; } if (!operationsFilter || operationsFilter(i$7)) { fnId = fnArray[i$7]; fnArgs = argsArray[i$7] ?? null; if (fnId !== OPS.dependency) { if (fnArgs === null) { this[fnId](i$7); } else { this[fnId](i$7, ...fnArgs); } } else { for (const depObjId of fnArgs) { this.dependencyTracker?.recordNamedData(depObjId, i$7); const objsPool = depObjId.startsWith("g_") ? commonObjs : objs; if (!objsPool.has(depObjId)) { objsPool.get(depObjId, continueCallback); return i$7; } } } } i$7++; if (i$7 === argsArrayLen) { return i$7; } if (chunkOperations && ++steps > EXECUTION_STEPS) { if (Date.now() > endTime) { continueCallback(); return i$7; } steps = 0; } } } #restoreInitialState() { while (this.stateStack.length || this.inSMaskMode) { this.restore(); } this.current.activeSMask = null; this.ctx.restore(); if (this.transparentCanvas) { this.ctx = this.compositeCtx; this.ctx.save(); this.ctx.setTransform(1, 0, 0, 1, 0, 0); this.ctx.drawImage(this.transparentCanvas, 0, 0); this.ctx.restore(); this.transparentCanvas = null; } } endDrawing() { this.#restoreInitialState(); this.cachedCanvases.clear(); this.cachedPatterns.clear(); for (const cache of this._cachedBitmapsMap.values()) { for (const canvas of cache.values()) { if (typeof HTMLCanvasElement !== "undefined" && canvas instanceof HTMLCanvasElement) { canvas.width = canvas.height = 0; } } cache.clear(); } this._cachedBitmapsMap.clear(); this.#drawFilter(); } #drawFilter() { if (this.pageColors) { const hcmFilterId = this.filterFactory.addHCMFilter(this.pageColors.foreground, this.pageColors.background); if (hcmFilterId !== "none") { const savedFilter = this.ctx.filter; this.ctx.filter = hcmFilterId; this.ctx.drawImage(this.ctx.canvas, 0, 0); this.ctx.filter = savedFilter; } } } _scaleImage(img, inverseTransform) { const width = img.width ?? img.displayWidth; const height = img.height ?? img.displayHeight; let widthScale = Math.max(Math.hypot(inverseTransform[0], inverseTransform[1]), 1); let heightScale = Math.max(Math.hypot(inverseTransform[2], inverseTransform[3]), 1); let paintWidth = width, paintHeight = height; let tmpCanvasId = "prescale1"; let tmpCanvas, tmpCtx; while (widthScale > 2 && paintWidth > 1 || heightScale > 2 && paintHeight > 1) { let newWidth = paintWidth, newHeight = paintHeight; if (widthScale > 2 && paintWidth > 1) { newWidth = paintWidth >= 16384 ? Math.floor(paintWidth / 2) - 1 || 1 : Math.ceil(paintWidth / 2); widthScale /= paintWidth / newWidth; } if (heightScale > 2 && paintHeight > 1) { newHeight = paintHeight >= 16384 ? Math.floor(paintHeight / 2) - 1 || 1 : Math.ceil(paintHeight) / 2; heightScale /= paintHeight / newHeight; } tmpCanvas = this.cachedCanvases.getCanvas(tmpCanvasId, newWidth, newHeight); tmpCtx = tmpCanvas.context; tmpCtx.clearRect(0, 0, newWidth, newHeight); tmpCtx.drawImage(img, 0, 0, paintWidth, paintHeight, 0, 0, newWidth, newHeight); img = tmpCanvas.canvas; paintWidth = newWidth; paintHeight = newHeight; tmpCanvasId = tmpCanvasId === "prescale1" ? "prescale2" : "prescale1"; } return { img, paintWidth, paintHeight }; } _createMaskCanvas(opIdx, img) { const ctx = this.ctx; const { width, height } = img; const fillColor = this.current.fillColor; const isPatternFill = this.current.patternFill; const currentTransform = getCurrentTransform(ctx); let cache, cacheKey, scaled, maskCanvas; if ((img.bitmap || img.data) && img.count > 1) { const mainKey = img.bitmap || img.data.buffer; cacheKey = JSON.stringify(isPatternFill ? currentTransform : [currentTransform.slice(0, 4), fillColor]); cache = this._cachedBitmapsMap.get(mainKey); if (!cache) { cache = new Map(); this._cachedBitmapsMap.set(mainKey, cache); } const cachedImage = cache.get(cacheKey); if (cachedImage && !isPatternFill) { const offsetX$1 = Math.round(Math.min(currentTransform[0], currentTransform[2]) + currentTransform[4]); const offsetY$1 = Math.round(Math.min(currentTransform[1], currentTransform[3]) + currentTransform[5]); this.dependencyTracker?.recordDependencies(opIdx, Dependencies.transformAndFill); return { canvas: cachedImage, offsetX: offsetX$1, offsetY: offsetY$1 }; } scaled = cachedImage; } if (!scaled) { maskCanvas = this.cachedCanvases.getCanvas("maskCanvas", width, height); putBinaryImageMask(maskCanvas.context, img); } let maskToCanvas = Util.transform(currentTransform, [ 1 / width, 0, 0, -1 / height, 0, 0 ]); maskToCanvas = Util.transform(maskToCanvas, [ 1, 0, 0, 1, 0, -height ]); const minMax = MIN_MAX_INIT.slice(); Util.axialAlignedBoundingBox([ 0, 0, width, height ], maskToCanvas, minMax); const [minX, minY, maxX, maxY] = minMax; const drawnWidth = Math.round(maxX - minX) || 1; const drawnHeight = Math.round(maxY - minY) || 1; const fillCanvas = this.cachedCanvases.getCanvas("fillCanvas", drawnWidth, drawnHeight); const fillCtx = fillCanvas.context; const offsetX = minX; const offsetY = minY; fillCtx.translate(-offsetX, -offsetY); fillCtx.transform(...maskToCanvas); if (!scaled) { scaled = this._scaleImage(maskCanvas.canvas, getCurrentTransformInverse(fillCtx)); scaled = scaled.img; if (cache && isPatternFill) { cache.set(cacheKey, scaled); } } fillCtx.imageSmoothingEnabled = getImageSmoothingEnabled(getCurrentTransform(fillCtx), img.interpolate); drawImageAtIntegerCoords(fillCtx, scaled, 0, 0, scaled.width, scaled.height, 0, 0, width, height); fillCtx.globalCompositeOperation = "source-in"; const inverse = Util.transform(getCurrentTransformInverse(fillCtx), [ 1, 0, 0, 1, -offsetX, -offsetY ]); fillCtx.fillStyle = isPatternFill ? fillColor.getPattern(ctx, this, inverse, PathType.FILL, opIdx) : fillColor; fillCtx.fillRect(0, 0, width, height); if (cache && !isPatternFill) { this.cachedCanvases.delete("fillCanvas"); cache.set(cacheKey, fillCanvas.canvas); } this.dependencyTracker?.recordDependencies(opIdx, Dependencies.transformAndFill); return { canvas: fillCanvas.canvas, offsetX: Math.round(offsetX), offsetY: Math.round(offsetY) }; } setLineWidth(opIdx, width) { this.dependencyTracker?.recordSimpleData("lineWidth", opIdx); if (width !== this.current.lineWidth) { this._cachedScaleForStroking[0] = -1; } this.current.lineWidth = width; this.ctx.lineWidth = width; } setLineCap(opIdx, style) { this.dependencyTracker?.recordSimpleData("lineCap", opIdx); this.ctx.lineCap = LINE_CAP_STYLES[style]; } setLineJoin(opIdx, style) { this.dependencyTracker?.recordSimpleData("lineJoin", opIdx); this.ctx.lineJoin = LINE_JOIN_STYLES[style]; } setMiterLimit(opIdx, limit) { this.dependencyTracker?.recordSimpleData("miterLimit", opIdx); this.ctx.miterLimit = limit; } setDash(opIdx, dashArray, dashPhase) { this.dependencyTracker?.recordSimpleData("dash", opIdx); const ctx = this.ctx; if (ctx.setLineDash !== undefined) { ctx.setLineDash(dashArray); ctx.lineDashOffset = dashPhase; } } setRenderingIntent(opIdx, intent) {} setFlatness(opIdx, flatness) {} setGState(opIdx, states) { for (const [key, value] of states) { switch (key) { case "LW": this.setLineWidth(opIdx, value); break; case "LC": this.setLineCap(opIdx, value); break; case "LJ": this.setLineJoin(opIdx, value); break; case "ML": this.setMiterLimit(opIdx, value); break; case "D": this.setDash(opIdx, value[0], value[1]); break; case "RI": this.setRenderingIntent(opIdx, value); break; case "FL": this.setFlatness(opIdx, value); break; case "Font": this.setFont(opIdx, value[0], value[1]); break; case "CA": this.dependencyTracker?.recordSimpleData("strokeAlpha", opIdx); this.current.strokeAlpha = value; break; case "ca": this.dependencyTracker?.recordSimpleData("fillAlpha", opIdx); this.ctx.globalAlpha = this.current.fillAlpha = value; break; case "BM": this.dependencyTracker?.recordSimpleData("globalCompositeOperation", opIdx); this.ctx.globalCompositeOperation = value; break; case "SMask": this.dependencyTracker?.recordSimpleData("SMask", opIdx); this.current.activeSMask = value ? this.tempSMask : null; this.tempSMask = null; this.checkSMaskState(); break; case "TR": this.dependencyTracker?.recordSimpleData("filter", opIdx); this.ctx.filter = this.current.transferMaps = this.filterFactory.addFilter(value); break; } } } get inSMaskMode() { return !!this.suspendedCtx; } checkSMaskState() { const inSMaskMode = this.inSMaskMode; if (this.current.activeSMask && !inSMaskMode) { this.beginSMaskMode(); } else if (!this.current.activeSMask && inSMaskMode) { this.endSMaskMode(); } } beginSMaskMode(opIdx) { if (this.inSMaskMode) { throw new Error("beginSMaskMode called while already in smask mode"); } const drawnWidth = this.ctx.canvas.width; const drawnHeight = this.ctx.canvas.height; const cacheId = "smaskGroupAt" + this.groupLevel; const scratchCanvas = this.cachedCanvases.getCanvas(cacheId, drawnWidth, drawnHeight); this.suspendedCtx = this.ctx; const ctx = this.ctx = scratchCanvas.context; ctx.setTransform(this.suspendedCtx.getTransform()); copyCtxState(this.suspendedCtx, ctx); mirrorContextOperations(ctx, this.suspendedCtx); this.setGState(opIdx, [["BM", "source-over"]]); } endSMaskMode() { if (!this.inSMaskMode) { throw new Error("endSMaskMode called while not in smask mode"); } this.ctx._removeMirroring(); copyCtxState(this.ctx, this.suspendedCtx); this.ctx = this.suspendedCtx; this.suspendedCtx = null; } compose(dirtyBox) { if (!this.current.activeSMask) { return; } if (!dirtyBox) { dirtyBox = [ 0, 0, this.ctx.canvas.width, this.ctx.canvas.height ]; } else { dirtyBox[0] = Math.floor(dirtyBox[0]); dirtyBox[1] = Math.floor(dirtyBox[1]); dirtyBox[2] = Math.ceil(dirtyBox[2]); dirtyBox[3] = Math.ceil(dirtyBox[3]); } const smask = this.current.activeSMask; const suspendedCtx = this.suspendedCtx; this.composeSMask(suspendedCtx, smask, this.ctx, dirtyBox); this.ctx.save(); this.ctx.setTransform(1, 0, 0, 1, 0, 0); this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height); this.ctx.restore(); } composeSMask(ctx, smask, layerCtx, layerBox) { const layerOffsetX = layerBox[0]; const layerOffsetY = layerBox[1]; const layerWidth = layerBox[2] - layerOffsetX; const layerHeight = layerBox[3] - layerOffsetY; if (layerWidth === 0 || layerHeight === 0) { return; } this.genericComposeSMask(smask.context, layerCtx, layerWidth, layerHeight, smask.subtype, smask.backdrop, smask.transferMap, layerOffsetX, layerOffsetY, smask.offsetX, smask.offsetY); ctx.save(); ctx.globalAlpha = 1; ctx.globalCompositeOperation = "source-over"; ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.drawImage(layerCtx.canvas, 0, 0); ctx.restore(); } genericComposeSMask(maskCtx, layerCtx, width, height, subtype, backdrop, transferMap, layerOffsetX, layerOffsetY, maskOffsetX, maskOffsetY) { let maskCanvas = maskCtx.canvas; let maskX = layerOffsetX - maskOffsetX; let maskY = layerOffsetY - maskOffsetY; if (backdrop) { if (maskX < 0 || maskY < 0 || maskX + width > maskCanvas.width || maskY + height > maskCanvas.height) { const canvas = this.cachedCanvases.getCanvas("maskExtension", width, height); const ctx = canvas.context; ctx.drawImage(maskCanvas, -maskX, -maskY); ctx.globalCompositeOperation = "destination-atop"; ctx.fillStyle = backdrop; ctx.fillRect(0, 0, width, height); ctx.globalCompositeOperation = "source-over"; maskCanvas = canvas.canvas; maskX = maskY = 0; } else { maskCtx.save(); maskCtx.globalAlpha = 1; maskCtx.setTransform(1, 0, 0, 1, 0, 0); const clip$1 = new Path2D(); clip$1.rect(maskX, maskY, width, height); maskCtx.clip(clip$1); maskCtx.globalCompositeOperation = "destination-atop"; maskCtx.fillStyle = backdrop; maskCtx.fillRect(maskX, maskY, width, height); maskCtx.restore(); } } layerCtx.save(); layerCtx.globalAlpha = 1; layerCtx.setTransform(1, 0, 0, 1, 0, 0); if (subtype === "Alpha" && transferMap) { layerCtx.filter = this.filterFactory.addAlphaFilter(transferMap); } else if (subtype === "Luminosity") { layerCtx.filter = this.filterFactory.addLuminosityFilter(transferMap); } const clip = new Path2D(); clip.rect(layerOffsetX, layerOffsetY, width, height); layerCtx.clip(clip); layerCtx.globalCompositeOperation = "destination-in"; layerCtx.drawImage(maskCanvas, maskX, maskY, width, height, layerOffsetX, layerOffsetY, width, height); layerCtx.restore(); } save(opIdx) { if (this.inSMaskMode) { copyCtxState(this.ctx, this.suspendedCtx); } this.ctx.save(); const old = this.current; this.stateStack.push(old); this.current = old.clone(); this.dependencyTracker?.save(opIdx); } restore(opIdx) { this.dependencyTracker?.restore(opIdx); if (this.stateStack.length === 0) { if (this.inSMaskMode) { this.endSMaskMode(); } return; } this.current = this.stateStack.pop(); this.ctx.restore(); if (this.inSMaskMode) { copyCtxState(this.suspendedCtx, this.ctx); } this.checkSMaskState(); this.pendingClip = null; this._cachedScaleForStroking[0] = -1; this._cachedGetSinglePixelWidth = null; } transform(opIdx, a$2, b$3, c$7, d$5, e$10, f$4) { this.dependencyTracker?.recordIncrementalData("transform", opIdx); this.ctx.transform(a$2, b$3, c$7, d$5, e$10, f$4); this._cachedScaleForStroking[0] = -1; this._cachedGetSinglePixelWidth = null; } constructPath(opIdx, op$1, data, minMax) { let [path$1] = data; if (!minMax) { path$1 ||= data[0] = new Path2D(); this[op$1](opIdx, path$1); return; } if (this.dependencyTracker !== null) { const outerExtraSize = op$1 === OPS.stroke ? this.current.lineWidth / 2 : 0; this.dependencyTracker.resetBBox(opIdx).recordBBox(opIdx, this.ctx, minMax[0] - outerExtraSize, minMax[2] + outerExtraSize, minMax[1] - outerExtraSize, minMax[3] + outerExtraSize).recordDependencies(opIdx, ["transform"]); } if (!(path$1 instanceof Path2D)) { path$1 = data[0] = makePathFromDrawOPS(path$1); } Util.axialAlignedBoundingBox(minMax, getCurrentTransform(this.ctx), this.current.minMax); this[op$1](opIdx, path$1); this._pathStartIdx = opIdx; } closePath(opIdx) { this.ctx.closePath(); } stroke(opIdx, path$1, consumePath = true) { const ctx = this.ctx; const strokeColor = this.current.strokeColor; ctx.globalAlpha = this.current.strokeAlpha; if (this.contentVisible) { if (typeof strokeColor === "object" && strokeColor?.getPattern) { const baseTransform = strokeColor.isModifyingCurrentTransform() ? ctx.getTransform() : null; ctx.save(); ctx.strokeStyle = strokeColor.getPattern(ctx, this, getCurrentTransformInverse(ctx), PathType.STROKE, opIdx); if (baseTransform) { const newPath = new Path2D(); newPath.addPath(path$1, ctx.getTransform().invertSelf().multiplySelf(baseTransform)); path$1 = newPath; } this.rescaleAndStroke(path$1, false); ctx.restore(); } else { this.rescaleAndStroke(path$1, true); } } this.dependencyTracker?.recordDependencies(opIdx, Dependencies.stroke); if (consumePath) { this.consumePath(opIdx, path$1, this.current.getClippedPathBoundingBox(PathType.STROKE, getCurrentTransform(this.ctx))); } ctx.globalAlpha = this.current.fillAlpha; } closeStroke(opIdx, path$1) { this.stroke(opIdx, path$1); } fill(opIdx, path$1, consumePath = true) { const ctx = this.ctx; const fillColor = this.current.fillColor; const isPatternFill = this.current.patternFill; let needRestore = false; if (isPatternFill) { const baseTransform = fillColor.isModifyingCurrentTransform() ? ctx.getTransform() : null; this.dependencyTracker?.save(opIdx); ctx.save(); ctx.fillStyle = fillColor.getPattern(ctx, this, getCurrentTransformInverse(ctx), PathType.FILL, opIdx); if (baseTransform) { const newPath = new Path2D(); newPath.addPath(path$1, ctx.getTransform().invertSelf().multiplySelf(baseTransform)); path$1 = newPath; } needRestore = true; } const intersect = this.current.getClippedPathBoundingBox(); if (this.contentVisible && intersect !== null) { if (this.pendingEOFill) { ctx.fill(path$1, "evenodd"); this.pendingEOFill = false; } else { ctx.fill(path$1); } } this.dependencyTracker?.recordDependencies(opIdx, Dependencies.fill); if (needRestore) { ctx.restore(); this.dependencyTracker?.restore(opIdx); } if (consumePath) { this.consumePath(opIdx, path$1, intersect); } } eoFill(opIdx, path$1) { this.pendingEOFill = true; this.fill(opIdx, path$1); } fillStroke(opIdx, path$1) { this.fill(opIdx, path$1, false); this.stroke(opIdx, path$1, false); this.consumePath(opIdx, path$1); } eoFillStroke(opIdx, path$1) { this.pendingEOFill = true; this.fillStroke(opIdx, path$1); } closeFillStroke(opIdx, path$1) { this.fillStroke(opIdx, path$1); } closeEOFillStroke(opIdx, path$1) { this.pendingEOFill = true; this.fillStroke(opIdx, path$1); } endPath(opIdx, path$1) { this.consumePath(opIdx, path$1); } rawFillPath(opIdx, path$1) { this.ctx.fill(path$1); this.dependencyTracker?.recordDependencies(opIdx, Dependencies.rawFillPath).recordOperation(opIdx); } clip(opIdx) { this.dependencyTracker?.recordFutureForcedDependency("clipMode", opIdx); this.pendingClip = NORMAL_CLIP; } eoClip(opIdx) { this.dependencyTracker?.recordFutureForcedDependency("clipMode", opIdx); this.pendingClip = EO_CLIP; } beginText(opIdx) { this.current.textMatrix = null; this.current.textMatrixScale = 1; this.current.x = this.current.lineX = 0; this.current.y = this.current.lineY = 0; this.dependencyTracker?.recordOpenMarker(opIdx).resetIncrementalData("sameLineText").resetIncrementalData("moveText", opIdx); } endText(opIdx) { const paths = this.pendingTextPaths; const ctx = this.ctx; if (this.dependencyTracker) { const { dependencyTracker } = this; if (paths !== undefined) { dependencyTracker.recordFutureForcedDependency("textClip", dependencyTracker.getOpenMarker()).recordFutureForcedDependency("textClip", opIdx); } dependencyTracker.recordCloseMarker(opIdx); } if (paths !== undefined) { const newPath = new Path2D(); const invTransf = ctx.getTransform().invertSelf(); for (const { transform, x: x$2, y: y$3, fontSize, path: path$1 } of paths) { if (!path$1) { continue; } newPath.addPath(path$1, new DOMMatrix(transform).preMultiplySelf(invTransf).translate(x$2, y$3).scale(fontSize, -fontSize)); } ctx.clip(newPath); } delete this.pendingTextPaths; } setCharSpacing(opIdx, spacing$1) { this.dependencyTracker?.recordSimpleData("charSpacing", opIdx); this.current.charSpacing = spacing$1; } setWordSpacing(opIdx, spacing$1) { this.dependencyTracker?.recordSimpleData("wordSpacing", opIdx); this.current.wordSpacing = spacing$1; } setHScale(opIdx, scale) { this.dependencyTracker?.recordSimpleData("hScale", opIdx); this.current.textHScale = scale / 100; } setLeading(opIdx, leading) { this.dependencyTracker?.recordSimpleData("leading", opIdx); this.current.leading = -leading; } setFont(opIdx, fontRefName, size) { this.dependencyTracker?.recordSimpleData("font", opIdx).recordSimpleDataFromNamed("fontObj", fontRefName, opIdx); const fontObj = this.commonObjs.get(fontRefName); const current = this.current; if (!fontObj) { throw new Error(`Can't find font for ${fontRefName}`); } current.fontMatrix = fontObj.fontMatrix || FONT_IDENTITY_MATRIX; if (current.fontMatrix[0] === 0 || current.fontMatrix[3] === 0) { warn$2("Invalid font matrix for font " + fontRefName); } if (size < 0) { size = -size; current.fontDirection = -1; } else { current.fontDirection = 1; } this.current.font = fontObj; this.current.fontSize = size; if (fontObj.isType3Font) { return; } const name = fontObj.loadedName || "sans-serif"; const typeface = fontObj.systemFontInfo?.css || `"${name}", ${fontObj.fallbackName}`; let bold = "normal"; if (fontObj.black) { bold = "900"; } else if (fontObj.bold) { bold = "bold"; } const italic = fontObj.italic ? "italic" : "normal"; let browserFontSize = size; if (size < MIN_FONT_SIZE) { browserFontSize = MIN_FONT_SIZE; } else if (size > MAX_FONT_SIZE) { browserFontSize = MAX_FONT_SIZE; } this.current.fontSizeScale = size / browserFontSize; this.ctx.font = `${italic} ${bold} ${browserFontSize}px ${typeface}`; } setTextRenderingMode(opIdx, mode) { this.dependencyTracker?.recordSimpleData("textRenderingMode", opIdx); this.current.textRenderingMode = mode; } setTextRise(opIdx, rise) { this.dependencyTracker?.recordSimpleData("textRise", opIdx); this.current.textRise = rise; } moveText(opIdx, x$2, y$3) { this.dependencyTracker?.resetIncrementalData("sameLineText").recordIncrementalData("moveText", opIdx); this.current.x = this.current.lineX += x$2; this.current.y = this.current.lineY += y$3; } setLeadingMoveText(opIdx, x$2, y$3) { this.setLeading(opIdx, -y$3); this.moveText(opIdx, x$2, y$3); } setTextMatrix(opIdx, matrix) { this.dependencyTracker?.resetIncrementalData("sameLineText").recordSimpleData("textMatrix", opIdx); const { current } = this; current.textMatrix = matrix; current.textMatrixScale = Math.hypot(matrix[0], matrix[1]); current.x = current.lineX = 0; current.y = current.lineY = 0; } nextLine(opIdx) { this.moveText(opIdx, 0, this.current.leading); this.dependencyTracker?.recordIncrementalData("moveText", this.dependencyTracker.getSimpleIndex("leading") ?? opIdx); } #getScaledPath(path$1, currentTransform, transform) { const newPath = new Path2D(); newPath.addPath(path$1, new DOMMatrix(transform).invertSelf().multiplySelf(currentTransform)); return newPath; } paintChar(opIdx, character, x$2, y$3, patternFillTransform, patternStrokeTransform) { const ctx = this.ctx; const current = this.current; const font = current.font; const textRenderingMode = current.textRenderingMode; const fontSize = current.fontSize / current.fontSizeScale; const fillStrokeMode = textRenderingMode & TextRenderingMode.FILL_STROKE_MASK; const isAddToPathSet = !!(textRenderingMode & TextRenderingMode.ADD_TO_PATH_FLAG); const patternFill = current.patternFill && !font.missingFile; const patternStroke = current.patternStroke && !font.missingFile; let path$1; if ((font.disableFontFace || isAddToPathSet || patternFill || patternStroke) && !font.missingFile) { path$1 = font.getPathGenerator(this.commonObjs, character); } if (path$1 && (font.disableFontFace || patternFill || patternStroke)) { ctx.save(); ctx.translate(x$2, y$3); ctx.scale(fontSize, -fontSize); this.dependencyTracker?.recordCharacterBBox(opIdx, ctx, font); let currentTransform; if (fillStrokeMode === TextRenderingMode.FILL || fillStrokeMode === TextRenderingMode.FILL_STROKE) { if (patternFillTransform) { currentTransform = ctx.getTransform(); ctx.setTransform(...patternFillTransform); const scaledPath = this.#getScaledPath(path$1, currentTransform, patternFillTransform); ctx.fill(scaledPath); } else { ctx.fill(path$1); } } if (fillStrokeMode === TextRenderingMode.STROKE || fillStrokeMode === TextRenderingMode.FILL_STROKE) { if (patternStrokeTransform) { currentTransform ||= ctx.getTransform(); ctx.setTransform(...patternStrokeTransform); const { a: a$2, b: b$3, c: c$7, d: d$5 } = currentTransform; const invPatternTransform = Util.inverseTransform(patternStrokeTransform); const transf = Util.transform([ a$2, b$3, c$7, d$5, 0, 0 ], invPatternTransform); Util.singularValueDecompose2dScale(transf, XY); ctx.lineWidth *= Math.max(XY[0], XY[1]) / fontSize; ctx.stroke(this.#getScaledPath(path$1, currentTransform, patternStrokeTransform)); } else { ctx.lineWidth /= fontSize; ctx.stroke(path$1); } } ctx.restore(); } else { if (fillStrokeMode === TextRenderingMode.FILL || fillStrokeMode === TextRenderingMode.FILL_STROKE) { ctx.fillText(character, x$2, y$3); this.dependencyTracker?.recordCharacterBBox(opIdx, ctx, font, fontSize, x$2, y$3, () => ctx.measureText(character)); } if (fillStrokeMode === TextRenderingMode.STROKE || fillStrokeMode === TextRenderingMode.FILL_STROKE) { if (this.dependencyTracker) { this.dependencyTracker?.recordCharacterBBox(opIdx, ctx, font, fontSize, x$2, y$3, () => ctx.measureText(character)).recordDependencies(opIdx, Dependencies.stroke); } ctx.strokeText(character, x$2, y$3); } } if (isAddToPathSet) { const paths = this.pendingTextPaths ||= []; paths.push({ transform: getCurrentTransform(ctx), x: x$2, y: y$3, fontSize, path: path$1 }); this.dependencyTracker?.recordCharacterBBox(opIdx, ctx, font, fontSize, x$2, y$3); } } get isFontSubpixelAAEnabled() { const { context: ctx } = this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled", 10, 10); ctx.scale(1.5, 1); ctx.fillText("I", 0, 10); const data = ctx.getImageData(0, 0, 10, 10).data; let enabled = false; for (let i$7 = 3; i$7 < data.length; i$7 += 4) { if (data[i$7] > 0 && data[i$7] < 255) { enabled = true; break; } } return shadow(this, "isFontSubpixelAAEnabled", enabled); } showText(opIdx, glyphs) { if (this.dependencyTracker) { this.dependencyTracker.recordDependencies(opIdx, Dependencies.showText).resetBBox(opIdx); if (this.current.textRenderingMode & TextRenderingMode.ADD_TO_PATH_FLAG) { this.dependencyTracker.recordFutureForcedDependency("textClip", opIdx).inheritPendingDependenciesAsFutureForcedDependencies(); } } const current = this.current; const font = current.font; if (font.isType3Font) { this.showType3Text(opIdx, glyphs); this.dependencyTracker?.recordShowTextOperation(opIdx); return undefined; } const fontSize = current.fontSize; if (fontSize === 0) { this.dependencyTracker?.recordOperation(opIdx); return undefined; } const ctx = this.ctx; const fontSizeScale = current.fontSizeScale; const charSpacing = current.charSpacing; const wordSpacing = current.wordSpacing; const fontDirection = current.fontDirection; const textHScale = current.textHScale * fontDirection; const glyphsLength = glyphs.length; const vertical = font.vertical; const spacingDir = vertical ? 1 : -1; const defaultVMetrics = font.defaultVMetrics; const widthAdvanceScale = fontSize * current.fontMatrix[0]; const simpleFillText = current.textRenderingMode === TextRenderingMode.FILL && !font.disableFontFace && !current.patternFill; ctx.save(); if (current.textMatrix) { ctx.transform(...current.textMatrix); } ctx.translate(current.x, current.y + current.textRise); if (fontDirection > 0) { ctx.scale(textHScale, -1); } else { ctx.scale(textHScale, 1); } let patternFillTransform, patternStrokeTransform; if (current.patternFill) { ctx.save(); const pattern = current.fillColor.getPattern(ctx, this, getCurrentTransformInverse(ctx), PathType.FILL, opIdx); patternFillTransform = getCurrentTransform(ctx); ctx.restore(); ctx.fillStyle = pattern; } if (current.patternStroke) { ctx.save(); const pattern = current.strokeColor.getPattern(ctx, this, getCurrentTransformInverse(ctx), PathType.STROKE, opIdx); patternStrokeTransform = getCurrentTransform(ctx); ctx.restore(); ctx.strokeStyle = pattern; } let lineWidth = current.lineWidth; const scale = current.textMatrixScale; if (scale === 0 || lineWidth === 0) { const fillStrokeMode = current.textRenderingMode & TextRenderingMode.FILL_STROKE_MASK; if (fillStrokeMode === TextRenderingMode.STROKE || fillStrokeMode === TextRenderingMode.FILL_STROKE) { lineWidth = this.getSinglePixelWidth(); } } else { lineWidth /= scale; } if (fontSizeScale !== 1) { ctx.scale(fontSizeScale, fontSizeScale); lineWidth /= fontSizeScale; } ctx.lineWidth = lineWidth; if (font.isInvalidPDFjsFont) { const chars = []; let width = 0; for (const glyph of glyphs) { chars.push(glyph.unicode); width += glyph.width; } const joinedChars = chars.join(""); ctx.fillText(joinedChars, 0, 0); if (this.dependencyTracker !== null) { const measure = ctx.measureText(joinedChars); this.dependencyTracker.recordBBox(opIdx, this.ctx, -measure.actualBoundingBoxLeft, measure.actualBoundingBoxRight, -measure.actualBoundingBoxAscent, measure.actualBoundingBoxDescent).recordShowTextOperation(opIdx); } current.x += width * widthAdvanceScale * textHScale; ctx.restore(); this.compose(); return undefined; } let x$2 = 0, i$7; for (i$7 = 0; i$7 < glyphsLength; ++i$7) { const glyph = glyphs[i$7]; if (typeof glyph === "number") { x$2 += spacingDir * glyph * fontSize / 1e3; continue; } let restoreNeeded = false; const spacing$1 = (glyph.isSpace ? wordSpacing : 0) + charSpacing; const character = glyph.fontChar; const accent$1 = glyph.accent; let scaledX, scaledY; let width = glyph.width; if (vertical) { const vmetric = glyph.vmetric || defaultVMetrics; const vx = -(glyph.vmetric ? vmetric[1] : width * .5) * widthAdvanceScale; const vy = vmetric[2] * widthAdvanceScale; width = vmetric ? -vmetric[0] : width; scaledX = vx / fontSizeScale; scaledY = (x$2 + vy) / fontSizeScale; } else { scaledX = x$2 / fontSizeScale; scaledY = 0; } let measure; if (font.remeasure && width > 0) { measure = ctx.measureText(character); const measuredWidth = measure.width * 1e3 / fontSize * fontSizeScale; if (width < measuredWidth && this.isFontSubpixelAAEnabled) { const characterScaleX = width / measuredWidth; restoreNeeded = true; ctx.save(); ctx.scale(characterScaleX, 1); scaledX /= characterScaleX; } else if (width !== measuredWidth) { scaledX += (width - measuredWidth) / 2e3 * fontSize / fontSizeScale; } } if (this.contentVisible && (glyph.isInFont || font.missingFile)) { if (simpleFillText && !accent$1) { ctx.fillText(character, scaledX, scaledY); this.dependencyTracker?.recordCharacterBBox(opIdx, ctx, measure ? { bbox: null } : font, fontSize / fontSizeScale, scaledX, scaledY, () => measure ?? ctx.measureText(character)); } else { this.paintChar(opIdx, character, scaledX, scaledY, patternFillTransform, patternStrokeTransform); if (accent$1) { const scaledAccentX = scaledX + fontSize * accent$1.offset.x / fontSizeScale; const scaledAccentY = scaledY - fontSize * accent$1.offset.y / fontSizeScale; this.paintChar(opIdx, accent$1.fontChar, scaledAccentX, scaledAccentY, patternFillTransform, patternStrokeTransform); } } } const charWidth = vertical ? width * widthAdvanceScale - spacing$1 * fontDirection : width * widthAdvanceScale + spacing$1 * fontDirection; x$2 += charWidth; if (restoreNeeded) { ctx.restore(); } } if (vertical) { current.y -= x$2; } else { current.x += x$2 * textHScale; } ctx.restore(); this.compose(); this.dependencyTracker?.recordShowTextOperation(opIdx); return undefined; } showType3Text(opIdx, glyphs) { const ctx = this.ctx; const current = this.current; const font = current.font; const fontSize = current.fontSize; const fontDirection = current.fontDirection; const spacingDir = font.vertical ? 1 : -1; const charSpacing = current.charSpacing; const wordSpacing = current.wordSpacing; const textHScale = current.textHScale * fontDirection; const fontMatrix = current.fontMatrix || FONT_IDENTITY_MATRIX; const glyphsLength = glyphs.length; const isTextInvisible = current.textRenderingMode === TextRenderingMode.INVISIBLE; let i$7, glyph, width, spacingLength; if (isTextInvisible || fontSize === 0) { return; } this._cachedScaleForStroking[0] = -1; this._cachedGetSinglePixelWidth = null; ctx.save(); if (current.textMatrix) { ctx.transform(...current.textMatrix); } ctx.translate(current.x, current.y + current.textRise); ctx.scale(textHScale, fontDirection); const dependencyTracker = this.dependencyTracker; this.dependencyTracker = dependencyTracker ? new CanvasNestedDependencyTracker(dependencyTracker, opIdx) : null; for (i$7 = 0; i$7 < glyphsLength; ++i$7) { glyph = glyphs[i$7]; if (typeof glyph === "number") { spacingLength = spacingDir * glyph * fontSize / 1e3; this.ctx.translate(spacingLength, 0); current.x += spacingLength * textHScale; continue; } const spacing$1 = (glyph.isSpace ? wordSpacing : 0) + charSpacing; const operatorList = font.charProcOperatorList[glyph.operatorListId]; if (!operatorList) { warn$2(`Type3 character "${glyph.operatorListId}" is not available.`); } else if (this.contentVisible) { this.save(); ctx.scale(fontSize, fontSize); ctx.transform(...fontMatrix); this.executeOperatorList(operatorList); this.restore(); } const p$3 = [glyph.width, 0]; Util.applyTransform(p$3, fontMatrix); width = p$3[0] * fontSize + spacing$1; ctx.translate(width, 0); current.x += width * textHScale; } ctx.restore(); if (dependencyTracker) { this.dependencyTracker = dependencyTracker; } } setCharWidth(opIdx, xWidth, yWidth) {} setCharWidthAndBounds(opIdx, xWidth, yWidth, llx, lly, urx, ury) { const clip = new Path2D(); clip.rect(llx, lly, urx - llx, ury - lly); this.ctx.clip(clip); this.dependencyTracker?.recordBBox(opIdx, this.ctx, llx, urx, lly, ury).recordClipBox(opIdx, this.ctx, llx, urx, lly, ury); this.endPath(opIdx); } getColorN_Pattern(opIdx, IR) { let pattern; if (IR[0] === "TilingPattern") { const baseTransform = this.baseTransform || getCurrentTransform(this.ctx); const canvasGraphicsFactory = { createCanvasGraphics: (ctx, renderingOpIdx) => new CanvasGraphics(ctx, this.commonObjs, this.objs, this.canvasFactory, this.filterFactory, { optionalContentConfig: this.optionalContentConfig, markedContentStack: this.markedContentStack }, undefined, undefined, this.dependencyTracker ? new CanvasNestedDependencyTracker(this.dependencyTracker, renderingOpIdx, true) : null) }; pattern = new TilingPattern(IR, this.ctx, canvasGraphicsFactory, baseTransform); } else { pattern = this._getPattern(opIdx, IR[1], IR[2]); } return pattern; } setStrokeColorN(opIdx, ...args) { this.dependencyTracker?.recordSimpleData("strokeColor", opIdx); this.current.strokeColor = this.getColorN_Pattern(opIdx, args); this.current.patternStroke = true; } setFillColorN(opIdx, ...args) { this.dependencyTracker?.recordSimpleData("fillColor", opIdx); this.current.fillColor = this.getColorN_Pattern(opIdx, args); this.current.patternFill = true; } setStrokeRGBColor(opIdx, color) { this.dependencyTracker?.recordSimpleData("strokeColor", opIdx); this.ctx.strokeStyle = this.current.strokeColor = color; this.current.patternStroke = false; } setStrokeTransparent(opIdx) { this.dependencyTracker?.recordSimpleData("strokeColor", opIdx); this.ctx.strokeStyle = this.current.strokeColor = "transparent"; this.current.patternStroke = false; } setFillRGBColor(opIdx, color) { this.dependencyTracker?.recordSimpleData("fillColor", opIdx); this.ctx.fillStyle = this.current.fillColor = color; this.current.patternFill = false; } setFillTransparent(opIdx) { this.dependencyTracker?.recordSimpleData("fillColor", opIdx); this.ctx.fillStyle = this.current.fillColor = "transparent"; this.current.patternFill = false; } _getPattern(opIdx, objId, matrix = null) { let pattern; if (this.cachedPatterns.has(objId)) { pattern = this.cachedPatterns.get(objId); } else { pattern = getShadingPattern(this.getObject(opIdx, objId)); this.cachedPatterns.set(objId, pattern); } if (matrix) { pattern.matrix = matrix; } return pattern; } shadingFill(opIdx, objId) { if (!this.contentVisible) { return; } const ctx = this.ctx; this.save(opIdx); const pattern = this._getPattern(opIdx, objId); ctx.fillStyle = pattern.getPattern(ctx, this, getCurrentTransformInverse(ctx), PathType.SHADING, opIdx); const inv = getCurrentTransformInverse(ctx); if (inv) { const { width, height } = ctx.canvas; const minMax = MIN_MAX_INIT.slice(); Util.axialAlignedBoundingBox([ 0, 0, width, height ], inv, minMax); const [x0, y0, x1, y1] = minMax; this.ctx.fillRect(x0, y0, x1 - x0, y1 - y0); } else { this.ctx.fillRect(-1e10, -1e10, 2e10, 2e10); } this.dependencyTracker?.resetBBox(opIdx).recordFullPageBBox(opIdx).recordDependencies(opIdx, Dependencies.transform).recordDependencies(opIdx, Dependencies.fill).recordOperation(opIdx); this.compose(this.current.getClippedPathBoundingBox()); this.restore(opIdx); } beginInlineImage() { unreachable("Should not call beginInlineImage"); } beginImageData() { unreachable("Should not call beginImageData"); } paintFormXObjectBegin(opIdx, matrix, bbox) { if (!this.contentVisible) { return; } this.save(opIdx); this.baseTransformStack.push(this.baseTransform); if (matrix) { this.transform(opIdx, ...matrix); } this.baseTransform = getCurrentTransform(this.ctx); if (bbox) { Util.axialAlignedBoundingBox(bbox, this.baseTransform, this.current.minMax); const [x0, y0, x1, y1] = bbox; const clip = new Path2D(); clip.rect(x0, y0, x1 - x0, y1 - y0); this.ctx.clip(clip); this.dependencyTracker?.recordClipBox(opIdx, this.ctx, x0, x1, y0, y1); this.endPath(opIdx); } } paintFormXObjectEnd(opIdx) { if (!this.contentVisible) { return; } this.restore(opIdx); this.baseTransform = this.baseTransformStack.pop(); } beginGroup(opIdx, group) { if (!this.contentVisible) { return; } this.save(opIdx); if (this.inSMaskMode) { this.endSMaskMode(); this.current.activeSMask = null; } const currentCtx = this.ctx; if (!group.isolated) { info("TODO: Support non-isolated groups."); } if (group.knockout) { warn$2("Knockout groups not supported."); } const currentTransform = getCurrentTransform(currentCtx); if (group.matrix) { currentCtx.transform(...group.matrix); } if (!group.bbox) { throw new Error("Bounding box is required."); } let bounds = MIN_MAX_INIT.slice(); Util.axialAlignedBoundingBox(group.bbox, getCurrentTransform(currentCtx), bounds); const canvasBounds = [ 0, 0, currentCtx.canvas.width, currentCtx.canvas.height ]; bounds = Util.intersect(bounds, canvasBounds) || [ 0, 0, 0, 0 ]; const offsetX = Math.floor(bounds[0]); const offsetY = Math.floor(bounds[1]); const drawnWidth = Math.max(Math.ceil(bounds[2]) - offsetX, 1); const drawnHeight = Math.max(Math.ceil(bounds[3]) - offsetY, 1); this.current.startNewPathAndClipBox([ 0, 0, drawnWidth, drawnHeight ]); let cacheId = "groupAt" + this.groupLevel; if (group.smask) { cacheId += "_smask_" + this.smaskCounter++ % 2; } const scratchCanvas = this.cachedCanvases.getCanvas(cacheId, drawnWidth, drawnHeight); const groupCtx = scratchCanvas.context; groupCtx.translate(-offsetX, -offsetY); groupCtx.transform(...currentTransform); let clip = new Path2D(); const [x0, y0, x1, y1] = group.bbox; clip.rect(x0, y0, x1 - x0, y1 - y0); if (group.matrix) { const path$1 = new Path2D(); path$1.addPath(clip, new DOMMatrix(group.matrix)); clip = path$1; } groupCtx.clip(clip); if (group.smask) { this.smaskStack.push({ canvas: scratchCanvas.canvas, context: groupCtx, offsetX, offsetY, subtype: group.smask.subtype, backdrop: group.smask.backdrop, transferMap: group.smask.transferMap || null, startTransformInverse: null }); } if (!group.smask || this.dependencyTracker) { currentCtx.setTransform(1, 0, 0, 1, 0, 0); currentCtx.translate(offsetX, offsetY); currentCtx.save(); } copyCtxState(currentCtx, groupCtx); this.ctx = groupCtx; this.dependencyTracker?.inheritSimpleDataAsFutureForcedDependencies([ "fillAlpha", "strokeAlpha", "globalCompositeOperation" ]).pushBaseTransform(currentCtx); this.setGState(opIdx, [ ["BM", "source-over"], ["ca", 1], ["CA", 1] ]); this.groupStack.push(currentCtx); this.groupLevel++; } endGroup(opIdx, group) { if (!this.contentVisible) { return; } this.groupLevel--; const groupCtx = this.ctx; const ctx = this.groupStack.pop(); this.ctx = ctx; this.ctx.imageSmoothingEnabled = false; this.dependencyTracker?.popBaseTransform(); if (group.smask) { this.tempSMask = this.smaskStack.pop(); this.restore(opIdx); if (this.dependencyTracker) { this.ctx.restore(); } } else { this.ctx.restore(); const currentMtx = getCurrentTransform(this.ctx); this.restore(opIdx); this.ctx.save(); this.ctx.setTransform(...currentMtx); const dirtyBox = MIN_MAX_INIT.slice(); Util.axialAlignedBoundingBox([ 0, 0, groupCtx.canvas.width, groupCtx.canvas.height ], currentMtx, dirtyBox); this.ctx.drawImage(groupCtx.canvas, 0, 0); this.ctx.restore(); this.compose(dirtyBox); } } beginAnnotation(opIdx, id, rect, transform, matrix, hasOwnCanvas) { this.#restoreInitialState(); resetCtxToDefault(this.ctx); this.ctx.save(); this.save(opIdx); if (this.baseTransform) { this.ctx.setTransform(...this.baseTransform); } if (rect) { const width = rect[2] - rect[0]; const height = rect[3] - rect[1]; if (hasOwnCanvas && this.annotationCanvasMap) { transform = transform.slice(); transform[4] -= rect[0]; transform[5] -= rect[1]; rect = rect.slice(); rect[0] = rect[1] = 0; rect[2] = width; rect[3] = height; Util.singularValueDecompose2dScale(getCurrentTransform(this.ctx), XY); const { viewportScale } = this; const canvasWidth = Math.ceil(width * this.outputScaleX * viewportScale); const canvasHeight = Math.ceil(height * this.outputScaleY * viewportScale); this.annotationCanvas = this.canvasFactory.create(canvasWidth, canvasHeight); const { canvas, context } = this.annotationCanvas; this.annotationCanvasMap.set(id, canvas); this.annotationCanvas.savedCtx = this.ctx; this.ctx = context; this.ctx.save(); this.ctx.setTransform(XY[0], 0, 0, -XY[1], 0, height * XY[1]); resetCtxToDefault(this.ctx); } else { resetCtxToDefault(this.ctx); this.endPath(opIdx); const clip = new Path2D(); clip.rect(rect[0], rect[1], width, height); this.ctx.clip(clip); } } this.current = new CanvasExtraState(this.ctx.canvas.width, this.ctx.canvas.height); this.transform(opIdx, ...transform); this.transform(opIdx, ...matrix); } endAnnotation(opIdx) { if (this.annotationCanvas) { this.ctx.restore(); this.#drawFilter(); this.ctx = this.annotationCanvas.savedCtx; delete this.annotationCanvas.savedCtx; delete this.annotationCanvas; } } paintImageMaskXObject(opIdx, img) { if (!this.contentVisible) { return; } const count = img.count; img = this.getObject(opIdx, img.data, img); img.count = count; const ctx = this.ctx; const mask = this._createMaskCanvas(opIdx, img); const maskCanvas = mask.canvas; ctx.save(); ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.drawImage(maskCanvas, mask.offsetX, mask.offsetY); this.dependencyTracker?.resetBBox(opIdx).recordBBox(opIdx, this.ctx, mask.offsetX, mask.offsetX + maskCanvas.width, mask.offsetY, mask.offsetY + maskCanvas.height).recordOperation(opIdx); ctx.restore(); this.compose(); } paintImageMaskXObjectRepeat(opIdx, img, scaleX, skewX = 0, skewY = 0, scaleY, positions) { if (!this.contentVisible) { return; } img = this.getObject(opIdx, img.data, img); const ctx = this.ctx; ctx.save(); const currentTransform = getCurrentTransform(ctx); ctx.transform(scaleX, skewX, skewY, scaleY, 0, 0); const mask = this._createMaskCanvas(opIdx, img); ctx.setTransform(1, 0, 0, 1, mask.offsetX - currentTransform[4], mask.offsetY - currentTransform[5]); this.dependencyTracker?.resetBBox(opIdx); for (let i$7 = 0, ii = positions.length; i$7 < ii; i$7 += 2) { const trans = Util.transform(currentTransform, [ scaleX, skewX, skewY, scaleY, positions[i$7], positions[i$7 + 1] ]); ctx.drawImage(mask.canvas, trans[4], trans[5]); this.dependencyTracker?.recordBBox(opIdx, this.ctx, trans[4], trans[4] + mask.canvas.width, trans[5], trans[5] + mask.canvas.height); } ctx.restore(); this.compose(); this.dependencyTracker?.recordOperation(opIdx); } paintImageMaskXObjectGroup(opIdx, images) { if (!this.contentVisible) { return; } const ctx = this.ctx; const fillColor = this.current.fillColor; const isPatternFill = this.current.patternFill; this.dependencyTracker?.resetBBox(opIdx).recordDependencies(opIdx, Dependencies.transformAndFill); for (const image of images) { const { data, width, height, transform } = image; const maskCanvas = this.cachedCanvases.getCanvas("maskCanvas", width, height); const maskCtx = maskCanvas.context; maskCtx.save(); const img = this.getObject(opIdx, data, image); putBinaryImageMask(maskCtx, img); maskCtx.globalCompositeOperation = "source-in"; maskCtx.fillStyle = isPatternFill ? fillColor.getPattern(maskCtx, this, getCurrentTransformInverse(ctx), PathType.FILL, opIdx) : fillColor; maskCtx.fillRect(0, 0, width, height); maskCtx.restore(); ctx.save(); ctx.transform(...transform); ctx.scale(1, -1); drawImageAtIntegerCoords(ctx, maskCanvas.canvas, 0, 0, width, height, 0, -1, 1, 1); this.dependencyTracker?.recordBBox(opIdx, ctx, 0, width, 0, height); ctx.restore(); } this.compose(); this.dependencyTracker?.recordOperation(opIdx); } paintImageXObject(opIdx, objId) { if (!this.contentVisible) { return; } const imgData = this.getObject(opIdx, objId); if (!imgData) { warn$2("Dependent image isn't ready yet"); return; } this.paintInlineImageXObject(opIdx, imgData); } paintImageXObjectRepeat(opIdx, objId, scaleX, scaleY, positions) { if (!this.contentVisible) { return; } const imgData = this.getObject(opIdx, objId); if (!imgData) { warn$2("Dependent image isn't ready yet"); return; } const width = imgData.width; const height = imgData.height; const map$2 = []; for (let i$7 = 0, ii = positions.length; i$7 < ii; i$7 += 2) { map$2.push({ transform: [ scaleX, 0, 0, scaleY, positions[i$7], positions[i$7 + 1] ], x: 0, y: 0, w: width, h: height }); } this.paintInlineImageXObjectGroup(opIdx, imgData, map$2); } applyTransferMapsToCanvas(ctx) { if (this.current.transferMaps !== "none") { ctx.filter = this.current.transferMaps; ctx.drawImage(ctx.canvas, 0, 0); ctx.filter = "none"; } return ctx.canvas; } applyTransferMapsToBitmap(imgData) { if (this.current.transferMaps === "none") { return imgData.bitmap; } const { bitmap, width, height } = imgData; const tmpCanvas = this.cachedCanvases.getCanvas("inlineImage", width, height); const tmpCtx = tmpCanvas.context; tmpCtx.filter = this.current.transferMaps; tmpCtx.drawImage(bitmap, 0, 0); tmpCtx.filter = "none"; return tmpCanvas.canvas; } paintInlineImageXObject(opIdx, imgData) { if (!this.contentVisible) { return; } const width = imgData.width; const height = imgData.height; const ctx = this.ctx; this.save(opIdx); const { filter } = ctx; if (filter !== "none" && filter !== "") { ctx.filter = "none"; } ctx.scale(1 / width, -1 / height); let imgToPaint; if (imgData.bitmap) { imgToPaint = this.applyTransferMapsToBitmap(imgData); } else if (typeof HTMLElement === "function" && imgData instanceof HTMLElement || !imgData.data) { imgToPaint = imgData; } else { const tmpCanvas = this.cachedCanvases.getCanvas("inlineImage", width, height); const tmpCtx = tmpCanvas.context; putBinaryImageData(tmpCtx, imgData); imgToPaint = this.applyTransferMapsToCanvas(tmpCtx); } const scaled = this._scaleImage(imgToPaint, getCurrentTransformInverse(ctx)); ctx.imageSmoothingEnabled = getImageSmoothingEnabled(getCurrentTransform(ctx), imgData.interpolate); this.dependencyTracker?.resetBBox(opIdx).recordBBox(opIdx, ctx, 0, width, -height, 0).recordDependencies(opIdx, Dependencies.imageXObject).recordOperation(opIdx); drawImageAtIntegerCoords(ctx, scaled.img, 0, 0, scaled.paintWidth, scaled.paintHeight, 0, -height, width, height); this.compose(); this.restore(opIdx); } paintInlineImageXObjectGroup(opIdx, imgData, map$2) { if (!this.contentVisible) { return; } const ctx = this.ctx; let imgToPaint; if (imgData.bitmap) { imgToPaint = imgData.bitmap; } else { const w$2 = imgData.width; const h$5 = imgData.height; const tmpCanvas = this.cachedCanvases.getCanvas("inlineImage", w$2, h$5); const tmpCtx = tmpCanvas.context; putBinaryImageData(tmpCtx, imgData); imgToPaint = this.applyTransferMapsToCanvas(tmpCtx); } this.dependencyTracker?.resetBBox(opIdx); for (const entry of map$2) { ctx.save(); ctx.transform(...entry.transform); ctx.scale(1, -1); drawImageAtIntegerCoords(ctx, imgToPaint, entry.x, entry.y, entry.w, entry.h, 0, -1, 1, 1); this.dependencyTracker?.recordBBox(opIdx, ctx, 0, 1, -1, 0); ctx.restore(); } this.dependencyTracker?.recordOperation(opIdx); this.compose(); } paintSolidColorImageMask(opIdx) { if (!this.contentVisible) { return; } this.dependencyTracker?.resetBBox(opIdx).recordBBox(opIdx, this.ctx, 0, 1, 0, 1).recordDependencies(opIdx, Dependencies.fill).recordOperation(opIdx); this.ctx.fillRect(0, 0, 1, 1); this.compose(); } markPoint(opIdx, tag) {} markPointProps(opIdx, tag, properties$1) {} beginMarkedContent(opIdx, tag) { this.dependencyTracker?.beginMarkedContent(opIdx); this.markedContentStack.push({ visible: true }); } beginMarkedContentProps(opIdx, tag, properties$1) { this.dependencyTracker?.beginMarkedContent(opIdx); if (tag === "OC") { this.markedContentStack.push({ visible: this.optionalContentConfig.isVisible(properties$1) }); } else { this.markedContentStack.push({ visible: true }); } this.contentVisible = this.isContentVisible(); } endMarkedContent(opIdx) { this.dependencyTracker?.endMarkedContent(opIdx); this.markedContentStack.pop(); this.contentVisible = this.isContentVisible(); } beginCompat(opIdx) {} endCompat(opIdx) {} consumePath(opIdx, path$1, clipBox) { const isEmpty = this.current.isEmptyClip(); if (this.pendingClip) { this.current.updateClipFromPath(); } if (!this.pendingClip) { this.compose(clipBox); } const ctx = this.ctx; if (this.pendingClip) { if (!isEmpty) { if (this.pendingClip === EO_CLIP) { ctx.clip(path$1, "evenodd"); } else { ctx.clip(path$1); } } this.pendingClip = null; this.dependencyTracker?.bboxToClipBoxDropOperation(opIdx).recordFutureForcedDependency("clipPath", opIdx); } else { this.dependencyTracker?.recordOperation(opIdx); } this.current.startNewPathAndClipBox(this.current.clipBox); } getSinglePixelWidth() { if (!this._cachedGetSinglePixelWidth) { const m$3 = getCurrentTransform(this.ctx); if (m$3[1] === 0 && m$3[2] === 0) { this._cachedGetSinglePixelWidth = 1 / Math.min(Math.abs(m$3[0]), Math.abs(m$3[3])); } else { const absDet = Math.abs(m$3[0] * m$3[3] - m$3[2] * m$3[1]); const normX = Math.hypot(m$3[0], m$3[2]); const normY = Math.hypot(m$3[1], m$3[3]); this._cachedGetSinglePixelWidth = Math.max(normX, normY) / absDet; } } return this._cachedGetSinglePixelWidth; } getScaleForStroking() { if (this._cachedScaleForStroking[0] === -1) { const { lineWidth } = this.current; const { a: a$2, b: b$3, c: c$7, d: d$5 } = this.ctx.getTransform(); let scaleX, scaleY; if (b$3 === 0 && c$7 === 0) { const normX = Math.abs(a$2); const normY = Math.abs(d$5); if (normX === normY) { if (lineWidth === 0) { scaleX = scaleY = 1 / normX; } else { const scaledLineWidth = normX * lineWidth; scaleX = scaleY = scaledLineWidth < 1 ? 1 / scaledLineWidth : 1; } } else if (lineWidth === 0) { scaleX = 1 / normX; scaleY = 1 / normY; } else { const scaledXLineWidth = normX * lineWidth; const scaledYLineWidth = normY * lineWidth; scaleX = scaledXLineWidth < 1 ? 1 / scaledXLineWidth : 1; scaleY = scaledYLineWidth < 1 ? 1 / scaledYLineWidth : 1; } } else { const absDet = Math.abs(a$2 * d$5 - b$3 * c$7); const normX = Math.hypot(a$2, b$3); const normY = Math.hypot(c$7, d$5); if (lineWidth === 0) { scaleX = normY / absDet; scaleY = normX / absDet; } else { const baseArea = lineWidth * absDet; scaleX = normY > baseArea ? normY / baseArea : 1; scaleY = normX > baseArea ? normX / baseArea : 1; } } this._cachedScaleForStroking[0] = scaleX; this._cachedScaleForStroking[1] = scaleY; } return this._cachedScaleForStroking; } rescaleAndStroke(path$1, saveRestore) { const { ctx, current: { lineWidth } } = this; const [scaleX, scaleY] = this.getScaleForStroking(); if (scaleX === scaleY) { ctx.lineWidth = (lineWidth || 1) * scaleX; ctx.stroke(path$1); return; } const dashes = ctx.getLineDash(); if (saveRestore) { ctx.save(); } ctx.scale(scaleX, scaleY); SCALE_MATRIX.a = 1 / scaleX; SCALE_MATRIX.d = 1 / scaleY; const newPath = new Path2D(); newPath.addPath(path$1, SCALE_MATRIX); if (dashes.length > 0) { const scale = Math.max(scaleX, scaleY); ctx.setLineDash(dashes.map((x$2) => x$2 / scale)); ctx.lineDashOffset /= scale; } ctx.lineWidth = lineWidth || 1; ctx.stroke(newPath); if (saveRestore) { ctx.restore(); } } isContentVisible() { for (let i$7 = this.markedContentStack.length - 1; i$7 >= 0; i$7--) { if (!this.markedContentStack[i$7].visible) { return false; } } return true; } }; for (const op$1 in OPS) { if (CanvasGraphics.prototype[op$1] !== undefined) { CanvasGraphics.prototype[OPS[op$1]] = CanvasGraphics.prototype[op$1]; } } ; GlobalWorkerOptions = class { static #port = null; static #src = ""; static get workerPort() { return this.#port; } static set workerPort(val$1) { if (!(typeof Worker !== "undefined" && val$1 instanceof Worker) && val$1 !== null) { throw new Error("Invalid `workerPort` type."); } this.#port = val$1; } static get workerSrc() { return this.#src; } static set workerSrc(val$1) { if (typeof val$1 !== "string") { throw new Error("Invalid `workerSrc` type."); } this.#src = val$1; } }; ; Metadata = class { #map; #data; constructor({ parsedData, rawData }) { this.#map = parsedData; this.#data = rawData; } getRaw() { return this.#data; } get(name) { return this.#map.get(name) ?? null; } [Symbol.iterator]() { return this.#map.entries(); } }; ; INTERNAL = Symbol("INTERNAL"); OptionalContentGroup = class { #isDisplay = false; #isPrint = false; #userSet = false; #visible = true; constructor(renderingIntent, { name, intent, usage, rbGroups }) { this.#isDisplay = !!(renderingIntent & RenderingIntentFlag.DISPLAY); this.#isPrint = !!(renderingIntent & RenderingIntentFlag.PRINT); this.name = name; this.intent = intent; this.usage = usage; this.rbGroups = rbGroups; } get visible() { if (this.#userSet) { return this.#visible; } if (!this.#visible) { return false; } const { print, view } = this.usage; if (this.#isDisplay) { return view?.viewState !== "OFF"; } else if (this.#isPrint) { return print?.printState !== "OFF"; } return true; } _setVisible(internal, visible, userSet = false) { if (internal !== INTERNAL) { unreachable("Internal method `_setVisible` called."); } this.#userSet = userSet; this.#visible = visible; } }; OptionalContentConfig = class { #cachedGetHash = null; #groups = new Map(); #initialHash = null; #order = null; constructor(data, renderingIntent = RenderingIntentFlag.DISPLAY) { this.renderingIntent = renderingIntent; this.name = null; this.creator = null; if (data === null) { return; } this.name = data.name; this.creator = data.creator; this.#order = data.order; for (const group of data.groups) { this.#groups.set(group.id, new OptionalContentGroup(renderingIntent, group)); } if (data.baseState === "OFF") { for (const group of this.#groups.values()) { group._setVisible(INTERNAL, false); } } for (const on of data.on) { this.#groups.get(on)._setVisible(INTERNAL, true); } for (const off of data.off) { this.#groups.get(off)._setVisible(INTERNAL, false); } this.#initialHash = this.getHash(); } #evaluateVisibilityExpression(array) { const length = array.length; if (length < 2) { return true; } const operator$1 = array[0]; for (let i$7 = 1; i$7 < length; i$7++) { const element = array[i$7]; let state$1; if (Array.isArray(element)) { state$1 = this.#evaluateVisibilityExpression(element); } else if (this.#groups.has(element)) { state$1 = this.#groups.get(element).visible; } else { warn$2(`Optional content group not found: ${element}`); return true; } switch (operator$1) { case "And": if (!state$1) { return false; } break; case "Or": if (state$1) { return true; } break; case "Not": return !state$1; default: return true; } } return operator$1 === "And"; } isVisible(group) { if (this.#groups.size === 0) { return true; } if (!group) { info("Optional content group not defined."); return true; } if (group.type === "OCG") { if (!this.#groups.has(group.id)) { warn$2(`Optional content group not found: ${group.id}`); return true; } return this.#groups.get(group.id).visible; } else if (group.type === "OCMD") { if (group.expression) { return this.#evaluateVisibilityExpression(group.expression); } if (!group.policy || group.policy === "AnyOn") { for (const id of group.ids) { if (!this.#groups.has(id)) { warn$2(`Optional content group not found: ${id}`); return true; } if (this.#groups.get(id).visible) { return true; } } return false; } else if (group.policy === "AllOn") { for (const id of group.ids) { if (!this.#groups.has(id)) { warn$2(`Optional content group not found: ${id}`); return true; } if (!this.#groups.get(id).visible) { return false; } } return true; } else if (group.policy === "AnyOff") { for (const id of group.ids) { if (!this.#groups.has(id)) { warn$2(`Optional content group not found: ${id}`); return true; } if (!this.#groups.get(id).visible) { return true; } } return false; } else if (group.policy === "AllOff") { for (const id of group.ids) { if (!this.#groups.has(id)) { warn$2(`Optional content group not found: ${id}`); return true; } if (this.#groups.get(id).visible) { return false; } } return true; } warn$2(`Unknown optional content policy ${group.policy}.`); return true; } warn$2(`Unknown group type ${group.type}.`); return true; } setVisibility(id, visible = true, preserveRB = true) { const group = this.#groups.get(id); if (!group) { warn$2(`Optional content group not found: ${id}`); return; } if (preserveRB && visible && group.rbGroups.length) { for (const rbGroup of group.rbGroups) { for (const otherId of rbGroup) { if (otherId !== id) { this.#groups.get(otherId)?._setVisible(INTERNAL, false, true); } } } } group._setVisible(INTERNAL, !!visible, true); this.#cachedGetHash = null; } setOCGState({ state: state$1, preserveRB }) { let operator$1; for (const elem of state$1) { switch (elem) { case "ON": case "OFF": case "Toggle": operator$1 = elem; continue; } const group = this.#groups.get(elem); if (!group) { continue; } switch (operator$1) { case "ON": this.setVisibility(elem, true, preserveRB); break; case "OFF": this.setVisibility(elem, false, preserveRB); break; case "Toggle": this.setVisibility(elem, !group.visible, preserveRB); break; } } this.#cachedGetHash = null; } get hasInitialVisibility() { return this.#initialHash === null || this.getHash() === this.#initialHash; } getOrder() { if (!this.#groups.size) { return null; } if (this.#order) { return this.#order.slice(); } return [...this.#groups.keys()]; } getGroup(id) { return this.#groups.get(id) || null; } getHash() { if (this.#cachedGetHash !== null) { return this.#cachedGetHash; } const hash = new MurmurHash3_64(); for (const [id, group] of this.#groups) { hash.update(`${id}:${group.visible}`); } return this.#cachedGetHash = hash.hexdigest(); } [Symbol.iterator]() { return this.#groups.entries(); } }; ; PDFDataTransportStream = class { constructor(pdfDataRangeTransport, { disableRange = false, disableStream = false }) { assert$1(pdfDataRangeTransport, "PDFDataTransportStream - missing required \"pdfDataRangeTransport\" argument."); const { length, initialData, progressiveDone, contentDispositionFilename } = pdfDataRangeTransport; this._queuedChunks = []; this._progressiveDone = progressiveDone; this._contentDispositionFilename = contentDispositionFilename; if (initialData?.length > 0) { const buffer = initialData instanceof Uint8Array && initialData.byteLength === initialData.buffer.byteLength ? initialData.buffer : new Uint8Array(initialData).buffer; this._queuedChunks.push(buffer); } this._pdfDataRangeTransport = pdfDataRangeTransport; this._isStreamingSupported = !disableStream; this._isRangeSupported = !disableRange; this._contentLength = length; this._fullRequestReader = null; this._rangeReaders = []; pdfDataRangeTransport.addRangeListener((begin, chunk) => { this._onReceiveData({ begin, chunk }); }); pdfDataRangeTransport.addProgressListener((loaded, total) => { this._onProgress({ loaded, total }); }); pdfDataRangeTransport.addProgressiveReadListener((chunk) => { this._onReceiveData({ chunk }); }); pdfDataRangeTransport.addProgressiveDoneListener(() => { this._onProgressiveDone(); }); pdfDataRangeTransport.transportReady(); } _onReceiveData({ begin, chunk }) { const buffer = chunk instanceof Uint8Array && chunk.byteLength === chunk.buffer.byteLength ? chunk.buffer : new Uint8Array(chunk).buffer; if (begin === undefined) { if (this._fullRequestReader) { this._fullRequestReader._enqueue(buffer); } else { this._queuedChunks.push(buffer); } } else { const found = this._rangeReaders.some(function(rangeReader) { if (rangeReader._begin !== begin) { return false; } rangeReader._enqueue(buffer); return true; }); assert$1(found, "_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found."); } } get _progressiveDataLength() { return this._fullRequestReader?._loaded ?? 0; } _onProgress(evt) { if (evt.total === undefined) { this._rangeReaders[0]?.onProgress?.({ loaded: evt.loaded }); } else { this._fullRequestReader?.onProgress?.({ loaded: evt.loaded, total: evt.total }); } } _onProgressiveDone() { this._fullRequestReader?.progressiveDone(); this._progressiveDone = true; } _removeRangeReader(reader) { const i$7 = this._rangeReaders.indexOf(reader); if (i$7 >= 0) { this._rangeReaders.splice(i$7, 1); } } getFullReader() { assert$1(!this._fullRequestReader, "PDFDataTransportStream.getFullReader can only be called once."); const queuedChunks = this._queuedChunks; this._queuedChunks = null; return new PDFDataTransportStreamReader(this, queuedChunks, this._progressiveDone, this._contentDispositionFilename); } getRangeReader(begin, end) { if (end <= this._progressiveDataLength) { return null; } const reader = new PDFDataTransportStreamRangeReader(this, begin, end); this._pdfDataRangeTransport.requestDataRange(begin, end); this._rangeReaders.push(reader); return reader; } cancelAllRequests(reason) { this._fullRequestReader?.cancel(reason); for (const reader of this._rangeReaders.slice(0)) { reader.cancel(reason); } this._pdfDataRangeTransport.abort(); } }; PDFDataTransportStreamReader = class { constructor(stream, queuedChunks, progressiveDone = false, contentDispositionFilename = null) { this._stream = stream; this._done = progressiveDone || false; this._filename = isPdfFile(contentDispositionFilename) ? contentDispositionFilename : null; this._queuedChunks = queuedChunks || []; this._loaded = 0; for (const chunk of this._queuedChunks) { this._loaded += chunk.byteLength; } this._requests = []; this._headersReady = Promise.resolve(); stream._fullRequestReader = this; this.onProgress = null; } _enqueue(chunk) { if (this._done) { return; } if (this._requests.length > 0) { const requestCapability = this._requests.shift(); requestCapability.resolve({ value: chunk, done: false }); } else { this._queuedChunks.push(chunk); } this._loaded += chunk.byteLength; } get headersReady() { return this._headersReady; } get filename() { return this._filename; } get isRangeSupported() { return this._stream._isRangeSupported; } get isStreamingSupported() { return this._stream._isStreamingSupported; } get contentLength() { return this._stream._contentLength; } async read() { if (this._queuedChunks.length > 0) { const chunk = this._queuedChunks.shift(); return { value: chunk, done: false }; } if (this._done) { return { value: undefined, done: true }; } const requestCapability = Promise.withResolvers(); this._requests.push(requestCapability); return requestCapability.promise; } cancel(reason) { this._done = true; for (const requestCapability of this._requests) { requestCapability.resolve({ value: undefined, done: true }); } this._requests.length = 0; } progressiveDone() { if (this._done) { return; } this._done = true; } }; PDFDataTransportStreamRangeReader = class { constructor(stream, begin, end) { this._stream = stream; this._begin = begin; this._end = end; this._queuedChunk = null; this._requests = []; this._done = false; this.onProgress = null; } _enqueue(chunk) { if (this._done) { return; } if (this._requests.length === 0) { this._queuedChunk = chunk; } else { const requestsCapability = this._requests.shift(); requestsCapability.resolve({ value: chunk, done: false }); for (const requestCapability of this._requests) { requestCapability.resolve({ value: undefined, done: true }); } this._requests.length = 0; } this._done = true; this._stream._removeRangeReader(this); } get isStreamingSupported() { return false; } async read() { if (this._queuedChunk) { const chunk = this._queuedChunk; this._queuedChunk = null; return { value: chunk, done: false }; } if (this._done) { return { value: undefined, done: true }; } const requestCapability = Promise.withResolvers(); this._requests.push(requestCapability); return requestCapability.promise; } cancel(reason) { this._done = true; for (const requestCapability of this._requests) { requestCapability.resolve({ value: undefined, done: true }); } this._requests.length = 0; this._stream._removeRangeReader(this); } }; ; ; ; PDFFetchStream = class { _responseOrigin = null; constructor(source$4) { this.source = source$4; this.isHttp = /^https?:/i.test(source$4.url); this.headers = createHeaders(this.isHttp, source$4.httpHeaders); this._fullRequestReader = null; this._rangeRequestReaders = []; } get _progressiveDataLength() { return this._fullRequestReader?._loaded ?? 0; } getFullReader() { assert$1(!this._fullRequestReader, "PDFFetchStream.getFullReader can only be called once."); this._fullRequestReader = new PDFFetchStreamReader(this); return this._fullRequestReader; } getRangeReader(begin, end) { if (end <= this._progressiveDataLength) { return null; } const reader = new PDFFetchStreamRangeReader(this, begin, end); this._rangeRequestReaders.push(reader); return reader; } cancelAllRequests(reason) { this._fullRequestReader?.cancel(reason); for (const reader of this._rangeRequestReaders.slice(0)) { reader.cancel(reason); } } }; PDFFetchStreamReader = class { constructor(stream) { this._stream = stream; this._reader = null; this._loaded = 0; this._filename = null; const source$4 = stream.source; this._withCredentials = source$4.withCredentials || false; this._contentLength = source$4.length; this._headersCapability = Promise.withResolvers(); this._disableRange = source$4.disableRange || false; this._rangeChunkSize = source$4.rangeChunkSize; if (!this._rangeChunkSize && !this._disableRange) { this._disableRange = true; } this._abortController = new AbortController(); this._isStreamingSupported = !source$4.disableStream; this._isRangeSupported = !source$4.disableRange; const headers = new Headers(stream.headers); const url = source$4.url; fetch(url, createFetchOptions(headers, this._withCredentials, this._abortController)).then((response) => { stream._responseOrigin = getResponseOrigin(response.url); if (!validateResponseStatus(response.status)) { throw createResponseError(response.status, url); } this._reader = response.body.getReader(); this._headersCapability.resolve(); const responseHeaders = response.headers; const { allowRangeRequests, suggestedLength } = validateRangeRequestCapabilities({ responseHeaders, isHttp: stream.isHttp, rangeChunkSize: this._rangeChunkSize, disableRange: this._disableRange }); this._isRangeSupported = allowRangeRequests; this._contentLength = suggestedLength || this._contentLength; this._filename = extractFilenameFromHeader(responseHeaders); if (!this._isStreamingSupported && this._isRangeSupported) { this.cancel(new AbortException("Streaming is disabled.")); } }).catch(this._headersCapability.reject); this.onProgress = null; } get headersReady() { return this._headersCapability.promise; } get filename() { return this._filename; } get contentLength() { return this._contentLength; } get isRangeSupported() { return this._isRangeSupported; } get isStreamingSupported() { return this._isStreamingSupported; } async read() { await this._headersCapability.promise; const { value, done } = await this._reader.read(); if (done) { return { value, done }; } this._loaded += value.byteLength; this.onProgress?.({ loaded: this._loaded, total: this._contentLength }); return { value: getArrayBuffer(value), done: false }; } cancel(reason) { this._reader?.cancel(reason); this._abortController.abort(); } }; PDFFetchStreamRangeReader = class { constructor(stream, begin, end) { this._stream = stream; this._reader = null; this._loaded = 0; const source$4 = stream.source; this._withCredentials = source$4.withCredentials || false; this._readCapability = Promise.withResolvers(); this._isStreamingSupported = !source$4.disableStream; this._abortController = new AbortController(); const headers = new Headers(stream.headers); headers.append("Range", `bytes=${begin}-${end - 1}`); const url = source$4.url; fetch(url, createFetchOptions(headers, this._withCredentials, this._abortController)).then((response) => { const responseOrigin = getResponseOrigin(response.url); if (responseOrigin !== stream._responseOrigin) { throw new Error(`Expected range response-origin "${responseOrigin}" to match "${stream._responseOrigin}".`); } if (!validateResponseStatus(response.status)) { throw createResponseError(response.status, url); } this._readCapability.resolve(); this._reader = response.body.getReader(); }).catch(this._readCapability.reject); this.onProgress = null; } get isStreamingSupported() { return this._isStreamingSupported; } async read() { await this._readCapability.promise; const { value, done } = await this._reader.read(); if (done) { return { value, done }; } this._loaded += value.byteLength; this.onProgress?.({ loaded: this._loaded }); return { value: getArrayBuffer(value), done: false }; } cancel(reason) { this._reader?.cancel(reason); this._abortController.abort(); } }; ; OK_RESPONSE = 200; PARTIAL_CONTENT_RESPONSE = 206; NetworkManager = class { _responseOrigin = null; constructor({ url, httpHeaders, withCredentials }) { this.url = url; this.isHttp = /^https?:/i.test(url); this.headers = createHeaders(this.isHttp, httpHeaders); this.withCredentials = withCredentials || false; this.currXhrId = 0; this.pendingRequests = Object.create(null); } request(args) { const xhr = new XMLHttpRequest(); const xhrId = this.currXhrId++; const pendingRequest = this.pendingRequests[xhrId] = { xhr }; xhr.open("GET", this.url); xhr.withCredentials = this.withCredentials; for (const [key, val$1] of this.headers) { xhr.setRequestHeader(key, val$1); } if (this.isHttp && "begin" in args && "end" in args) { xhr.setRequestHeader("Range", `bytes=${args.begin}-${args.end - 1}`); pendingRequest.expectedStatus = PARTIAL_CONTENT_RESPONSE; } else { pendingRequest.expectedStatus = OK_RESPONSE; } xhr.responseType = "arraybuffer"; assert$1(args.onError, "Expected `onError` callback to be provided."); xhr.onerror = () => { args.onError(xhr.status); }; xhr.onreadystatechange = this.onStateChange.bind(this, xhrId); xhr.onprogress = this.onProgress.bind(this, xhrId); pendingRequest.onHeadersReceived = args.onHeadersReceived; pendingRequest.onDone = args.onDone; pendingRequest.onError = args.onError; pendingRequest.onProgress = args.onProgress; xhr.send(null); return xhrId; } onProgress(xhrId, evt) { const pendingRequest = this.pendingRequests[xhrId]; if (!pendingRequest) { return; } pendingRequest.onProgress?.(evt); } onStateChange(xhrId, evt) { const pendingRequest = this.pendingRequests[xhrId]; if (!pendingRequest) { return; } const xhr = pendingRequest.xhr; if (xhr.readyState >= 2 && pendingRequest.onHeadersReceived) { pendingRequest.onHeadersReceived(); delete pendingRequest.onHeadersReceived; } if (xhr.readyState !== 4) { return; } if (!(xhrId in this.pendingRequests)) { return; } delete this.pendingRequests[xhrId]; if (xhr.status === 0 && this.isHttp) { pendingRequest.onError(xhr.status); return; } const xhrStatus = xhr.status || OK_RESPONSE; const ok_response_on_range_request = xhrStatus === OK_RESPONSE && pendingRequest.expectedStatus === PARTIAL_CONTENT_RESPONSE; if (!ok_response_on_range_request && xhrStatus !== pendingRequest.expectedStatus) { pendingRequest.onError(xhr.status); return; } const chunk = network_getArrayBuffer(xhr); if (xhrStatus === PARTIAL_CONTENT_RESPONSE) { const rangeHeader = xhr.getResponseHeader("Content-Range"); const matches = /bytes (\d+)-(\d+)\/(\d+)/.exec(rangeHeader); if (matches) { pendingRequest.onDone({ begin: parseInt(matches[1], 10), chunk }); } else { warn$2(`Missing or invalid "Content-Range" header.`); pendingRequest.onError(0); } } else if (chunk) { pendingRequest.onDone({ begin: 0, chunk }); } else { pendingRequest.onError(xhr.status); } } getRequestXhr(xhrId) { return this.pendingRequests[xhrId].xhr; } isPendingRequest(xhrId) { return xhrId in this.pendingRequests; } abortRequest(xhrId) { const xhr = this.pendingRequests[xhrId].xhr; delete this.pendingRequests[xhrId]; xhr.abort(); } }; PDFNetworkStream = class { constructor(source$4) { this._source = source$4; this._manager = new NetworkManager(source$4); this._rangeChunkSize = source$4.rangeChunkSize; this._fullRequestReader = null; this._rangeRequestReaders = []; } _onRangeRequestReaderClosed(reader) { const i$7 = this._rangeRequestReaders.indexOf(reader); if (i$7 >= 0) { this._rangeRequestReaders.splice(i$7, 1); } } getFullReader() { assert$1(!this._fullRequestReader, "PDFNetworkStream.getFullReader can only be called once."); this._fullRequestReader = new PDFNetworkStreamFullRequestReader(this._manager, this._source); return this._fullRequestReader; } getRangeReader(begin, end) { const reader = new PDFNetworkStreamRangeRequestReader(this._manager, begin, end); reader.onClosed = this._onRangeRequestReaderClosed.bind(this); this._rangeRequestReaders.push(reader); return reader; } cancelAllRequests(reason) { this._fullRequestReader?.cancel(reason); for (const reader of this._rangeRequestReaders.slice(0)) { reader.cancel(reason); } } }; PDFNetworkStreamFullRequestReader = class { constructor(manager, source$4) { this._manager = manager; this._url = source$4.url; this._fullRequestId = manager.request({ onHeadersReceived: this._onHeadersReceived.bind(this), onDone: this._onDone.bind(this), onError: this._onError.bind(this), onProgress: this._onProgress.bind(this) }); this._headersCapability = Promise.withResolvers(); this._disableRange = source$4.disableRange || false; this._contentLength = source$4.length; this._rangeChunkSize = source$4.rangeChunkSize; if (!this._rangeChunkSize && !this._disableRange) { this._disableRange = true; } this._isStreamingSupported = false; this._isRangeSupported = false; this._cachedChunks = []; this._requests = []; this._done = false; this._storedError = undefined; this._filename = null; this.onProgress = null; } _onHeadersReceived() { const fullRequestXhrId = this._fullRequestId; const fullRequestXhr = this._manager.getRequestXhr(fullRequestXhrId); this._manager._responseOrigin = getResponseOrigin(fullRequestXhr.responseURL); const rawResponseHeaders = fullRequestXhr.getAllResponseHeaders(); const responseHeaders = new Headers(rawResponseHeaders ? rawResponseHeaders.trimStart().replace(/[^\S ]+$/, "").split(/[\r\n]+/).map((x$2) => { const [key, ...val$1] = x$2.split(": "); return [key, val$1.join(": ")]; }) : []); const { allowRangeRequests, suggestedLength } = validateRangeRequestCapabilities({ responseHeaders, isHttp: this._manager.isHttp, rangeChunkSize: this._rangeChunkSize, disableRange: this._disableRange }); if (allowRangeRequests) { this._isRangeSupported = true; } this._contentLength = suggestedLength || this._contentLength; this._filename = extractFilenameFromHeader(responseHeaders); if (this._isRangeSupported) { this._manager.abortRequest(fullRequestXhrId); } this._headersCapability.resolve(); } _onDone(data) { if (data) { if (this._requests.length > 0) { const requestCapability = this._requests.shift(); requestCapability.resolve({ value: data.chunk, done: false }); } else { this._cachedChunks.push(data.chunk); } } this._done = true; if (this._cachedChunks.length > 0) { return; } for (const requestCapability of this._requests) { requestCapability.resolve({ value: undefined, done: true }); } this._requests.length = 0; } _onError(status) { this._storedError = createResponseError(status, this._url); this._headersCapability.reject(this._storedError); for (const requestCapability of this._requests) { requestCapability.reject(this._storedError); } this._requests.length = 0; this._cachedChunks.length = 0; } _onProgress(evt) { this.onProgress?.({ loaded: evt.loaded, total: evt.lengthComputable ? evt.total : this._contentLength }); } get filename() { return this._filename; } get isRangeSupported() { return this._isRangeSupported; } get isStreamingSupported() { return this._isStreamingSupported; } get contentLength() { return this._contentLength; } get headersReady() { return this._headersCapability.promise; } async read() { await this._headersCapability.promise; if (this._storedError) { throw this._storedError; } if (this._cachedChunks.length > 0) { const chunk = this._cachedChunks.shift(); return { value: chunk, done: false }; } if (this._done) { return { value: undefined, done: true }; } const requestCapability = Promise.withResolvers(); this._requests.push(requestCapability); return requestCapability.promise; } cancel(reason) { this._done = true; this._headersCapability.reject(reason); for (const requestCapability of this._requests) { requestCapability.resolve({ value: undefined, done: true }); } this._requests.length = 0; if (this._manager.isPendingRequest(this._fullRequestId)) { this._manager.abortRequest(this._fullRequestId); } this._fullRequestReader = null; } }; PDFNetworkStreamRangeRequestReader = class { constructor(manager, begin, end) { this._manager = manager; this._url = manager.url; this._requestId = manager.request({ begin, end, onHeadersReceived: this._onHeadersReceived.bind(this), onDone: this._onDone.bind(this), onError: this._onError.bind(this), onProgress: this._onProgress.bind(this) }); this._requests = []; this._queuedChunk = null; this._done = false; this._storedError = undefined; this.onProgress = null; this.onClosed = null; } _onHeadersReceived() { const responseOrigin = getResponseOrigin(this._manager.getRequestXhr(this._requestId)?.responseURL); if (responseOrigin !== this._manager._responseOrigin) { this._storedError = new Error(`Expected range response-origin "${responseOrigin}" to match "${this._manager._responseOrigin}".`); this._onError(0); } } _close() { this.onClosed?.(this); } _onDone(data) { const chunk = data.chunk; if (this._requests.length > 0) { const requestCapability = this._requests.shift(); requestCapability.resolve({ value: chunk, done: false }); } else { this._queuedChunk = chunk; } this._done = true; for (const requestCapability of this._requests) { requestCapability.resolve({ value: undefined, done: true }); } this._requests.length = 0; this._close(); } _onError(status) { this._storedError ??= createResponseError(status, this._url); for (const requestCapability of this._requests) { requestCapability.reject(this._storedError); } this._requests.length = 0; this._queuedChunk = null; } _onProgress(evt) { if (!this.isStreamingSupported) { this.onProgress?.({ loaded: evt.loaded }); } } get isStreamingSupported() { return false; } async read() { if (this._storedError) { throw this._storedError; } if (this._queuedChunk !== null) { const chunk = this._queuedChunk; this._queuedChunk = null; return { value: chunk, done: false }; } if (this._done) { return { value: undefined, done: true }; } const requestCapability = Promise.withResolvers(); this._requests.push(requestCapability); return requestCapability.promise; } cancel(reason) { this._done = true; for (const requestCapability of this._requests) { requestCapability.resolve({ value: undefined, done: true }); } this._requests.length = 0; if (this._manager.isPendingRequest(this._requestId)) { this._manager.abortRequest(this._requestId); } this._close(); } }; ; urlRegex = /^[a-z][a-z0-9\-+.]+:/i; PDFNodeStream = class { constructor(source$4) { this.source = source$4; this.url = parseUrlOrPath(source$4.url); assert$1(this.url.protocol === "file:", "PDFNodeStream only supports file:// URLs."); this._fullRequestReader = null; this._rangeRequestReaders = []; } get _progressiveDataLength() { return this._fullRequestReader?._loaded ?? 0; } getFullReader() { assert$1(!this._fullRequestReader, "PDFNodeStream.getFullReader can only be called once."); this._fullRequestReader = new PDFNodeStreamFsFullReader(this); return this._fullRequestReader; } getRangeReader(start, end) { if (end <= this._progressiveDataLength) { return null; } const rangeReader = new PDFNodeStreamFsRangeReader(this, start, end); this._rangeRequestReaders.push(rangeReader); return rangeReader; } cancelAllRequests(reason) { this._fullRequestReader?.cancel(reason); for (const reader of this._rangeRequestReaders.slice(0)) { reader.cancel(reason); } } }; PDFNodeStreamFsFullReader = class { constructor(stream) { this._url = stream.url; this._done = false; this._storedError = null; this.onProgress = null; const source$4 = stream.source; this._contentLength = source$4.length; this._loaded = 0; this._filename = null; this._disableRange = source$4.disableRange || false; this._rangeChunkSize = source$4.rangeChunkSize; if (!this._rangeChunkSize && !this._disableRange) { this._disableRange = true; } this._isStreamingSupported = !source$4.disableStream; this._isRangeSupported = !source$4.disableRange; this._readableStream = null; this._readCapability = Promise.withResolvers(); this._headersCapability = Promise.withResolvers(); const fs = process.getBuiltinModule("fs"); fs.promises.lstat(this._url).then((stat) => { this._contentLength = stat.size; this._setReadableStream(fs.createReadStream(this._url)); this._headersCapability.resolve(); }, (error$2) => { if (error$2.code === "ENOENT") { error$2 = createResponseError(0, this._url.href); } this._storedError = error$2; this._headersCapability.reject(error$2); }); } get headersReady() { return this._headersCapability.promise; } get filename() { return this._filename; } get contentLength() { return this._contentLength; } get isRangeSupported() { return this._isRangeSupported; } get isStreamingSupported() { return this._isStreamingSupported; } async read() { await this._readCapability.promise; if (this._done) { return { value: undefined, done: true }; } if (this._storedError) { throw this._storedError; } const chunk = this._readableStream.read(); if (chunk === null) { this._readCapability = Promise.withResolvers(); return this.read(); } this._loaded += chunk.length; this.onProgress?.({ loaded: this._loaded, total: this._contentLength }); const buffer = new Uint8Array(chunk).buffer; return { value: buffer, done: false }; } cancel(reason) { if (!this._readableStream) { this._error(reason); return; } this._readableStream.destroy(reason); } _error(reason) { this._storedError = reason; this._readCapability.resolve(); } _setReadableStream(readableStream) { this._readableStream = readableStream; readableStream.on("readable", () => { this._readCapability.resolve(); }); readableStream.on("end", () => { readableStream.destroy(); this._done = true; this._readCapability.resolve(); }); readableStream.on("error", (reason) => { this._error(reason); }); if (!this._isStreamingSupported && this._isRangeSupported) { this._error(new AbortException("streaming is disabled")); } if (this._storedError) { this._readableStream.destroy(this._storedError); } } }; PDFNodeStreamFsRangeReader = class { constructor(stream, start, end) { this._url = stream.url; this._done = false; this._storedError = null; this.onProgress = null; this._loaded = 0; this._readableStream = null; this._readCapability = Promise.withResolvers(); const source$4 = stream.source; this._isStreamingSupported = !source$4.disableStream; const fs = process.getBuiltinModule("fs"); this._setReadableStream(fs.createReadStream(this._url, { start, end: end - 1 })); } get isStreamingSupported() { return this._isStreamingSupported; } async read() { await this._readCapability.promise; if (this._done) { return { value: undefined, done: true }; } if (this._storedError) { throw this._storedError; } const chunk = this._readableStream.read(); if (chunk === null) { this._readCapability = Promise.withResolvers(); return this.read(); } this._loaded += chunk.length; this.onProgress?.({ loaded: this._loaded }); const buffer = new Uint8Array(chunk).buffer; return { value: buffer, done: false }; } cancel(reason) { if (!this._readableStream) { this._error(reason); return; } this._readableStream.destroy(reason); } _error(reason) { this._storedError = reason; this._readCapability.resolve(); } _setReadableStream(readableStream) { this._readableStream = readableStream; readableStream.on("readable", () => { this._readCapability.resolve(); }); readableStream.on("end", () => { readableStream.destroy(); this._done = true; this._readCapability.resolve(); }); readableStream.on("error", (reason) => { this._error(reason); }); if (this._storedError) { this._readableStream.destroy(this._storedError); } } }; ; INITIAL_DATA = Symbol("INITIAL_DATA"); PDFObjects = class { #objs = Object.create(null); #ensureObj(objId) { return this.#objs[objId] ||= { ...Promise.withResolvers(), data: INITIAL_DATA }; } get(objId, callback = null) { if (callback) { const obj$1 = this.#ensureObj(objId); obj$1.promise.then(() => callback(obj$1.data)); return null; } const obj = this.#objs[objId]; if (!obj || obj.data === INITIAL_DATA) { throw new Error(`Requesting object that isn't resolved yet ${objId}.`); } return obj.data; } has(objId) { const obj = this.#objs[objId]; return !!obj && obj.data !== INITIAL_DATA; } delete(objId) { const obj = this.#objs[objId]; if (!obj || obj.data === INITIAL_DATA) { return false; } delete this.#objs[objId]; return true; } resolve(objId, data = null) { const obj = this.#ensureObj(objId); obj.data = data; obj.resolve(); } clear() { for (const objId in this.#objs) { const { data } = this.#objs[objId]; data?.bitmap?.close(); } this.#objs = Object.create(null); } *[Symbol.iterator]() { for (const objId in this.#objs) { const { data } = this.#objs[objId]; if (data === INITIAL_DATA) { continue; } yield [objId, data]; } } }; ; MAX_TEXT_DIVS_TO_RENDER = 1e5; DEFAULT_FONT_SIZE = 30; TextLayer = class TextLayer { #capability = Promise.withResolvers(); #container = null; #disableProcessItems = false; #fontInspectorEnabled = !!globalThis.FontInspector?.enabled; #lang = null; #layoutTextParams = null; #pageHeight = 0; #pageWidth = 0; #reader = null; #rootContainer = null; #rotation = 0; #scale = 0; #styleCache = Object.create(null); #textContentItemsStr = []; #textContentSource = null; #textDivs = []; #textDivProperties = new WeakMap(); #transform = null; static #ascentCache = new Map(); static #canvasContexts = new Map(); static #canvasCtxFonts = new WeakMap(); static #minFontSize = null; static #pendingTextLayers = new Set(); constructor({ textContentSource, container, viewport }) { if (textContentSource instanceof ReadableStream) { this.#textContentSource = textContentSource; } else if (typeof textContentSource === "object") { this.#textContentSource = new ReadableStream({ start(controller) { controller.enqueue(textContentSource); controller.close(); } }); } else { throw new Error("No \"textContentSource\" parameter specified."); } this.#container = this.#rootContainer = container; this.#scale = viewport.scale * OutputScale.pixelRatio; this.#rotation = viewport.rotation; this.#layoutTextParams = { div: null, properties: null, ctx: null }; const { pageWidth, pageHeight, pageX, pageY } = viewport.rawDims; this.#transform = [ 1, 0, 0, -1, -pageX, pageY + pageHeight ]; this.#pageWidth = pageWidth; this.#pageHeight = pageHeight; TextLayer.#ensureMinFontSizeComputed(); setLayerDimensions(container, viewport); this.#capability.promise.finally(() => { TextLayer.#pendingTextLayers.delete(this); this.#layoutTextParams = null; this.#styleCache = null; }).catch(() => {}); } static get fontFamilyMap() { const { isWindows, isFirefox } = util_FeatureTest.platform; return shadow(this, "fontFamilyMap", new Map([["sans-serif", `${isWindows && isFirefox ? "Calibri, " : ""}sans-serif`], ["monospace", `${isWindows && isFirefox ? "Lucida Console, " : ""}monospace`]])); } render() { const pump = () => { this.#reader.read().then(({ value, done }) => { if (done) { this.#capability.resolve(); return; } this.#lang ??= value.lang; Object.assign(this.#styleCache, value.styles); this.#processItems(value.items); pump(); }, this.#capability.reject); }; this.#reader = this.#textContentSource.getReader(); TextLayer.#pendingTextLayers.add(this); pump(); return this.#capability.promise; } update({ viewport, onBefore = null }) { const scale = viewport.scale * OutputScale.pixelRatio; const rotation = viewport.rotation; if (rotation !== this.#rotation) { onBefore?.(); this.#rotation = rotation; setLayerDimensions(this.#rootContainer, { rotation }); } if (scale !== this.#scale) { onBefore?.(); this.#scale = scale; const params = { div: null, properties: null, ctx: TextLayer.#getCtx(this.#lang) }; for (const div of this.#textDivs) { params.properties = this.#textDivProperties.get(div); params.div = div; this.#layout(params); } } } cancel() { const abortEx = new AbortException("TextLayer task cancelled."); this.#reader?.cancel(abortEx).catch(() => {}); this.#reader = null; this.#capability.reject(abortEx); } get textDivs() { return this.#textDivs; } get textContentItemsStr() { return this.#textContentItemsStr; } #processItems(items) { if (this.#disableProcessItems) { return; } this.#layoutTextParams.ctx ??= TextLayer.#getCtx(this.#lang); const textDivs = this.#textDivs, textContentItemsStr = this.#textContentItemsStr; for (const item of items) { if (textDivs.length > MAX_TEXT_DIVS_TO_RENDER) { warn$2("Ignoring additional textDivs for performance reasons."); this.#disableProcessItems = true; return; } if (item.str === undefined) { if (item.type === "beginMarkedContentProps" || item.type === "beginMarkedContent") { const parent = this.#container; this.#container = document.createElement("span"); this.#container.classList.add("markedContent"); if (item.id) { this.#container.setAttribute("id", `${item.id}`); } parent.append(this.#container); } else if (item.type === "endMarkedContent") { this.#container = this.#container.parentNode; } continue; } textContentItemsStr.push(item.str); this.#appendText(item); } } #appendText(geom) { const textDiv = document.createElement("span"); const textDivProperties = { angle: 0, canvasWidth: 0, hasText: geom.str !== "", hasEOL: geom.hasEOL, fontSize: 0 }; this.#textDivs.push(textDiv); const tx = Util.transform(this.#transform, geom.transform); let angle = Math.atan2(tx[1], tx[0]); const style = this.#styleCache[geom.fontName]; if (style.vertical) { angle += Math.PI / 2; } let fontFamily = this.#fontInspectorEnabled && style.fontSubstitution || style.fontFamily; fontFamily = TextLayer.fontFamilyMap.get(fontFamily) || fontFamily; const fontHeight = Math.hypot(tx[2], tx[3]); const fontAscent = fontHeight * TextLayer.#getAscent(fontFamily, style, this.#lang); let left, top; if (angle === 0) { left = tx[4]; top = tx[5] - fontAscent; } else { left = tx[4] + fontAscent * Math.sin(angle); top = tx[5] - fontAscent * Math.cos(angle); } const scaleFactorStr = "calc(var(--total-scale-factor) *"; const divStyle = textDiv.style; if (this.#container === this.#rootContainer) { divStyle.left = `${(100 * left / this.#pageWidth).toFixed(2)}%`; divStyle.top = `${(100 * top / this.#pageHeight).toFixed(2)}%`; } else { divStyle.left = `${scaleFactorStr}${left.toFixed(2)}px)`; divStyle.top = `${scaleFactorStr}${top.toFixed(2)}px)`; } divStyle.fontSize = `${scaleFactorStr}${(TextLayer.#minFontSize * fontHeight).toFixed(2)}px)`; divStyle.fontFamily = fontFamily; textDivProperties.fontSize = fontHeight; textDiv.setAttribute("role", "presentation"); textDiv.textContent = geom.str; textDiv.dir = geom.dir; if (this.#fontInspectorEnabled) { textDiv.dataset.fontName = style.fontSubstitutionLoadedName || geom.fontName; } if (angle !== 0) { textDivProperties.angle = angle * (180 / Math.PI); } let shouldScaleText = false; if (geom.str.length > 1) { shouldScaleText = true; } else if (geom.str !== " " && geom.transform[0] !== geom.transform[3]) { const absScaleX = Math.abs(geom.transform[0]), absScaleY = Math.abs(geom.transform[3]); if (absScaleX !== absScaleY && Math.max(absScaleX, absScaleY) / Math.min(absScaleX, absScaleY) > 1.5) { shouldScaleText = true; } } if (shouldScaleText) { textDivProperties.canvasWidth = style.vertical ? geom.height : geom.width; } this.#textDivProperties.set(textDiv, textDivProperties); this.#layoutTextParams.div = textDiv; this.#layoutTextParams.properties = textDivProperties; this.#layout(this.#layoutTextParams); if (textDivProperties.hasText) { this.#container.append(textDiv); } if (textDivProperties.hasEOL) { const br = document.createElement("br"); br.setAttribute("role", "presentation"); this.#container.append(br); } } #layout(params) { const { div, properties: properties$1, ctx } = params; const { style } = div; let transform = ""; if (TextLayer.#minFontSize > 1) { transform = `scale(${1 / TextLayer.#minFontSize})`; } if (properties$1.canvasWidth !== 0 && properties$1.hasText) { const { fontFamily } = style; const { canvasWidth, fontSize } = properties$1; TextLayer.#ensureCtxFont(ctx, fontSize * this.#scale, fontFamily); const { width } = ctx.measureText(div.textContent); if (width > 0) { transform = `scaleX(${canvasWidth * this.#scale / width}) ${transform}`; } } if (properties$1.angle !== 0) { transform = `rotate(${properties$1.angle}deg) ${transform}`; } if (transform.length > 0) { style.transform = transform; } } static cleanup() { if (this.#pendingTextLayers.size > 0) { return; } this.#ascentCache.clear(); for (const { canvas } of this.#canvasContexts.values()) { canvas.remove(); } this.#canvasContexts.clear(); } static #getCtx(lang = null) { let ctx = this.#canvasContexts.get(lang ||= ""); if (!ctx) { const canvas = document.createElement("canvas"); canvas.className = "hiddenCanvasElement"; canvas.lang = lang; document.body.append(canvas); ctx = canvas.getContext("2d", { alpha: false, willReadFrequently: true }); this.#canvasContexts.set(lang, ctx); this.#canvasCtxFonts.set(ctx, { size: 0, family: "" }); } return ctx; } static #ensureCtxFont(ctx, size, family) { const cached = this.#canvasCtxFonts.get(ctx); if (size === cached.size && family === cached.family) { return; } ctx.font = `${size}px ${family}`; cached.size = size; cached.family = family; } static #ensureMinFontSizeComputed() { if (this.#minFontSize !== null) { return; } const div = document.createElement("div"); div.style.opacity = 0; div.style.lineHeight = 1; div.style.fontSize = "1px"; div.style.position = "absolute"; div.textContent = "X"; document.body.append(div); this.#minFontSize = div.getBoundingClientRect().height; div.remove(); } static #getAscent(fontFamily, style, lang) { const cachedAscent = this.#ascentCache.get(fontFamily); if (cachedAscent) { return cachedAscent; } const ctx = this.#getCtx(lang); ctx.canvas.width = ctx.canvas.height = DEFAULT_FONT_SIZE; this.#ensureCtxFont(ctx, DEFAULT_FONT_SIZE, fontFamily); const metrics = ctx.measureText(""); const ascent = metrics.fontBoundingBoxAscent; const descent = Math.abs(metrics.fontBoundingBoxDescent); ctx.canvas.width = ctx.canvas.height = 0; let ratio = .8; if (ascent) { ratio = ascent / (ascent + descent); } else { if (util_FeatureTest.platform.isFirefox) { warn$2("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference " + "in `about:config` to improve TextLayer rendering."); } if (style.ascent) { ratio = style.ascent; } else if (style.descent) { ratio = 1 + style.descent; } } this.#ascentCache.set(fontFamily, ratio); return ratio; } }; ; RENDERING_CANCELLED_TIMEOUT = 100; PDFDocumentLoadingTask = class PDFDocumentLoadingTask { static #docId = 0; _capability = Promise.withResolvers(); _transport = null; _worker = null; docId = `d${PDFDocumentLoadingTask.#docId++}`; destroyed = false; onPassword = null; onProgress = null; get promise() { return this._capability.promise; } async destroy() { this.destroyed = true; try { if (this._worker?.port) { this._worker._pendingDestroy = true; } await this._transport?.destroy(); } catch (ex) { if (this._worker?.port) { delete this._worker._pendingDestroy; } throw ex; } this._transport = null; this._worker?.destroy(); this._worker = null; } async getData() { return this._transport.getData(); } }; PDFDataRangeTransport = class { #capability = Promise.withResolvers(); #progressiveDoneListeners = []; #progressiveReadListeners = []; #progressListeners = []; #rangeListeners = []; constructor(length, initialData, progressiveDone = false, contentDispositionFilename = null) { this.length = length; this.initialData = initialData; this.progressiveDone = progressiveDone; this.contentDispositionFilename = contentDispositionFilename; } addRangeListener(listener) { this.#rangeListeners.push(listener); } addProgressListener(listener) { this.#progressListeners.push(listener); } addProgressiveReadListener(listener) { this.#progressiveReadListeners.push(listener); } addProgressiveDoneListener(listener) { this.#progressiveDoneListeners.push(listener); } onDataRange(begin, chunk) { for (const listener of this.#rangeListeners) { listener(begin, chunk); } } onDataProgress(loaded, total) { this.#capability.promise.then(() => { for (const listener of this.#progressListeners) { listener(loaded, total); } }); } onDataProgressiveRead(chunk) { this.#capability.promise.then(() => { for (const listener of this.#progressiveReadListeners) { listener(chunk); } }); } onDataProgressiveDone() { this.#capability.promise.then(() => { for (const listener of this.#progressiveDoneListeners) { listener(); } }); } transportReady() { this.#capability.resolve(); } requestDataRange(begin, end) { unreachable("Abstract method PDFDataRangeTransport.requestDataRange"); } abort() {} }; PDFDocumentProxy = class { constructor(pdfInfo, transport) { this._pdfInfo = pdfInfo; this._transport = transport; } get annotationStorage() { return this._transport.annotationStorage; } get canvasFactory() { return this._transport.canvasFactory; } get filterFactory() { return this._transport.filterFactory; } get numPages() { return this._pdfInfo.numPages; } get fingerprints() { return this._pdfInfo.fingerprints; } get isPureXfa() { return shadow(this, "isPureXfa", !!this._transport._htmlForXfa); } get allXfaHtml() { return this._transport._htmlForXfa; } getPage(pageNumber) { return this._transport.getPage(pageNumber); } getPageIndex(ref) { return this._transport.getPageIndex(ref); } getDestinations() { return this._transport.getDestinations(); } getDestination(id) { return this._transport.getDestination(id); } getPageLabels() { return this._transport.getPageLabels(); } getPageLayout() { return this._transport.getPageLayout(); } getPageMode() { return this._transport.getPageMode(); } getViewerPreferences() { return this._transport.getViewerPreferences(); } getOpenAction() { return this._transport.getOpenAction(); } getAttachments() { return this._transport.getAttachments(); } getAnnotationsByType(types, pageIndexesToSkip) { return this._transport.getAnnotationsByType(types, pageIndexesToSkip); } getJSActions() { return this._transport.getDocJSActions(); } getOutline() { return this._transport.getOutline(); } getOptionalContentConfig({ intent = "display" } = {}) { const { renderingIntent } = this._transport.getRenderingIntent(intent); return this._transport.getOptionalContentConfig(renderingIntent); } getPermissions() { return this._transport.getPermissions(); } getMetadata() { return this._transport.getMetadata(); } getMarkInfo() { return this._transport.getMarkInfo(); } getData() { return this._transport.getData(); } saveDocument() { return this._transport.saveDocument(); } getDownloadInfo() { return this._transport.downloadInfoCapability.promise; } cleanup(keepLoadedFonts = false) { return this._transport.startCleanup(keepLoadedFonts || this.isPureXfa); } destroy() { return this.loadingTask.destroy(); } cachedPageNumber(ref) { return this._transport.cachedPageNumber(ref); } get loadingParams() { return this._transport.loadingParams; } get loadingTask() { return this._transport.loadingTask; } getFieldObjects() { return this._transport.getFieldObjects(); } hasJSActions() { return this._transport.hasJSActions(); } getCalculationOrderIds() { return this._transport.getCalculationOrderIds(); } }; PDFPageProxy = class { #pendingCleanup = false; constructor(pageIndex, pageInfo, transport, pdfBug = false) { this._pageIndex = pageIndex; this._pageInfo = pageInfo; this._transport = transport; this._stats = pdfBug ? new StatTimer() : null; this._pdfBug = pdfBug; this.commonObjs = transport.commonObjs; this.objs = new PDFObjects(); this._intentStates = new Map(); this.destroyed = false; this.recordedBBoxes = null; } get pageNumber() { return this._pageIndex + 1; } get rotate() { return this._pageInfo.rotate; } get ref() { return this._pageInfo.ref; } get userUnit() { return this._pageInfo.userUnit; } get view() { return this._pageInfo.view; } getViewport({ scale, rotation = this.rotate, offsetX = 0, offsetY = 0, dontFlip = false } = {}) { return new PageViewport({ viewBox: this.view, userUnit: this.userUnit, scale, rotation, offsetX, offsetY, dontFlip }); } getAnnotations({ intent = "display" } = {}) { const { renderingIntent } = this._transport.getRenderingIntent(intent); return this._transport.getAnnotations(this._pageIndex, renderingIntent); } getJSActions() { return this._transport.getPageJSActions(this._pageIndex); } get filterFactory() { return this._transport.filterFactory; } get isPureXfa() { return shadow(this, "isPureXfa", !!this._transport._htmlForXfa); } async getXfa() { return this._transport._htmlForXfa?.children[this._pageIndex] || null; } render({ canvasContext, canvas = canvasContext.canvas, viewport, intent = "display", annotationMode = AnnotationMode.ENABLE, transform = null, background = null, optionalContentConfigPromise = null, annotationCanvasMap = null, pageColors = null, printAnnotationStorage = null, isEditing = false, recordOperations = false, operationsFilter = null }) { this._stats?.time("Overall"); const intentArgs = this._transport.getRenderingIntent(intent, annotationMode, printAnnotationStorage, isEditing); const { renderingIntent, cacheKey } = intentArgs; this.#pendingCleanup = false; optionalContentConfigPromise ||= this._transport.getOptionalContentConfig(renderingIntent); let intentState = this._intentStates.get(cacheKey); if (!intentState) { intentState = Object.create(null); this._intentStates.set(cacheKey, intentState); } if (intentState.streamReaderCancelTimeout) { clearTimeout(intentState.streamReaderCancelTimeout); intentState.streamReaderCancelTimeout = null; } const intentPrint = !!(renderingIntent & RenderingIntentFlag.PRINT); if (!intentState.displayReadyCapability) { intentState.displayReadyCapability = Promise.withResolvers(); intentState.operatorList = { fnArray: [], argsArray: [], lastChunk: false, separateAnnots: null }; this._stats?.time("Page Request"); this._pumpOperatorList(intentArgs); } const recordForDebugger = Boolean(this._pdfBug && globalThis.StepperManager?.enabled); const shouldRecordOperations = !this.recordedBBoxes && (recordOperations || recordForDebugger); const complete$1 = (error$2) => { intentState.renderTasks.delete(internalRenderTask); if (shouldRecordOperations) { const recordedBBoxes = internalRenderTask.gfx?.dependencyTracker.take(); if (recordedBBoxes) { if (internalRenderTask.stepper) { internalRenderTask.stepper.setOperatorBBoxes(recordedBBoxes, internalRenderTask.gfx.dependencyTracker.takeDebugMetadata()); } if (recordOperations) { this.recordedBBoxes = recordedBBoxes; } } } if (intentPrint) { this.#pendingCleanup = true; } this.#tryCleanup(); if (error$2) { internalRenderTask.capability.reject(error$2); this._abortOperatorList({ intentState, reason: error$2 instanceof Error ? error$2 : new Error(error$2) }); } else { internalRenderTask.capability.resolve(); } if (this._stats) { this._stats.timeEnd("Rendering"); this._stats.timeEnd("Overall"); if (globalThis.Stats?.enabled) { globalThis.Stats.add(this.pageNumber, this._stats); } } }; const internalRenderTask = new InternalRenderTask({ callback: complete$1, params: { canvas, canvasContext, dependencyTracker: shouldRecordOperations ? new CanvasDependencyTracker(canvas, intentState.operatorList.length, recordForDebugger) : null, viewport, transform, background }, objs: this.objs, commonObjs: this.commonObjs, annotationCanvasMap, operatorList: intentState.operatorList, pageIndex: this._pageIndex, canvasFactory: this._transport.canvasFactory, filterFactory: this._transport.filterFactory, useRequestAnimationFrame: !intentPrint, pdfBug: this._pdfBug, pageColors, enableHWA: this._transport.enableHWA, operationsFilter }); (intentState.renderTasks ||= new Set()).add(internalRenderTask); const renderTask = internalRenderTask.task; Promise.all([intentState.displayReadyCapability.promise, optionalContentConfigPromise]).then(([transparency, optionalContentConfig]) => { if (this.destroyed) { complete$1(); return; } this._stats?.time("Rendering"); if (!(optionalContentConfig.renderingIntent & renderingIntent)) { throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` " + "and `PDFDocumentProxy.getOptionalContentConfig` methods."); } internalRenderTask.initializeGraphics({ transparency, optionalContentConfig }); internalRenderTask.operatorListChanged(); }).catch(complete$1); return renderTask; } getOperatorList({ intent = "display", annotationMode = AnnotationMode.ENABLE, printAnnotationStorage = null, isEditing = false } = {}) { function operatorListChanged() { if (intentState.operatorList.lastChunk) { intentState.opListReadCapability.resolve(intentState.operatorList); intentState.renderTasks.delete(opListTask); } } const intentArgs = this._transport.getRenderingIntent(intent, annotationMode, printAnnotationStorage, isEditing, true); let intentState = this._intentStates.get(intentArgs.cacheKey); if (!intentState) { intentState = Object.create(null); this._intentStates.set(intentArgs.cacheKey, intentState); } let opListTask; if (!intentState.opListReadCapability) { opListTask = Object.create(null); opListTask.operatorListChanged = operatorListChanged; intentState.opListReadCapability = Promise.withResolvers(); (intentState.renderTasks ||= new Set()).add(opListTask); intentState.operatorList = { fnArray: [], argsArray: [], lastChunk: false, separateAnnots: null }; this._stats?.time("Page Request"); this._pumpOperatorList(intentArgs); } return intentState.opListReadCapability.promise; } streamTextContent({ includeMarkedContent = false, disableNormalization = false } = {}) { const TEXT_CONTENT_CHUNK_SIZE = 100; return this._transport.messageHandler.sendWithStream("GetTextContent", { pageIndex: this._pageIndex, includeMarkedContent: includeMarkedContent === true, disableNormalization: disableNormalization === true }, { highWaterMark: TEXT_CONTENT_CHUNK_SIZE, size(textContent) { return textContent.items.length; } }); } getTextContent(params = {}) { if (this._transport._htmlForXfa) { return this.getXfa().then((xfa) => XfaText.textContent(xfa)); } const readableStream = this.streamTextContent(params); return new Promise(function(resolve, reject) { function pump() { reader.read().then(function({ value, done }) { if (done) { resolve(textContent); return; } textContent.lang ??= value.lang; Object.assign(textContent.styles, value.styles); textContent.items.push(...value.items); pump(); }, reject); } const reader = readableStream.getReader(); const textContent = { items: [], styles: Object.create(null), lang: null }; pump(); }); } getStructTree() { return this._transport.getStructTree(this._pageIndex); } _destroy() { this.destroyed = true; const waitOn = []; for (const intentState of this._intentStates.values()) { this._abortOperatorList({ intentState, reason: new Error("Page was destroyed."), force: true }); if (intentState.opListReadCapability) { continue; } for (const internalRenderTask of intentState.renderTasks) { waitOn.push(internalRenderTask.completed); internalRenderTask.cancel(); } } this.objs.clear(); this.#pendingCleanup = false; return Promise.all(waitOn); } cleanup(resetStats = false) { this.#pendingCleanup = true; const success = this.#tryCleanup(); if (resetStats && success) { this._stats &&= new StatTimer(); } return success; } #tryCleanup() { if (!this.#pendingCleanup || this.destroyed) { return false; } for (const { renderTasks, operatorList } of this._intentStates.values()) { if (renderTasks.size > 0 || !operatorList.lastChunk) { return false; } } this._intentStates.clear(); this.objs.clear(); this.#pendingCleanup = false; return true; } _startRenderPage(transparency, cacheKey) { const intentState = this._intentStates.get(cacheKey); if (!intentState) { return; } this._stats?.timeEnd("Page Request"); intentState.displayReadyCapability?.resolve(transparency); } _renderPageChunk(operatorListChunk, intentState) { for (let i$7 = 0, ii = operatorListChunk.length; i$7 < ii; i$7++) { intentState.operatorList.fnArray.push(operatorListChunk.fnArray[i$7]); intentState.operatorList.argsArray.push(operatorListChunk.argsArray[i$7]); } intentState.operatorList.lastChunk = operatorListChunk.lastChunk; intentState.operatorList.separateAnnots = operatorListChunk.separateAnnots; for (const internalRenderTask of intentState.renderTasks) { internalRenderTask.operatorListChanged(); } if (operatorListChunk.lastChunk) { this.#tryCleanup(); } } _pumpOperatorList({ renderingIntent, cacheKey, annotationStorageSerializable, modifiedIds }) { const { map: map$2, transfer } = annotationStorageSerializable; const readableStream = this._transport.messageHandler.sendWithStream("GetOperatorList", { pageIndex: this._pageIndex, intent: renderingIntent, cacheKey, annotationStorage: map$2, modifiedIds }, transfer); const reader = readableStream.getReader(); const intentState = this._intentStates.get(cacheKey); intentState.streamReader = reader; const pump = () => { reader.read().then(({ value, done }) => { if (done) { intentState.streamReader = null; return; } if (this._transport.destroyed) { return; } this._renderPageChunk(value, intentState); pump(); }, (reason) => { intentState.streamReader = null; if (this._transport.destroyed) { return; } if (intentState.operatorList) { intentState.operatorList.lastChunk = true; for (const internalRenderTask of intentState.renderTasks) { internalRenderTask.operatorListChanged(); } this.#tryCleanup(); } if (intentState.displayReadyCapability) { intentState.displayReadyCapability.reject(reason); } else if (intentState.opListReadCapability) { intentState.opListReadCapability.reject(reason); } else { throw reason; } }); }; pump(); } _abortOperatorList({ intentState, reason, force = false }) { if (!intentState.streamReader) { return; } if (intentState.streamReaderCancelTimeout) { clearTimeout(intentState.streamReaderCancelTimeout); intentState.streamReaderCancelTimeout = null; } if (!force) { if (intentState.renderTasks.size > 0) { return; } if (reason instanceof RenderingCancelledException) { let delay = RENDERING_CANCELLED_TIMEOUT; if (reason.extraDelay > 0 && reason.extraDelay < 1e3) { delay += reason.extraDelay; } intentState.streamReaderCancelTimeout = setTimeout(() => { intentState.streamReaderCancelTimeout = null; this._abortOperatorList({ intentState, reason, force: true }); }, delay); return; } } intentState.streamReader.cancel(new AbortException(reason.message)).catch(() => {}); intentState.streamReader = null; if (this._transport.destroyed) { return; } for (const [curCacheKey, curIntentState] of this._intentStates) { if (curIntentState === intentState) { this._intentStates.delete(curCacheKey); break; } } this.cleanup(); } get stats() { return this._stats; } }; PDFWorker = class PDFWorker { #capability = Promise.withResolvers(); #messageHandler = null; #port = null; #webWorker = null; static #fakeWorkerId = 0; static #isWorkerDisabled = false; static #workerPorts = new WeakMap(); static { if (isNodeJS) { this.#isWorkerDisabled = true; GlobalWorkerOptions.workerSrc ||= "./pdf.worker.mjs"; } this._isSameOrigin = (baseUrl, otherUrl) => { const base = URL.parse(baseUrl); if (!base?.origin || base.origin === "null") { return false; } const other = new URL(otherUrl, base); return base.origin === other.origin; }; this._createCDNWrapper = (url) => { const wrapper = `await import("${url}");`; return URL.createObjectURL(new Blob([wrapper], { type: "text/javascript" })); }; this.fromPort = (params) => { deprecated$2("`PDFWorker.fromPort` - please use `PDFWorker.create` instead."); if (!params?.port) { throw new Error("PDFWorker.fromPort - invalid method signature."); } return this.create(params); }; } constructor({ name = null, port = null, verbosity: verbosity$1 = getVerbosityLevel() } = {}) { this.name = name; this.destroyed = false; this.verbosity = verbosity$1; if (port) { if (PDFWorker.#workerPorts.has(port)) { throw new Error("Cannot use more than one PDFWorker per port."); } PDFWorker.#workerPorts.set(port, this); this.#initializeFromPort(port); } else { this.#initialize(); } } get promise() { return this.#capability.promise; } #resolve() { this.#capability.resolve(); this.#messageHandler.send("configure", { verbosity: this.verbosity }); } get port() { return this.#port; } get messageHandler() { return this.#messageHandler; } #initializeFromPort(port) { this.#port = port; this.#messageHandler = new MessageHandler("main", "worker", port); this.#messageHandler.on("ready", () => {}); this.#resolve(); } #initialize() { if (PDFWorker.#isWorkerDisabled || PDFWorker.#mainThreadWorkerMessageHandler) { this.#setupFakeWorker(); return; } let { workerSrc } = PDFWorker; try { if (!PDFWorker._isSameOrigin(window.location, workerSrc)) { workerSrc = PDFWorker._createCDNWrapper(new URL(workerSrc, window.location).href); } const worker = new Worker(workerSrc, { type: "module" }); const messageHandler = new MessageHandler("main", "worker", worker); const terminateEarly = () => { ac.abort(); messageHandler.destroy(); worker.terminate(); if (this.destroyed) { this.#capability.reject(new Error("Worker was destroyed")); } else { this.#setupFakeWorker(); } }; const ac = new AbortController(); worker.addEventListener("error", () => { if (!this.#webWorker) { terminateEarly(); } }, { signal: ac.signal }); messageHandler.on("test", (data) => { ac.abort(); if (this.destroyed || !data) { terminateEarly(); return; } this.#messageHandler = messageHandler; this.#port = worker; this.#webWorker = worker; this.#resolve(); }); messageHandler.on("ready", (data) => { ac.abort(); if (this.destroyed) { terminateEarly(); return; } try { sendTest(); } catch { this.#setupFakeWorker(); } }); const sendTest = () => { const testObj = new Uint8Array(); messageHandler.send("test", testObj, [testObj.buffer]); }; sendTest(); return; } catch { info("The worker has been disabled."); } this.#setupFakeWorker(); } #setupFakeWorker() { if (!PDFWorker.#isWorkerDisabled) { warn$2("Setting up fake worker."); PDFWorker.#isWorkerDisabled = true; } PDFWorker._setupFakeWorkerGlobal.then((WorkerMessageHandler) => { if (this.destroyed) { this.#capability.reject(new Error("Worker was destroyed")); return; } const port = new LoopbackPort(); this.#port = port; const id = `fake${PDFWorker.#fakeWorkerId++}`; const workerHandler = new MessageHandler(id + "_worker", id, port); WorkerMessageHandler.setup(workerHandler, port); this.#messageHandler = new MessageHandler(id, id + "_worker", port); this.#resolve(); }).catch((reason) => { this.#capability.reject(new Error(`Setting up fake worker failed: "${reason.message}".`)); }); } destroy() { this.destroyed = true; this.#webWorker?.terminate(); this.#webWorker = null; PDFWorker.#workerPorts.delete(this.#port); this.#port = null; this.#messageHandler?.destroy(); this.#messageHandler = null; } static create(params) { const cachedPort = this.#workerPorts.get(params?.port); if (cachedPort) { if (cachedPort._pendingDestroy) { throw new Error("PDFWorker.create - the worker is being destroyed.\n" + "Please remember to await `PDFDocumentLoadingTask.destroy()`-calls."); } return cachedPort; } return new PDFWorker(params); } static get workerSrc() { if (GlobalWorkerOptions.workerSrc) { return GlobalWorkerOptions.workerSrc; } throw new Error("No \"GlobalWorkerOptions.workerSrc\" specified."); } static get #mainThreadWorkerMessageHandler() { try { return globalThis.pdfjsWorker?.WorkerMessageHandler || null; } catch { return null; } } static get _setupFakeWorkerGlobal() { const loader = async () => { if (this.#mainThreadWorkerMessageHandler) { return this.#mainThreadWorkerMessageHandler; } const worker = await import( /*webpackIgnore: true*/ /*@vite-ignore*/ this.workerSrc ); return worker.WorkerMessageHandler; }; return shadow(this, "_setupFakeWorkerGlobal", loader()); } }; WorkerTransport = class { #methodPromises = new Map(); #pageCache = new Map(); #pagePromises = new Map(); #pageRefCache = new Map(); #passwordCapability = null; constructor(messageHandler, loadingTask, networkStream, params, factory, enableHWA) { this.messageHandler = messageHandler; this.loadingTask = loadingTask; this.commonObjs = new PDFObjects(); this.fontLoader = new FontLoader({ ownerDocument: params.ownerDocument, styleElement: params.styleElement }); this.loadingParams = params.loadingParams; this._params = params; this.canvasFactory = factory.canvasFactory; this.filterFactory = factory.filterFactory; this.cMapReaderFactory = factory.cMapReaderFactory; this.standardFontDataFactory = factory.standardFontDataFactory; this.wasmFactory = factory.wasmFactory; this.destroyed = false; this.destroyCapability = null; this._networkStream = networkStream; this._fullReader = null; this._lastProgress = null; this.downloadInfoCapability = Promise.withResolvers(); this.enableHWA = enableHWA; this.setupMessageHandler(); } #cacheSimpleMethod(name, data = null) { const cachedPromise = this.#methodPromises.get(name); if (cachedPromise) { return cachedPromise; } const promise = this.messageHandler.sendWithPromise(name, data); this.#methodPromises.set(name, promise); return promise; } get annotationStorage() { return shadow(this, "annotationStorage", new AnnotationStorage()); } getRenderingIntent(intent, annotationMode = AnnotationMode.ENABLE, printAnnotationStorage = null, isEditing = false, isOpList = false) { let renderingIntent = RenderingIntentFlag.DISPLAY; let annotationStorageSerializable = SerializableEmpty; switch (intent) { case "any": renderingIntent = RenderingIntentFlag.ANY; break; case "display": break; case "print": renderingIntent = RenderingIntentFlag.PRINT; break; default: warn$2(`getRenderingIntent - invalid intent: ${intent}`); } const annotationStorage = renderingIntent & RenderingIntentFlag.PRINT && printAnnotationStorage instanceof PrintAnnotationStorage ? printAnnotationStorage : this.annotationStorage; switch (annotationMode) { case AnnotationMode.DISABLE: renderingIntent += RenderingIntentFlag.ANNOTATIONS_DISABLE; break; case AnnotationMode.ENABLE: break; case AnnotationMode.ENABLE_FORMS: renderingIntent += RenderingIntentFlag.ANNOTATIONS_FORMS; break; case AnnotationMode.ENABLE_STORAGE: renderingIntent += RenderingIntentFlag.ANNOTATIONS_STORAGE; annotationStorageSerializable = annotationStorage.serializable; break; default: warn$2(`getRenderingIntent - invalid annotationMode: ${annotationMode}`); } if (isEditing) { renderingIntent += RenderingIntentFlag.IS_EDITING; } if (isOpList) { renderingIntent += RenderingIntentFlag.OPLIST; } const { ids: modifiedIds, hash: modifiedIdsHash } = annotationStorage.modifiedIds; const cacheKeyBuf = [ renderingIntent, annotationStorageSerializable.hash, modifiedIdsHash ]; return { renderingIntent, cacheKey: cacheKeyBuf.join("_"), annotationStorageSerializable, modifiedIds }; } destroy() { if (this.destroyCapability) { return this.destroyCapability.promise; } this.destroyed = true; this.destroyCapability = Promise.withResolvers(); this.#passwordCapability?.reject(new Error("Worker was destroyed during onPassword callback")); const waitOn = []; for (const page of this.#pageCache.values()) { waitOn.push(page._destroy()); } this.#pageCache.clear(); this.#pagePromises.clear(); this.#pageRefCache.clear(); if (this.hasOwnProperty("annotationStorage")) { this.annotationStorage.resetModified(); } const terminated = this.messageHandler.sendWithPromise("Terminate", null); waitOn.push(terminated); Promise.all(waitOn).then(() => { this.commonObjs.clear(); this.fontLoader.clear(); this.#methodPromises.clear(); this.filterFactory.destroy(); TextLayer.cleanup(); this._networkStream?.cancelAllRequests(new AbortException("Worker was terminated.")); this.messageHandler?.destroy(); this.messageHandler = null; this.destroyCapability.resolve(); }, this.destroyCapability.reject); return this.destroyCapability.promise; } setupMessageHandler() { const { messageHandler, loadingTask } = this; messageHandler.on("GetReader", (data, sink) => { assert$1(this._networkStream, "GetReader - no `IPDFStream` instance available."); this._fullReader = this._networkStream.getFullReader(); this._fullReader.onProgress = (evt) => { this._lastProgress = { loaded: evt.loaded, total: evt.total }; }; sink.onPull = () => { this._fullReader.read().then(function({ value, done }) { if (done) { sink.close(); return; } assert$1(value instanceof ArrayBuffer, "GetReader - expected an ArrayBuffer."); sink.enqueue(new Uint8Array(value), 1, [value]); }).catch((reason) => { sink.error(reason); }); }; sink.onCancel = (reason) => { this._fullReader.cancel(reason); sink.ready.catch((readyReason) => { if (this.destroyed) { return; } throw readyReason; }); }; }); messageHandler.on("ReaderHeadersReady", async (data) => { await this._fullReader.headersReady; const { isStreamingSupported, isRangeSupported, contentLength } = this._fullReader; if (!isStreamingSupported || !isRangeSupported) { if (this._lastProgress) { loadingTask.onProgress?.(this._lastProgress); } this._fullReader.onProgress = (evt) => { loadingTask.onProgress?.({ loaded: evt.loaded, total: evt.total }); }; } return { isStreamingSupported, isRangeSupported, contentLength }; }); messageHandler.on("GetRangeReader", (data, sink) => { assert$1(this._networkStream, "GetRangeReader - no `IPDFStream` instance available."); const rangeReader = this._networkStream.getRangeReader(data.begin, data.end); if (!rangeReader) { sink.close(); return; } sink.onPull = () => { rangeReader.read().then(function({ value, done }) { if (done) { sink.close(); return; } assert$1(value instanceof ArrayBuffer, "GetRangeReader - expected an ArrayBuffer."); sink.enqueue(new Uint8Array(value), 1, [value]); }).catch((reason) => { sink.error(reason); }); }; sink.onCancel = (reason) => { rangeReader.cancel(reason); sink.ready.catch((readyReason) => { if (this.destroyed) { return; } throw readyReason; }); }; }); messageHandler.on("GetDoc", ({ pdfInfo }) => { this._numPages = pdfInfo.numPages; this._htmlForXfa = pdfInfo.htmlForXfa; delete pdfInfo.htmlForXfa; loadingTask._capability.resolve(new PDFDocumentProxy(pdfInfo, this)); }); messageHandler.on("DocException", (ex) => { loadingTask._capability.reject(wrapReason(ex)); }); messageHandler.on("PasswordRequest", (ex) => { this.#passwordCapability = Promise.withResolvers(); try { if (!loadingTask.onPassword) { throw wrapReason(ex); } const updatePassword = (password) => { if (password instanceof Error) { this.#passwordCapability.reject(password); } else { this.#passwordCapability.resolve({ password }); } }; loadingTask.onPassword(updatePassword, ex.code); } catch (err) { this.#passwordCapability.reject(err); } return this.#passwordCapability.promise; }); messageHandler.on("DataLoaded", (data) => { loadingTask.onProgress?.({ loaded: data.length, total: data.length }); this.downloadInfoCapability.resolve(data); }); messageHandler.on("StartRenderPage", (data) => { if (this.destroyed) { return; } const page = this.#pageCache.get(data.pageIndex); page._startRenderPage(data.transparency, data.cacheKey); }); messageHandler.on("commonobj", ([id, type, exportedData]) => { if (this.destroyed) { return null; } if (this.commonObjs.has(id)) { return null; } switch (type) { case "Font": if ("error" in exportedData) { const exportedError = exportedData.error; warn$2(`Error during font loading: ${exportedError}`); this.commonObjs.resolve(id, exportedError); break; } const fontData = new FontInfo(exportedData); const inspectFont = this._params.pdfBug && globalThis.FontInspector?.enabled ? (font$1, url) => globalThis.FontInspector.fontAdded(font$1, url) : null; const font = new FontFaceObject(fontData, inspectFont, exportedData.extra, exportedData.charProcOperatorList); this.fontLoader.bind(font).catch(() => messageHandler.sendWithPromise("FontFallback", { id })).finally(() => { if (!font.fontExtraProperties && font.data) { font.clearData(); } this.commonObjs.resolve(id, font); }); break; case "CopyLocalImage": const { imageRef } = exportedData; assert$1(imageRef, "The imageRef must be defined."); for (const pageProxy of this.#pageCache.values()) { for (const [, data] of pageProxy.objs) { if (data?.ref !== imageRef) { continue; } if (!data.dataLen) { return null; } this.commonObjs.resolve(id, structuredClone(data)); return data.dataLen; } } break; case "FontPath": case "Image": this.commonObjs.resolve(id, exportedData); break; case "Pattern": const pattern = new PatternInfo(exportedData); this.commonObjs.resolve(id, pattern.getIR()); break; default: throw new Error(`Got unknown common object type ${type}`); } return null; }); messageHandler.on("obj", ([id, pageIndex, type, imageData]) => { if (this.destroyed) { return; } const pageProxy = this.#pageCache.get(pageIndex); if (pageProxy.objs.has(id)) { return; } if (pageProxy._intentStates.size === 0) { imageData?.bitmap?.close(); return; } switch (type) { case "Image": case "Pattern": pageProxy.objs.resolve(id, imageData); break; default: throw new Error(`Got unknown object type ${type}`); } }); messageHandler.on("DocProgress", (data) => { if (this.destroyed) { return; } loadingTask.onProgress?.({ loaded: data.loaded, total: data.total }); }); messageHandler.on("FetchBinaryData", async (data) => { if (this.destroyed) { throw new Error("Worker was destroyed."); } const factory = this[data.type]; if (!factory) { throw new Error(`${data.type} not initialized, see the \`useWorkerFetch\` parameter.`); } return factory.fetch(data); }); } getData() { return this.messageHandler.sendWithPromise("GetData", null); } saveDocument() { if (this.annotationStorage.size <= 0) { warn$2("saveDocument called while `annotationStorage` is empty, " + "please use the getData-method instead."); } const { map: map$2, transfer } = this.annotationStorage.serializable; return this.messageHandler.sendWithPromise("SaveDocument", { isPureXfa: !!this._htmlForXfa, numPages: this._numPages, annotationStorage: map$2, filename: this._fullReader?.filename ?? null }, transfer).finally(() => { this.annotationStorage.resetModified(); }); } getPage(pageNumber) { if (!Number.isInteger(pageNumber) || pageNumber <= 0 || pageNumber > this._numPages) { return Promise.reject(new Error("Invalid page request.")); } const pageIndex = pageNumber - 1, cachedPromise = this.#pagePromises.get(pageIndex); if (cachedPromise) { return cachedPromise; } const promise = this.messageHandler.sendWithPromise("GetPage", { pageIndex }).then((pageInfo) => { if (this.destroyed) { throw new Error("Transport destroyed"); } if (pageInfo.refStr) { this.#pageRefCache.set(pageInfo.refStr, pageNumber); } const page = new PDFPageProxy(pageIndex, pageInfo, this, this._params.pdfBug); this.#pageCache.set(pageIndex, page); return page; }); this.#pagePromises.set(pageIndex, promise); return promise; } getPageIndex(ref) { if (!isRefProxy(ref)) { return Promise.reject(new Error("Invalid pageIndex request.")); } return this.messageHandler.sendWithPromise("GetPageIndex", { num: ref.num, gen: ref.gen }); } getAnnotations(pageIndex, intent) { return this.messageHandler.sendWithPromise("GetAnnotations", { pageIndex, intent }); } getFieldObjects() { return this.#cacheSimpleMethod("GetFieldObjects"); } hasJSActions() { return this.#cacheSimpleMethod("HasJSActions"); } getCalculationOrderIds() { return this.messageHandler.sendWithPromise("GetCalculationOrderIds", null); } getDestinations() { return this.messageHandler.sendWithPromise("GetDestinations", null); } getDestination(id) { if (typeof id !== "string") { return Promise.reject(new Error("Invalid destination request.")); } return this.messageHandler.sendWithPromise("GetDestination", { id }); } getPageLabels() { return this.messageHandler.sendWithPromise("GetPageLabels", null); } getPageLayout() { return this.messageHandler.sendWithPromise("GetPageLayout", null); } getPageMode() { return this.messageHandler.sendWithPromise("GetPageMode", null); } getViewerPreferences() { return this.messageHandler.sendWithPromise("GetViewerPreferences", null); } getOpenAction() { return this.messageHandler.sendWithPromise("GetOpenAction", null); } getAttachments() { return this.messageHandler.sendWithPromise("GetAttachments", null); } getAnnotationsByType(types, pageIndexesToSkip) { return this.messageHandler.sendWithPromise("GetAnnotationsByType", { types, pageIndexesToSkip }); } getDocJSActions() { return this.#cacheSimpleMethod("GetDocJSActions"); } getPageJSActions(pageIndex) { return this.messageHandler.sendWithPromise("GetPageJSActions", { pageIndex }); } getStructTree(pageIndex) { return this.messageHandler.sendWithPromise("GetStructTree", { pageIndex }); } getOutline() { return this.messageHandler.sendWithPromise("GetOutline", null); } getOptionalContentConfig(renderingIntent) { return this.#cacheSimpleMethod("GetOptionalContentConfig").then((data) => new OptionalContentConfig(data, renderingIntent)); } getPermissions() { return this.messageHandler.sendWithPromise("GetPermissions", null); } getMetadata() { const name = "GetMetadata", cachedPromise = this.#methodPromises.get(name); if (cachedPromise) { return cachedPromise; } const promise = this.messageHandler.sendWithPromise(name, null).then((results) => ({ info: results[0], metadata: results[1] ? new Metadata(results[1]) : null, contentDispositionFilename: this._fullReader?.filename ?? null, contentLength: this._fullReader?.contentLength ?? null })); this.#methodPromises.set(name, promise); return promise; } getMarkInfo() { return this.messageHandler.sendWithPromise("GetMarkInfo", null); } async startCleanup(keepLoadedFonts = false) { if (this.destroyed) { return; } await this.messageHandler.sendWithPromise("Cleanup", null); for (const page of this.#pageCache.values()) { const cleanupSuccessful = page.cleanup(); if (!cleanupSuccessful) { throw new Error(`startCleanup: Page ${page.pageNumber} is currently rendering.`); } } this.commonObjs.clear(); if (!keepLoadedFonts) { this.fontLoader.clear(); } this.#methodPromises.clear(); this.filterFactory.destroy(true); TextLayer.cleanup(); } cachedPageNumber(ref) { if (!isRefProxy(ref)) { return null; } const refStr = ref.gen === 0 ? `${ref.num}R` : `${ref.num}R${ref.gen}`; return this.#pageRefCache.get(refStr) ?? null; } }; RenderTask = class { #internalRenderTask = null; onContinue = null; onError = null; constructor(internalRenderTask) { this.#internalRenderTask = internalRenderTask; } get promise() { return this.#internalRenderTask.capability.promise; } cancel(extraDelay = 0) { this.#internalRenderTask.cancel(null, extraDelay); } get separateAnnots() { const { separateAnnots } = this.#internalRenderTask.operatorList; if (!separateAnnots) { return false; } const { annotationCanvasMap } = this.#internalRenderTask; return separateAnnots.form || separateAnnots.canvas && annotationCanvasMap?.size > 0; } }; InternalRenderTask = class InternalRenderTask { #rAF = null; static #canvasInUse = new WeakSet(); constructor({ callback, params, objs, commonObjs, annotationCanvasMap, operatorList, pageIndex, canvasFactory, filterFactory, useRequestAnimationFrame = false, pdfBug = false, pageColors = null, enableHWA = false, operationsFilter = null }) { this.callback = callback; this.params = params; this.objs = objs; this.commonObjs = commonObjs; this.annotationCanvasMap = annotationCanvasMap; this.operatorListIdx = null; this.operatorList = operatorList; this._pageIndex = pageIndex; this.canvasFactory = canvasFactory; this.filterFactory = filterFactory; this._pdfBug = pdfBug; this.pageColors = pageColors; this.running = false; this.graphicsReadyCallback = null; this.graphicsReady = false; this._useRequestAnimationFrame = useRequestAnimationFrame === true && typeof window !== "undefined"; this.cancelled = false; this.capability = Promise.withResolvers(); this.task = new RenderTask(this); this._cancelBound = this.cancel.bind(this); this._continueBound = this._continue.bind(this); this._scheduleNextBound = this._scheduleNext.bind(this); this._nextBound = this._next.bind(this); this._canvas = params.canvas; this._canvasContext = params.canvas ? null : params.canvasContext; this._enableHWA = enableHWA; this._dependencyTracker = params.dependencyTracker; this._operationsFilter = operationsFilter; } get completed() { return this.capability.promise.catch(function() {}); } initializeGraphics({ transparency = false, optionalContentConfig }) { if (this.cancelled) { return; } if (this._canvas) { if (InternalRenderTask.#canvasInUse.has(this._canvas)) { throw new Error("Cannot use the same canvas during multiple render() operations. " + "Use different canvas or ensure previous operations were " + "cancelled or completed."); } InternalRenderTask.#canvasInUse.add(this._canvas); } if (this._pdfBug && globalThis.StepperManager?.enabled) { this.stepper = globalThis.StepperManager.create(this._pageIndex); this.stepper.init(this.operatorList); this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint(); } const { viewport, transform, background, dependencyTracker } = this.params; const canvasContext = this._canvasContext || this._canvas.getContext("2d", { alpha: false, willReadFrequently: !this._enableHWA }); this.gfx = new CanvasGraphics(canvasContext, this.commonObjs, this.objs, this.canvasFactory, this.filterFactory, { optionalContentConfig }, this.annotationCanvasMap, this.pageColors, dependencyTracker); this.gfx.beginDrawing({ transform, viewport, transparency, background }); this.operatorListIdx = 0; this.graphicsReady = true; this.graphicsReadyCallback?.(); } cancel(error$2 = null, extraDelay = 0) { this.running = false; this.cancelled = true; this.gfx?.endDrawing(); if (this.#rAF) { window.cancelAnimationFrame(this.#rAF); this.#rAF = null; } InternalRenderTask.#canvasInUse.delete(this._canvas); error$2 ||= new RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex + 1}`, extraDelay); this.callback(error$2); this.task.onError?.(error$2); } operatorListChanged() { if (!this.graphicsReady) { this.graphicsReadyCallback ||= this._continueBound; return; } this.gfx.dependencyTracker?.growOperationsCount(this.operatorList.fnArray.length); this.stepper?.updateOperatorList(this.operatorList); if (this.running) { return; } this._continue(); } _continue() { this.running = true; if (this.cancelled) { return; } if (this.task.onContinue) { this.task.onContinue(this._scheduleNextBound); } else { this._scheduleNext(); } } _scheduleNext() { if (this._useRequestAnimationFrame) { this.#rAF = window.requestAnimationFrame(() => { this.#rAF = null; this._nextBound().catch(this._cancelBound); }); } else { Promise.resolve().then(this._nextBound).catch(this._cancelBound); } } async _next() { if (this.cancelled) { return; } this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList, this.operatorListIdx, this._continueBound, this.stepper, this._operationsFilter); if (this.operatorListIdx === this.operatorList.argsArray.length) { this.running = false; if (this.operatorList.lastChunk) { this.gfx.endDrawing(); InternalRenderTask.#canvasInUse.delete(this._canvas); this.callback(); } } } }; version$4 = "5.4.394"; build = "2cc809ade"; ; ColorPicker = class ColorPicker { #button = null; #buttonSwatch = null; #defaultColor; #dropdown = null; #dropdownWasFromKeyboard = false; #isMainColorPicker = false; #editor = null; #eventBus; #openDropdownAC = null; #uiManager = null; static #l10nColor = null; static get _keyboardManager() { return shadow(this, "_keyboardManager", new KeyboardManager([ [["Escape", "mac+Escape"], ColorPicker.prototype._hideDropdownFromKeyboard], [[" ", "mac+ "], ColorPicker.prototype._colorSelectFromKeyboard], [[ "ArrowDown", "ArrowRight", "mac+ArrowDown", "mac+ArrowRight" ], ColorPicker.prototype._moveToNext], [[ "ArrowUp", "ArrowLeft", "mac+ArrowUp", "mac+ArrowLeft" ], ColorPicker.prototype._moveToPrevious], [["Home", "mac+Home"], ColorPicker.prototype._moveToBeginning], [["End", "mac+End"], ColorPicker.prototype._moveToEnd] ])); } constructor({ editor = null, uiManager = null }) { if (editor) { this.#isMainColorPicker = false; this.#editor = editor; } else { this.#isMainColorPicker = true; } this.#uiManager = editor?._uiManager || uiManager; this.#eventBus = this.#uiManager._eventBus; this.#defaultColor = editor?.color?.toUpperCase() || this.#uiManager?.highlightColors.values().next().value || "#FFFF98"; ColorPicker.#l10nColor ||= Object.freeze({ blue: "pdfjs-editor-colorpicker-blue", green: "pdfjs-editor-colorpicker-green", pink: "pdfjs-editor-colorpicker-pink", red: "pdfjs-editor-colorpicker-red", yellow: "pdfjs-editor-colorpicker-yellow" }); } renderButton() { const button = this.#button = document.createElement("button"); button.className = "colorPicker"; button.tabIndex = "0"; button.setAttribute("data-l10n-id", "pdfjs-editor-colorpicker-button"); button.ariaHasPopup = "true"; if (this.#editor) { button.ariaControls = `${this.#editor.id}_colorpicker_dropdown`; } const signal = this.#uiManager._signal; button.addEventListener("click", this.#openDropdown.bind(this), { signal }); button.addEventListener("keydown", this.#keyDown.bind(this), { signal }); const swatch = this.#buttonSwatch = document.createElement("span"); swatch.className = "swatch"; swatch.ariaHidden = "true"; swatch.style.backgroundColor = this.#defaultColor; button.append(swatch); return button; } renderMainDropdown() { const dropdown = this.#dropdown = this.#getDropdownRoot(); dropdown.ariaOrientation = "horizontal"; dropdown.ariaLabelledBy = "highlightColorPickerLabel"; return dropdown; } #getDropdownRoot() { const div = document.createElement("div"); const signal = this.#uiManager._signal; div.addEventListener("contextmenu", noContextMenu, { signal }); div.className = "dropdown"; div.role = "listbox"; div.ariaMultiSelectable = "false"; div.ariaOrientation = "vertical"; div.setAttribute("data-l10n-id", "pdfjs-editor-colorpicker-dropdown"); if (this.#editor) { div.id = `${this.#editor.id}_colorpicker_dropdown`; } for (const [name, color] of this.#uiManager.highlightColors) { const button = document.createElement("button"); button.tabIndex = "0"; button.role = "option"; button.setAttribute("data-color", color); button.title = name; button.setAttribute("data-l10n-id", ColorPicker.#l10nColor[name]); const swatch = document.createElement("span"); button.append(swatch); swatch.className = "swatch"; swatch.style.backgroundColor = color; button.ariaSelected = color === this.#defaultColor; button.addEventListener("click", this.#colorSelect.bind(this, color), { signal }); div.append(button); } div.addEventListener("keydown", this.#keyDown.bind(this), { signal }); return div; } #colorSelect(color, event) { event.stopPropagation(); this.#eventBus.dispatch("switchannotationeditorparams", { source: this, type: AnnotationEditorParamsType.HIGHLIGHT_COLOR, value: color }); this.updateColor(color); } _colorSelectFromKeyboard(event) { if (event.target === this.#button) { this.#openDropdown(event); return; } const color = event.target.getAttribute("data-color"); if (!color) { return; } this.#colorSelect(color, event); } _moveToNext(event) { if (!this.#isDropdownVisible) { this.#openDropdown(event); return; } if (event.target === this.#button) { this.#dropdown.firstChild?.focus(); return; } event.target.nextSibling?.focus(); } _moveToPrevious(event) { if (event.target === this.#dropdown?.firstChild || event.target === this.#button) { if (this.#isDropdownVisible) { this._hideDropdownFromKeyboard(); } return; } if (!this.#isDropdownVisible) { this.#openDropdown(event); } event.target.previousSibling?.focus(); } _moveToBeginning(event) { if (!this.#isDropdownVisible) { this.#openDropdown(event); return; } this.#dropdown.firstChild?.focus(); } _moveToEnd(event) { if (!this.#isDropdownVisible) { this.#openDropdown(event); return; } this.#dropdown.lastChild?.focus(); } #keyDown(event) { ColorPicker._keyboardManager.exec(this, event); } #openDropdown(event) { if (this.#isDropdownVisible) { this.hideDropdown(); return; } this.#dropdownWasFromKeyboard = event.detail === 0; if (!this.#openDropdownAC) { this.#openDropdownAC = new AbortController(); window.addEventListener("pointerdown", this.#pointerDown.bind(this), { signal: this.#uiManager.combinedSignal(this.#openDropdownAC) }); } this.#button.ariaExpanded = "true"; if (this.#dropdown) { this.#dropdown.classList.remove("hidden"); return; } const root = this.#dropdown = this.#getDropdownRoot(); this.#button.append(root); } #pointerDown(event) { if (this.#dropdown?.contains(event.target)) { return; } this.hideDropdown(); } hideDropdown() { this.#dropdown?.classList.add("hidden"); this.#button.ariaExpanded = "false"; this.#openDropdownAC?.abort(); this.#openDropdownAC = null; } get #isDropdownVisible() { return this.#dropdown && !this.#dropdown.classList.contains("hidden"); } _hideDropdownFromKeyboard() { if (this.#isMainColorPicker) { return; } if (!this.#isDropdownVisible) { this.#editor?.unselect(); return; } this.hideDropdown(); this.#button.focus({ preventScroll: true, focusVisible: this.#dropdownWasFromKeyboard }); } updateColor(color) { if (this.#buttonSwatch) { this.#buttonSwatch.style.backgroundColor = color; } if (!this.#dropdown) { return; } const i$7 = this.#uiManager.highlightColors.values(); for (const child of this.#dropdown.children) { child.ariaSelected = i$7.next().value === color.toUpperCase(); } } destroy() { this.#button?.remove(); this.#button = null; this.#buttonSwatch = null; this.#dropdown?.remove(); this.#dropdown = null; } }; BasicColorPicker = class BasicColorPicker { #input = null; #editor = null; #uiManager = null; static #l10nColor = null; constructor(editor) { this.#editor = editor; this.#uiManager = editor._uiManager; BasicColorPicker.#l10nColor ||= Object.freeze({ freetext: "pdfjs-editor-color-picker-free-text-input", ink: "pdfjs-editor-color-picker-ink-input" }); } renderButton() { if (this.#input) { return this.#input; } const { editorType, colorType, color } = this.#editor; const input = this.#input = document.createElement("input"); input.type = "color"; input.value = color || "#000000"; input.className = "basicColorPicker"; input.tabIndex = 0; input.setAttribute("data-l10n-id", BasicColorPicker.#l10nColor[editorType]); input.addEventListener("input", () => { this.#uiManager.updateParams(colorType, input.value); }, { signal: this.#uiManager._signal }); return input; } update(value) { if (!this.#input) { return; } this.#input.value = value; } destroy() { this.#input?.remove(); this.#input = null; } hideDropdown() {} }; ; ColorConverters = class { static CMYK_G([c$7, y$3, m$3, k$2]) { return ["G", 1 - Math.min(1, .3 * c$7 + .59 * m$3 + .11 * y$3 + k$2)]; } static G_CMYK([g$1]) { return [ "CMYK", 0, 0, 0, 1 - g$1 ]; } static G_RGB([g$1]) { return [ "RGB", g$1, g$1, g$1 ]; } static G_rgb([g$1]) { g$1 = scaleAndClamp(g$1); return [ g$1, g$1, g$1 ]; } static G_HTML([g$1]) { const G$1 = makeColorComp(g$1); return `#${G$1}${G$1}${G$1}`; } static RGB_G([r$10, g$1, b$3]) { return ["G", .3 * r$10 + .59 * g$1 + .11 * b$3]; } static RGB_rgb(color) { return color.map(scaleAndClamp); } static RGB_HTML(color) { return `#${color.map(makeColorComp).join("")}`; } static T_HTML() { return "#00000000"; } static T_rgb() { return [null]; } static CMYK_RGB([c$7, y$3, m$3, k$2]) { return [ "RGB", 1 - Math.min(1, c$7 + k$2), 1 - Math.min(1, m$3 + k$2), 1 - Math.min(1, y$3 + k$2) ]; } static CMYK_rgb([c$7, y$3, m$3, k$2]) { return [ scaleAndClamp(1 - Math.min(1, c$7 + k$2)), scaleAndClamp(1 - Math.min(1, m$3 + k$2)), scaleAndClamp(1 - Math.min(1, y$3 + k$2)) ]; } static CMYK_HTML(components) { const rgb = this.CMYK_RGB(components).slice(1); return this.RGB_HTML(rgb); } static RGB_CMYK([r$10, g$1, b$3]) { const c$7 = 1 - r$10; const m$3 = 1 - g$1; const y$3 = 1 - b$3; const k$2 = Math.min(c$7, m$3, y$3); return [ "CMYK", c$7, m$3, y$3, k$2 ]; } }; DateFormats = null && [ "m/d", "m/d/yy", "mm/dd/yy", "mm/yy", "d-mmm", "d-mmm-yy", "dd-mmm-yy", "yy-mm-dd", "mmm-yy", "mmmm-yy", "mmm d, yyyy", "mmmm d, yyyy", "m/d/yy h:MM tt", "m/d/yy HH:MM" ]; TimeFormats = null && [ "HH:MM", "h:MM tt", "HH:MM:ss", "h:MM:ss tt" ]; ; BaseSVGFactory = class { create(width, height, skipDimensions = false) { if (width <= 0 || height <= 0) { throw new Error("Invalid SVG dimensions"); } const svg = this._createSVG("svg:svg"); svg.setAttribute("version", "1.1"); if (!skipDimensions) { svg.setAttribute("width", `${width}px`); svg.setAttribute("height", `${height}px`); } svg.setAttribute("preserveAspectRatio", "none"); svg.setAttribute("viewBox", `0 0 ${width} ${height}`); return svg; } createElement(type) { if (typeof type !== "string") { throw new Error("Invalid SVG element type"); } return this._createSVG(type); } _createSVG(type) { unreachable("Abstract method `_createSVG` called."); } }; DOMSVGFactory = class extends BaseSVGFactory { _createSVG(type) { return document.createElementNS(SVG_NS, type); } }; ; annotation_layer_DEFAULT_FONT_SIZE = 9; GetElementsByNameSet = new WeakSet(); TIMEZONE_OFFSET = new Date().getTimezoneOffset() * 60 * 1e3; AnnotationElementFactory = class { static create(parameters) { const subtype = parameters.data.annotationType; switch (subtype) { case AnnotationType.LINK: return new LinkAnnotationElement(parameters); case AnnotationType.TEXT: return new TextAnnotationElement(parameters); case AnnotationType.WIDGET: const fieldType = parameters.data.fieldType; switch (fieldType) { case "Tx": return new TextWidgetAnnotationElement(parameters); case "Btn": if (parameters.data.radioButton) { return new RadioButtonWidgetAnnotationElement(parameters); } else if (parameters.data.checkBox) { return new CheckboxWidgetAnnotationElement(parameters); } return new PushButtonWidgetAnnotationElement(parameters); case "Ch": return new ChoiceWidgetAnnotationElement(parameters); case "Sig": return new SignatureWidgetAnnotationElement(parameters); } return new WidgetAnnotationElement(parameters); case AnnotationType.POPUP: return new PopupAnnotationElement(parameters); case AnnotationType.FREETEXT: return new FreeTextAnnotationElement(parameters); case AnnotationType.LINE: return new LineAnnotationElement(parameters); case AnnotationType.SQUARE: return new SquareAnnotationElement(parameters); case AnnotationType.CIRCLE: return new CircleAnnotationElement(parameters); case AnnotationType.POLYLINE: return new PolylineAnnotationElement(parameters); case AnnotationType.CARET: return new CaretAnnotationElement(parameters); case AnnotationType.INK: return new InkAnnotationElement(parameters); case AnnotationType.POLYGON: return new PolygonAnnotationElement(parameters); case AnnotationType.HIGHLIGHT: return new HighlightAnnotationElement(parameters); case AnnotationType.UNDERLINE: return new UnderlineAnnotationElement(parameters); case AnnotationType.SQUIGGLY: return new SquigglyAnnotationElement(parameters); case AnnotationType.STRIKEOUT: return new StrikeOutAnnotationElement(parameters); case AnnotationType.STAMP: return new StampAnnotationElement(parameters); case AnnotationType.FILEATTACHMENT: return new FileAttachmentAnnotationElement(parameters); default: return new AnnotationElement(parameters); } } }; AnnotationElement = class AnnotationElement { #updates = null; #hasBorder = false; #popupElement = null; constructor(parameters, { isRenderable = false, ignoreBorder = false, createQuadrilaterals = false } = {}) { this.isRenderable = isRenderable; this.data = parameters.data; this.layer = parameters.layer; this.linkService = parameters.linkService; this.downloadManager = parameters.downloadManager; this.imageResourcesPath = parameters.imageResourcesPath; this.renderForms = parameters.renderForms; this.svgFactory = parameters.svgFactory; this.annotationStorage = parameters.annotationStorage; this.enableComment = parameters.enableComment; this.enableScripting = parameters.enableScripting; this.hasJSActions = parameters.hasJSActions; this._fieldObjects = parameters.fieldObjects; this.parent = parameters.parent; this.hasOwnCommentButton = false; if (isRenderable) { this.contentElement = this.container = this._createContainer(ignoreBorder); } if (createQuadrilaterals) { this._createQuadrilaterals(); } } static _hasPopupData({ contentsObj, richText }) { return !!(contentsObj?.str || richText?.str); } get _isEditable() { return this.data.isEditable; } get hasPopupData() { return AnnotationElement._hasPopupData(this.data) || this.enableComment && !!this.commentText; } get commentData() { const { data } = this; const editor = this.annotationStorage?.getEditor(data.id); if (editor) { return editor.getData(); } return data; } get hasCommentButton() { return this.enableComment && this.hasPopupElement; } get commentButtonPosition() { const editor = this.annotationStorage?.getEditor(this.data.id); if (editor) { return editor.commentButtonPositionInPage; } const { quadPoints, inkLists, rect } = this.data; let maxX = -Infinity; let maxY = -Infinity; if (quadPoints?.length >= 8) { for (let i$7 = 0; i$7 < quadPoints.length; i$7 += 8) { if (quadPoints[i$7 + 1] > maxY) { maxY = quadPoints[i$7 + 1]; maxX = quadPoints[i$7 + 2]; } else if (quadPoints[i$7 + 1] === maxY) { maxX = Math.max(maxX, quadPoints[i$7 + 2]); } } return [maxX, maxY]; } if (inkLists?.length >= 1) { for (const inkList of inkLists) { for (let i$7 = 0, ii = inkList.length; i$7 < ii; i$7 += 2) { if (inkList[i$7 + 1] > maxY) { maxY = inkList[i$7 + 1]; maxX = inkList[i$7]; } else if (inkList[i$7 + 1] === maxY) { maxX = Math.max(maxX, inkList[i$7]); } } } if (maxX !== Infinity) { return [maxX, maxY]; } } if (rect) { return [rect[2], rect[3]]; } return null; } _normalizePoint(point) { const { page: { view }, viewport: { rawDims: { pageWidth, pageHeight, pageX, pageY } } } = this.parent; point[1] = view[3] - point[1] + view[1]; point[0] = 100 * (point[0] - pageX) / pageWidth; point[1] = 100 * (point[1] - pageY) / pageHeight; return point; } get commentText() { const { data } = this; return this.annotationStorage.getRawValue(`${AnnotationEditorPrefix}${data.id}`)?.popup?.contents || data.contentsObj?.str || ""; } set commentText(text$2) { const { data } = this; const popup = { deleted: !text$2, contents: text$2 || "" }; if (!this.annotationStorage.updateEditor(data.id, { popup })) { this.annotationStorage.setValue(`${AnnotationEditorPrefix}${data.id}`, { id: data.id, annotationType: data.annotationType, pageIndex: this.parent.page._pageIndex, popup, popupRef: data.popupRef, modificationDate: new Date() }); } if (!text$2) { this.removePopup(); } } removePopup() { (this.#popupElement?.popup || this.popup)?.remove(); this.#popupElement = this.popup = null; } updateEdited(params) { if (!this.container) { return; } if (params.rect) { this.#updates ||= { rect: this.data.rect.slice(0) }; } const { rect, popup: newPopup } = params; if (rect) { this.#setRectEdited(rect); } let popup = this.#popupElement?.popup || this.popup; if (!popup && newPopup?.text) { this._createPopup(newPopup); popup = this.#popupElement.popup; } if (!popup) { return; } popup.updateEdited(params); if (newPopup?.deleted) { popup.remove(); this.#popupElement = null; this.popup = null; } } resetEdited() { if (!this.#updates) { return; } this.#setRectEdited(this.#updates.rect); this.#popupElement?.popup.resetEdited(); this.#updates = null; } #setRectEdited(rect) { const { container: { style }, data: { rect: currentRect, rotation }, parent: { viewport: { rawDims: { pageWidth, pageHeight, pageX, pageY } } } } = this; currentRect?.splice(0, 4, ...rect); style.left = `${100 * (rect[0] - pageX) / pageWidth}%`; style.top = `${100 * (pageHeight - rect[3] + pageY) / pageHeight}%`; if (rotation === 0) { style.width = `${100 * (rect[2] - rect[0]) / pageWidth}%`; style.height = `${100 * (rect[3] - rect[1]) / pageHeight}%`; } else { this.setRotation(rotation); } } _createContainer(ignoreBorder) { const { data, parent: { page, viewport } } = this; const container = document.createElement("section"); container.setAttribute("data-annotation-id", data.id); if (!(this instanceof WidgetAnnotationElement) && !(this instanceof LinkAnnotationElement)) { container.tabIndex = 0; } const { style } = container; style.zIndex = this.parent.zIndex; this.parent.zIndex += 2; if (data.alternativeText) { container.title = data.alternativeText; } if (data.noRotate) { container.classList.add("norotate"); } if (!data.rect || this instanceof PopupAnnotationElement) { const { rotation: rotation$1 } = data; if (!data.hasOwnCanvas && rotation$1 !== 0) { this.setRotation(rotation$1, container); } return container; } const { width, height } = this; if (!ignoreBorder && data.borderStyle.width > 0) { style.borderWidth = `${data.borderStyle.width}px`; const horizontalRadius = data.borderStyle.horizontalCornerRadius; const verticalRadius = data.borderStyle.verticalCornerRadius; if (horizontalRadius > 0 || verticalRadius > 0) { const radius = `calc(${horizontalRadius}px * var(--total-scale-factor)) / calc(${verticalRadius}px * var(--total-scale-factor))`; style.borderRadius = radius; } else if (this instanceof RadioButtonWidgetAnnotationElement) { const radius = `calc(${width}px * var(--total-scale-factor)) / calc(${height}px * var(--total-scale-factor))`; style.borderRadius = radius; } switch (data.borderStyle.style) { case AnnotationBorderStyleType.SOLID: style.borderStyle = "solid"; break; case AnnotationBorderStyleType.DASHED: style.borderStyle = "dashed"; break; case AnnotationBorderStyleType.BEVELED: warn$2("Unimplemented border style: beveled"); break; case AnnotationBorderStyleType.INSET: warn$2("Unimplemented border style: inset"); break; case AnnotationBorderStyleType.UNDERLINE: style.borderBottomStyle = "solid"; break; default: break; } const borderColor = data.borderColor || null; if (borderColor) { this.#hasBorder = true; style.borderColor = Util.makeHexColor(borderColor[0] | 0, borderColor[1] | 0, borderColor[2] | 0); } else { style.borderWidth = 0; } } const rect = Util.normalizeRect([ data.rect[0], page.view[3] - data.rect[1] + page.view[1], data.rect[2], page.view[3] - data.rect[3] + page.view[1] ]); const { pageWidth, pageHeight, pageX, pageY } = viewport.rawDims; style.left = `${100 * (rect[0] - pageX) / pageWidth}%`; style.top = `${100 * (rect[1] - pageY) / pageHeight}%`; const { rotation } = data; if (data.hasOwnCanvas || rotation === 0) { style.width = `${100 * width / pageWidth}%`; style.height = `${100 * height / pageHeight}%`; } else { this.setRotation(rotation, container); } return container; } setRotation(angle, container = this.container) { if (!this.data.rect) { return; } const { pageWidth, pageHeight } = this.parent.viewport.rawDims; let { width, height } = this; if (angle % 180 !== 0) { [width, height] = [height, width]; } container.style.width = `${100 * width / pageWidth}%`; container.style.height = `${100 * height / pageHeight}%`; container.setAttribute("data-main-rotation", (360 - angle) % 360); } get _commonActions() { const setColor = (jsName, styleName, event) => { const color = event.detail[jsName]; const colorType = color[0]; const colorArray = color.slice(1); event.target.style[styleName] = ColorConverters[`${colorType}_HTML`](colorArray); this.annotationStorage.setValue(this.data.id, { [styleName]: ColorConverters[`${colorType}_rgb`](colorArray) }); }; return shadow(this, "_commonActions", { display: (event) => { const { display } = event.detail; const hidden = display % 2 === 1; this.container.style.visibility = hidden ? "hidden" : "visible"; this.annotationStorage.setValue(this.data.id, { noView: hidden, noPrint: display === 1 || display === 2 }); }, print: (event) => { this.annotationStorage.setValue(this.data.id, { noPrint: !event.detail.print }); }, hidden: (event) => { const { hidden } = event.detail; this.container.style.visibility = hidden ? "hidden" : "visible"; this.annotationStorage.setValue(this.data.id, { noPrint: hidden, noView: hidden }); }, focus: (event) => { setTimeout(() => event.target.focus({ preventScroll: false }), 0); }, userName: (event) => { event.target.title = event.detail.userName; }, readonly: (event) => { event.target.disabled = event.detail.readonly; }, required: (event) => { this._setRequired(event.target, event.detail.required); }, bgColor: (event) => { setColor("bgColor", "backgroundColor", event); }, fillColor: (event) => { setColor("fillColor", "backgroundColor", event); }, fgColor: (event) => { setColor("fgColor", "color", event); }, textColor: (event) => { setColor("textColor", "color", event); }, borderColor: (event) => { setColor("borderColor", "borderColor", event); }, strokeColor: (event) => { setColor("strokeColor", "borderColor", event); }, rotation: (event) => { const angle = event.detail.rotation; this.setRotation(angle); this.annotationStorage.setValue(this.data.id, { rotation: angle }); } }); } _dispatchEventFromSandbox(actions, jsEvent) { const commonActions = this._commonActions; for (const name of Object.keys(jsEvent.detail)) { const action = actions[name] || commonActions[name]; action?.(jsEvent); } } _setDefaultPropertiesFromJS(element) { if (!this.enableScripting) { return; } const storedData = this.annotationStorage.getRawValue(this.data.id); if (!storedData) { return; } const commonActions = this._commonActions; for (const [actionName, detail] of Object.entries(storedData)) { const action = commonActions[actionName]; if (action) { const eventProxy = { detail: { [actionName]: detail }, target: element }; action(eventProxy); delete storedData[actionName]; } } } _createQuadrilaterals() { if (!this.container) { return; } const { quadPoints } = this.data; if (!quadPoints) { return; } const [rectBlX, rectBlY, rectTrX, rectTrY] = this.data.rect.map((x$2) => Math.fround(x$2)); if (quadPoints.length === 8) { const [trX, trY, blX, blY] = quadPoints.subarray(2, 6); if (rectTrX === trX && rectTrY === trY && rectBlX === blX && rectBlY === blY) { return; } } const { style } = this.container; let svgBuffer; if (this.#hasBorder) { const { borderColor, borderWidth } = style; style.borderWidth = 0; svgBuffer = [ "url('data:image/svg+xml;utf8,", ``, `` ]; this.container.classList.add("hasBorder"); } const width = rectTrX - rectBlX; const height = rectTrY - rectBlY; const { svgFactory } = this; const svg = svgFactory.createElement("svg"); svg.classList.add("quadrilateralsContainer"); svg.setAttribute("width", 0); svg.setAttribute("height", 0); svg.role = "none"; const defs = svgFactory.createElement("defs"); svg.append(defs); const clipPath = svgFactory.createElement("clipPath"); const id = `clippath_${this.data.id}`; clipPath.setAttribute("id", id); clipPath.setAttribute("clipPathUnits", "objectBoundingBox"); defs.append(clipPath); for (let i$7 = 2, ii = quadPoints.length; i$7 < ii; i$7 += 8) { const trX = quadPoints[i$7]; const trY = quadPoints[i$7 + 1]; const blX = quadPoints[i$7 + 2]; const blY = quadPoints[i$7 + 3]; const rect = svgFactory.createElement("rect"); const x$2 = (blX - rectBlX) / width; const y$3 = (rectTrY - trY) / height; const rectWidth = (trX - blX) / width; const rectHeight = (trY - blY) / height; rect.setAttribute("x", x$2); rect.setAttribute("y", y$3); rect.setAttribute("width", rectWidth); rect.setAttribute("height", rectHeight); clipPath.append(rect); svgBuffer?.push(``); } if (this.#hasBorder) { svgBuffer.push(`')`); style.backgroundImage = svgBuffer.join(""); } this.container.append(svg); this.container.style.clipPath = `url(#${id})`; } _createPopup(popupData = null) { const { data } = this; let contentsObj, modificationDate; if (popupData) { contentsObj = { str: popupData.text }; modificationDate = popupData.date; } else { contentsObj = data.contentsObj; modificationDate = data.modificationDate; } this.#popupElement = new PopupAnnotationElement({ data: { color: data.color, titleObj: data.titleObj, modificationDate, contentsObj, richText: data.richText, parentRect: data.rect, borderStyle: 0, id: `popup_${data.id}`, rotation: data.rotation, noRotate: true }, linkService: this.linkService, parent: this.parent, elements: [this] }); } get hasPopupElement() { return !!(this.#popupElement || this.popup || this.data.popupRef); } get extraPopupElement() { return this.#popupElement; } render() { unreachable("Abstract method `AnnotationElement.render` called"); } _getElementsByName(name, skipId = null) { const fields = []; if (this._fieldObjects) { const fieldObj = this._fieldObjects[name]; if (fieldObj) { for (const { page, id, exportValues } of fieldObj) { if (page === -1) { continue; } if (id === skipId) { continue; } const exportValue = typeof exportValues === "string" ? exportValues : null; const domElement = document.querySelector(`[data-element-id="${id}"]`); if (domElement && !GetElementsByNameSet.has(domElement)) { warn$2(`_getElementsByName - element not allowed: ${id}`); continue; } fields.push({ id, exportValue, domElement }); } } return fields; } for (const domElement of document.getElementsByName(name)) { const { exportValue } = domElement; const id = domElement.getAttribute("data-element-id"); if (id === skipId) { continue; } if (!GetElementsByNameSet.has(domElement)) { continue; } fields.push({ id, exportValue, domElement }); } return fields; } show() { if (this.container) { this.container.hidden = false; } this.popup?.maybeShow(); } hide() { if (this.container) { this.container.hidden = true; } this.popup?.forceHide(); } getElementsToTriggerPopup() { return this.container; } addHighlightArea() { const triggers = this.getElementsToTriggerPopup(); if (Array.isArray(triggers)) { for (const element of triggers) { element.classList.add("highlightArea"); } } else { triggers.classList.add("highlightArea"); } } _editOnDoubleClick() { if (!this._isEditable) { return; } const { annotationEditorType: mode, data: { id: editId } } = this; this.container.addEventListener("dblclick", () => { this.linkService.eventBus?.dispatch("switchannotationeditormode", { source: this, mode, editId, mustEnterInEditMode: true }); }); } get width() { return this.data.rect[2] - this.data.rect[0]; } get height() { return this.data.rect[3] - this.data.rect[1]; } }; EditorAnnotationElement = class extends AnnotationElement { constructor(parameters) { super(parameters, { isRenderable: true, ignoreBorder: true }); this.editor = parameters.editor; } render() { this.container.className = "editorAnnotation"; return this.container; } createOrUpdatePopup() { const { editor } = this; if (!editor.hasComment) { return; } this._createPopup(editor.comment); } get hasCommentButton() { return this.enableComment && this.editor.hasComment; } get commentButtonPosition() { return this.editor.commentButtonPositionInPage; } get commentText() { return this.editor.comment.text; } set commentText(text$2) { this.editor.comment = text$2; if (!text$2) { this.removePopup(); } } get commentData() { return this.editor.getData(); } remove() { this.parent.removeAnnotation(this.data.id); this.container.remove(); this.container = null; this.removePopup(); } }; LinkAnnotationElement = class extends AnnotationElement { constructor(parameters, options = null) { super(parameters, { isRenderable: true, ignoreBorder: !!options?.ignoreBorder, createQuadrilaterals: true }); this.isTooltipOnly = parameters.data.isTooltipOnly; } render() { const { data, linkService } = this; const link = document.createElement("a"); link.setAttribute("data-element-id", data.id); let isBound = false; if (data.url) { linkService.addLinkAttributes(link, data.url, data.newWindow); isBound = true; } else if (data.action) { this._bindNamedAction(link, data.action, data.overlaidText); isBound = true; } else if (data.attachment) { this.#bindAttachment(link, data.attachment, data.overlaidText, data.attachmentDest); isBound = true; } else if (data.setOCGState) { this.#bindSetOCGState(link, data.setOCGState, data.overlaidText); isBound = true; } else if (data.dest) { this._bindLink(link, data.dest, data.overlaidText); isBound = true; } else { if (data.actions && (data.actions.Action || data.actions["Mouse Up"] || data.actions["Mouse Down"]) && this.enableScripting && this.hasJSActions) { this._bindJSAction(link, data); isBound = true; } if (data.resetForm) { this._bindResetFormAction(link, data.resetForm); isBound = true; } else if (this.isTooltipOnly && !isBound) { this._bindLink(link, ""); isBound = true; } } this.container.classList.add("linkAnnotation"); if (isBound) { this.contentElement = link; this.container.append(link); } return this.container; } #setInternalLink() { this.container.setAttribute("data-internal-link", ""); } _bindLink(link, destination, overlaidText = "") { link.href = this.linkService.getDestinationHash(destination); link.onclick = () => { if (destination) { this.linkService.goToDestination(destination); } return false; }; if (destination || destination === "") { this.#setInternalLink(); } if (overlaidText) { link.title = overlaidText; } } _bindNamedAction(link, action, overlaidText = "") { link.href = this.linkService.getAnchorUrl(""); link.onclick = () => { this.linkService.executeNamedAction(action); return false; }; if (overlaidText) { link.title = overlaidText; } this.#setInternalLink(); } #bindAttachment(link, attachment, overlaidText = "", dest = null) { link.href = this.linkService.getAnchorUrl(""); if (attachment.description) { link.title = attachment.description; } else if (overlaidText) { link.title = overlaidText; } link.onclick = () => { this.downloadManager?.openOrDownloadData(attachment.content, attachment.filename, dest); return false; }; this.#setInternalLink(); } #bindSetOCGState(link, action, overlaidText = "") { link.href = this.linkService.getAnchorUrl(""); link.onclick = () => { this.linkService.executeSetOCGState(action); return false; }; if (overlaidText) { link.title = overlaidText; } this.#setInternalLink(); } _bindJSAction(link, data) { link.href = this.linkService.getAnchorUrl(""); const map$2 = new Map([ ["Action", "onclick"], ["Mouse Up", "onmouseup"], ["Mouse Down", "onmousedown"] ]); for (const name of Object.keys(data.actions)) { const jsName = map$2.get(name); if (!jsName) { continue; } link[jsName] = () => { this.linkService.eventBus?.dispatch("dispatcheventinsandbox", { source: this, detail: { id: data.id, name } }); return false; }; } if (data.overlaidText) { link.title = data.overlaidText; } if (!link.onclick) { link.onclick = () => false; } this.#setInternalLink(); } _bindResetFormAction(link, resetForm) { const otherClickAction = link.onclick; if (!otherClickAction) { link.href = this.linkService.getAnchorUrl(""); } this.#setInternalLink(); if (!this._fieldObjects) { warn$2(`_bindResetFormAction - "resetForm" action not supported, ` + "ensure that the `fieldObjects` parameter is provided."); if (!otherClickAction) { link.onclick = () => false; } return; } link.onclick = () => { otherClickAction?.(); const { fields: resetFormFields, refs: resetFormRefs, include } = resetForm; const allFields = []; if (resetFormFields.length !== 0 || resetFormRefs.length !== 0) { const fieldIds = new Set(resetFormRefs); for (const fieldName of resetFormFields) { const fields = this._fieldObjects[fieldName] || []; for (const { id } of fields) { fieldIds.add(id); } } for (const fields of Object.values(this._fieldObjects)) { for (const field of fields) { if (fieldIds.has(field.id) === include) { allFields.push(field); } } } } else { for (const fields of Object.values(this._fieldObjects)) { allFields.push(...fields); } } const storage = this.annotationStorage; const allIds = []; for (const field of allFields) { const { id } = field; allIds.push(id); switch (field.type) { case "text": { const value = field.defaultValue || ""; storage.setValue(id, { value }); break; } case "checkbox": case "radiobutton": { const value = field.defaultValue === field.exportValues; storage.setValue(id, { value }); break; } case "combobox": case "listbox": { const value = field.defaultValue || ""; storage.setValue(id, { value }); break; } default: continue; } const domElement = document.querySelector(`[data-element-id="${id}"]`); if (!domElement) { continue; } else if (!GetElementsByNameSet.has(domElement)) { warn$2(`_bindResetFormAction - element not allowed: ${id}`); continue; } domElement.dispatchEvent(new Event("resetform")); } if (this.enableScripting) { this.linkService.eventBus?.dispatch("dispatcheventinsandbox", { source: this, detail: { id: "app", ids: allIds, name: "ResetForm" } }); } return false; }; } }; TextAnnotationElement = class extends AnnotationElement { constructor(parameters) { super(parameters, { isRenderable: true }); } render() { this.container.classList.add("textAnnotation"); const image = document.createElement("img"); image.src = this.imageResourcesPath + "annotation-" + this.data.name.toLowerCase() + ".svg"; image.setAttribute("data-l10n-id", "pdfjs-text-annotation-type"); image.setAttribute("data-l10n-args", JSON.stringify({ type: this.data.name })); if (!this.data.popupRef && this.hasPopupData) { this.hasOwnCommentButton = true; this._createPopup(); } this.container.append(image); return this.container; } }; WidgetAnnotationElement = class extends AnnotationElement { render() { return this.container; } showElementAndHideCanvas(element) { if (this.data.hasOwnCanvas) { if (element.previousSibling?.nodeName === "CANVAS") { element.previousSibling.hidden = true; } element.hidden = false; } } _getKeyModifier(event) { return util_FeatureTest.platform.isMac ? event.metaKey : event.ctrlKey; } _setEventListener(element, elementData, baseName, eventName, valueGetter) { if (baseName.includes("mouse")) { element.addEventListener(baseName, (event) => { this.linkService.eventBus?.dispatch("dispatcheventinsandbox", { source: this, detail: { id: this.data.id, name: eventName, value: valueGetter(event), shift: event.shiftKey, modifier: this._getKeyModifier(event) } }); }); } else { element.addEventListener(baseName, (event) => { if (baseName === "blur") { if (!elementData.focused || !event.relatedTarget) { return; } elementData.focused = false; } else if (baseName === "focus") { if (elementData.focused) { return; } elementData.focused = true; } if (!valueGetter) { return; } this.linkService.eventBus?.dispatch("dispatcheventinsandbox", { source: this, detail: { id: this.data.id, name: eventName, value: valueGetter(event) } }); }); } } _setEventListeners(element, elementData, names, getter) { for (const [baseName, eventName] of names) { if (eventName === "Action" || this.data.actions?.[eventName]) { if (eventName === "Focus" || eventName === "Blur") { elementData ||= { focused: false }; } this._setEventListener(element, elementData, baseName, eventName, getter); if (eventName === "Focus" && !this.data.actions?.Blur) { this._setEventListener(element, elementData, "blur", "Blur", null); } else if (eventName === "Blur" && !this.data.actions?.Focus) { this._setEventListener(element, elementData, "focus", "Focus", null); } } } } _setBackgroundColor(element) { const color = this.data.backgroundColor || null; element.style.backgroundColor = color === null ? "transparent" : Util.makeHexColor(color[0], color[1], color[2]); } _setTextStyle(element) { const TEXT_ALIGNMENT = [ "left", "center", "right" ]; const { fontColor } = this.data.defaultAppearanceData; const fontSize = this.data.defaultAppearanceData.fontSize || annotation_layer_DEFAULT_FONT_SIZE; const style = element.style; let computedFontSize; const BORDER_SIZE = 2; const roundToOneDecimal = (x$2) => Math.round(10 * x$2) / 10; if (this.data.multiLine) { const height = Math.abs(this.data.rect[3] - this.data.rect[1] - BORDER_SIZE); const numberOfLines = Math.round(height / (LINE_FACTOR * fontSize)) || 1; const lineHeight = height / numberOfLines; computedFontSize = Math.min(fontSize, roundToOneDecimal(lineHeight / LINE_FACTOR)); } else { const height = Math.abs(this.data.rect[3] - this.data.rect[1] - BORDER_SIZE); computedFontSize = Math.min(fontSize, roundToOneDecimal(height / LINE_FACTOR)); } style.fontSize = `calc(${computedFontSize}px * var(--total-scale-factor))`; style.color = Util.makeHexColor(fontColor[0], fontColor[1], fontColor[2]); if (this.data.textAlignment !== null) { style.textAlign = TEXT_ALIGNMENT[this.data.textAlignment]; } } _setRequired(element, isRequired) { if (isRequired) { element.setAttribute("required", true); } else { element.removeAttribute("required"); } element.setAttribute("aria-required", isRequired); } }; TextWidgetAnnotationElement = class extends WidgetAnnotationElement { constructor(parameters) { const isRenderable = parameters.renderForms || parameters.data.hasOwnCanvas || !parameters.data.hasAppearance && !!parameters.data.fieldValue; super(parameters, { isRenderable }); } setPropertyOnSiblings(base, key, value, keyInStorage) { const storage = this.annotationStorage; for (const element of this._getElementsByName(base.name, base.id)) { if (element.domElement) { element.domElement[key] = value; } storage.setValue(element.id, { [keyInStorage]: value }); } } render() { const storage = this.annotationStorage; const id = this.data.id; this.container.classList.add("textWidgetAnnotation"); let element = null; if (this.renderForms) { const storedData = storage.getValue(id, { value: this.data.fieldValue }); let textContent = storedData.value || ""; const maxLen = storage.getValue(id, { charLimit: this.data.maxLen }).charLimit; if (maxLen && textContent.length > maxLen) { textContent = textContent.slice(0, maxLen); } let fieldFormattedValues = storedData.formattedValue || this.data.textContent?.join("\n") || null; if (fieldFormattedValues && this.data.comb) { fieldFormattedValues = fieldFormattedValues.replaceAll(/\s+/g, ""); } const elementData = { userValue: textContent, formattedValue: fieldFormattedValues, lastCommittedValue: null, commitKey: 1, focused: false }; if (this.data.multiLine) { element = document.createElement("textarea"); element.textContent = fieldFormattedValues ?? textContent; if (this.data.doNotScroll) { element.style.overflowY = "hidden"; } } else { element = document.createElement("input"); element.type = this.data.password ? "password" : "text"; element.setAttribute("value", fieldFormattedValues ?? textContent); if (this.data.doNotScroll) { element.style.overflowX = "hidden"; } } if (this.data.hasOwnCanvas) { element.hidden = true; } GetElementsByNameSet.add(element); this.contentElement = element; element.setAttribute("data-element-id", id); element.disabled = this.data.readOnly; element.name = this.data.fieldName; element.tabIndex = 0; const { datetimeFormat, datetimeType, timeStep } = this.data; const hasDateOrTime = !!datetimeType && this.enableScripting; if (datetimeFormat) { element.title = datetimeFormat; } this._setRequired(element, this.data.required); if (maxLen) { element.maxLength = maxLen; } element.addEventListener("input", (event) => { storage.setValue(id, { value: event.target.value }); this.setPropertyOnSiblings(element, "value", event.target.value, "value"); elementData.formattedValue = null; }); element.addEventListener("resetform", (event) => { const defaultValue = this.data.defaultFieldValue ?? ""; element.value = elementData.userValue = defaultValue; elementData.formattedValue = null; }); let blurListener = (event) => { const { formattedValue } = elementData; if (formattedValue !== null && formattedValue !== undefined) { event.target.value = formattedValue; } event.target.scrollLeft = 0; }; if (this.enableScripting && this.hasJSActions) { element.addEventListener("focus", (event) => { if (elementData.focused) { return; } const { target } = event; if (hasDateOrTime) { target.type = datetimeType; if (timeStep) { target.step = timeStep; } } if (elementData.userValue) { const value = elementData.userValue; if (hasDateOrTime) { if (datetimeType === "time") { const date = new Date(value); const parts = [ date.getHours(), date.getMinutes(), date.getSeconds() ]; target.value = parts.map((v$3) => v$3.toString().padStart(2, "0")).join(":"); } else { target.value = new Date(value - TIMEZONE_OFFSET).toISOString().split(datetimeType === "date" ? "T" : ".", 1)[0]; } } else { target.value = value; } } elementData.lastCommittedValue = target.value; elementData.commitKey = 1; if (!this.data.actions?.Focus) { elementData.focused = true; } }); element.addEventListener("updatefromsandbox", (jsEvent) => { this.showElementAndHideCanvas(jsEvent.target); const actions = { value(event) { elementData.userValue = event.detail.value ?? ""; if (!hasDateOrTime) { storage.setValue(id, { value: elementData.userValue.toString() }); } event.target.value = elementData.userValue; }, formattedValue(event) { const { formattedValue } = event.detail; elementData.formattedValue = formattedValue; if (formattedValue !== null && formattedValue !== undefined && event.target !== document.activeElement) { event.target.value = formattedValue; } const data = { formattedValue }; if (hasDateOrTime) { data.value = formattedValue; } storage.setValue(id, data); }, selRange(event) { event.target.setSelectionRange(...event.detail.selRange); }, charLimit: (event) => { const { charLimit } = event.detail; const { target } = event; if (charLimit === 0) { target.removeAttribute("maxLength"); return; } target.setAttribute("maxLength", charLimit); let value = elementData.userValue; if (!value || value.length <= charLimit) { return; } value = value.slice(0, charLimit); target.value = elementData.userValue = value; storage.setValue(id, { value }); this.linkService.eventBus?.dispatch("dispatcheventinsandbox", { source: this, detail: { id, name: "Keystroke", value, willCommit: true, commitKey: 1, selStart: target.selectionStart, selEnd: target.selectionEnd } }); } }; this._dispatchEventFromSandbox(actions, jsEvent); }); element.addEventListener("keydown", (event) => { elementData.commitKey = 1; let commitKey = -1; if (event.key === "Escape") { commitKey = 0; } else if (event.key === "Enter" && !this.data.multiLine) { commitKey = 2; } else if (event.key === "Tab") { elementData.commitKey = 3; } if (commitKey === -1) { return; } const { value } = event.target; if (elementData.lastCommittedValue === value) { return; } elementData.lastCommittedValue = value; elementData.userValue = value; this.linkService.eventBus?.dispatch("dispatcheventinsandbox", { source: this, detail: { id, name: "Keystroke", value, willCommit: true, commitKey, selStart: event.target.selectionStart, selEnd: event.target.selectionEnd } }); }); const _blurListener = blurListener; blurListener = null; element.addEventListener("blur", (event) => { if (!elementData.focused || !event.relatedTarget) { return; } if (!this.data.actions?.Blur) { elementData.focused = false; } const { target } = event; let { value } = target; if (hasDateOrTime) { if (value && datetimeType === "time") { const parts = value.split(":").map((v$3) => parseInt(v$3, 10)); value = new Date(2e3, 0, 1, parts[0], parts[1], parts[2] || 0).valueOf(); target.step = ""; } else { if (!value.includes("T")) { value = `${value}T00:00`; } value = new Date(value).valueOf(); } target.type = "text"; } elementData.userValue = value; if (elementData.lastCommittedValue !== value) { this.linkService.eventBus?.dispatch("dispatcheventinsandbox", { source: this, detail: { id, name: "Keystroke", value, willCommit: true, commitKey: elementData.commitKey, selStart: event.target.selectionStart, selEnd: event.target.selectionEnd } }); } _blurListener(event); }); if (this.data.actions?.Keystroke) { element.addEventListener("beforeinput", (event) => { elementData.lastCommittedValue = null; const { data, target } = event; const { value, selectionStart, selectionEnd } = target; let selStart = selectionStart, selEnd = selectionEnd; switch (event.inputType) { case "deleteWordBackward": { const match = value.substring(0, selectionStart).match(/\w*[^\w]*$/); if (match) { selStart -= match[0].length; } break; } case "deleteWordForward": { const match = value.substring(selectionStart).match(/^[^\w]*\w*/); if (match) { selEnd += match[0].length; } break; } case "deleteContentBackward": if (selectionStart === selectionEnd) { selStart -= 1; } break; case "deleteContentForward": if (selectionStart === selectionEnd) { selEnd += 1; } break; } event.preventDefault(); this.linkService.eventBus?.dispatch("dispatcheventinsandbox", { source: this, detail: { id, name: "Keystroke", value, change: data || "", willCommit: false, selStart, selEnd } }); }); } this._setEventListeners(element, elementData, [ ["focus", "Focus"], ["blur", "Blur"], ["mousedown", "Mouse Down"], ["mouseenter", "Mouse Enter"], ["mouseleave", "Mouse Exit"], ["mouseup", "Mouse Up"] ], (event) => event.target.value); } if (blurListener) { element.addEventListener("blur", blurListener); } if (this.data.comb) { const fieldWidth = this.data.rect[2] - this.data.rect[0]; const combWidth = fieldWidth / maxLen; element.classList.add("comb"); element.style.letterSpacing = `calc(${combWidth}px * var(--total-scale-factor) - 1ch)`; } } else { element = document.createElement("div"); element.textContent = this.data.fieldValue; element.style.verticalAlign = "middle"; element.style.display = "table-cell"; if (this.data.hasOwnCanvas) { element.hidden = true; } } this._setTextStyle(element); this._setBackgroundColor(element); this._setDefaultPropertiesFromJS(element); this.container.append(element); return this.container; } }; SignatureWidgetAnnotationElement = class extends WidgetAnnotationElement { constructor(parameters) { super(parameters, { isRenderable: !!parameters.data.hasOwnCanvas }); } }; CheckboxWidgetAnnotationElement = class extends WidgetAnnotationElement { constructor(parameters) { super(parameters, { isRenderable: parameters.renderForms }); } render() { const storage = this.annotationStorage; const data = this.data; const id = data.id; let value = storage.getValue(id, { value: data.exportValue === data.fieldValue }).value; if (typeof value === "string") { value = value !== "Off"; storage.setValue(id, { value }); } this.container.classList.add("buttonWidgetAnnotation", "checkBox"); const element = document.createElement("input"); GetElementsByNameSet.add(element); element.setAttribute("data-element-id", id); element.disabled = data.readOnly; this._setRequired(element, this.data.required); element.type = "checkbox"; element.name = data.fieldName; if (value) { element.setAttribute("checked", true); } element.setAttribute("exportValue", data.exportValue); element.tabIndex = 0; element.addEventListener("change", (event) => { const { name, checked } = event.target; for (const checkbox of this._getElementsByName(name, id)) { const curChecked = checked && checkbox.exportValue === data.exportValue; if (checkbox.domElement) { checkbox.domElement.checked = curChecked; } storage.setValue(checkbox.id, { value: curChecked }); } storage.setValue(id, { value: checked }); }); element.addEventListener("resetform", (event) => { const defaultValue = data.defaultFieldValue || "Off"; event.target.checked = defaultValue === data.exportValue; }); if (this.enableScripting && this.hasJSActions) { element.addEventListener("updatefromsandbox", (jsEvent) => { const actions = { value(event) { event.target.checked = event.detail.value !== "Off"; storage.setValue(id, { value: event.target.checked }); } }; this._dispatchEventFromSandbox(actions, jsEvent); }); this._setEventListeners(element, null, [ ["change", "Validate"], ["change", "Action"], ["focus", "Focus"], ["blur", "Blur"], ["mousedown", "Mouse Down"], ["mouseenter", "Mouse Enter"], ["mouseleave", "Mouse Exit"], ["mouseup", "Mouse Up"] ], (event) => event.target.checked); } this._setBackgroundColor(element); this._setDefaultPropertiesFromJS(element); this.container.append(element); return this.container; } }; RadioButtonWidgetAnnotationElement = class extends WidgetAnnotationElement { constructor(parameters) { super(parameters, { isRenderable: parameters.renderForms }); } render() { this.container.classList.add("buttonWidgetAnnotation", "radioButton"); const storage = this.annotationStorage; const data = this.data; const id = data.id; let value = storage.getValue(id, { value: data.fieldValue === data.buttonValue }).value; if (typeof value === "string") { value = value !== data.buttonValue; storage.setValue(id, { value }); } if (value) { for (const radio of this._getElementsByName(data.fieldName, id)) { storage.setValue(radio.id, { value: false }); } } const element = document.createElement("input"); GetElementsByNameSet.add(element); element.setAttribute("data-element-id", id); element.disabled = data.readOnly; this._setRequired(element, this.data.required); element.type = "radio"; element.name = data.fieldName; if (value) { element.setAttribute("checked", true); } element.tabIndex = 0; element.addEventListener("change", (event) => { const { name, checked } = event.target; for (const radio of this._getElementsByName(name, id)) { storage.setValue(radio.id, { value: false }); } storage.setValue(id, { value: checked }); }); element.addEventListener("resetform", (event) => { const defaultValue = data.defaultFieldValue; event.target.checked = defaultValue !== null && defaultValue !== undefined && defaultValue === data.buttonValue; }); if (this.enableScripting && this.hasJSActions) { const pdfButtonValue = data.buttonValue; element.addEventListener("updatefromsandbox", (jsEvent) => { const actions = { value: (event) => { const checked = pdfButtonValue === event.detail.value; for (const radio of this._getElementsByName(event.target.name)) { const curChecked = checked && radio.id === id; if (radio.domElement) { radio.domElement.checked = curChecked; } storage.setValue(radio.id, { value: curChecked }); } } }; this._dispatchEventFromSandbox(actions, jsEvent); }); this._setEventListeners(element, null, [ ["change", "Validate"], ["change", "Action"], ["focus", "Focus"], ["blur", "Blur"], ["mousedown", "Mouse Down"], ["mouseenter", "Mouse Enter"], ["mouseleave", "Mouse Exit"], ["mouseup", "Mouse Up"] ], (event) => event.target.checked); } this._setBackgroundColor(element); this._setDefaultPropertiesFromJS(element); this.container.append(element); return this.container; } }; PushButtonWidgetAnnotationElement = class extends LinkAnnotationElement { constructor(parameters) { super(parameters, { ignoreBorder: parameters.data.hasAppearance }); } render() { const container = super.render(); container.classList.add("buttonWidgetAnnotation", "pushButton"); const linkElement = container.lastChild; if (this.enableScripting && this.hasJSActions && linkElement) { this._setDefaultPropertiesFromJS(linkElement); linkElement.addEventListener("updatefromsandbox", (jsEvent) => { this._dispatchEventFromSandbox({}, jsEvent); }); } return container; } }; ChoiceWidgetAnnotationElement = class extends WidgetAnnotationElement { constructor(parameters) { super(parameters, { isRenderable: parameters.renderForms }); } render() { this.container.classList.add("choiceWidgetAnnotation"); const storage = this.annotationStorage; const id = this.data.id; const storedData = storage.getValue(id, { value: this.data.fieldValue }); const selectElement = document.createElement("select"); GetElementsByNameSet.add(selectElement); selectElement.setAttribute("data-element-id", id); selectElement.disabled = this.data.readOnly; this._setRequired(selectElement, this.data.required); selectElement.name = this.data.fieldName; selectElement.tabIndex = 0; let addAnEmptyEntry = this.data.combo && this.data.options.length > 0; if (!this.data.combo) { selectElement.size = this.data.options.length; if (this.data.multiSelect) { selectElement.multiple = true; } } selectElement.addEventListener("resetform", (event) => { const defaultValue = this.data.defaultFieldValue; for (const option of selectElement.options) { option.selected = option.value === defaultValue; } }); for (const option of this.data.options) { const optionElement = document.createElement("option"); optionElement.textContent = option.displayValue; optionElement.value = option.exportValue; if (storedData.value.includes(option.exportValue)) { optionElement.setAttribute("selected", true); addAnEmptyEntry = false; } selectElement.append(optionElement); } let removeEmptyEntry = null; if (addAnEmptyEntry) { const noneOptionElement = document.createElement("option"); noneOptionElement.value = " "; noneOptionElement.setAttribute("hidden", true); noneOptionElement.setAttribute("selected", true); selectElement.prepend(noneOptionElement); removeEmptyEntry = () => { noneOptionElement.remove(); selectElement.removeEventListener("input", removeEmptyEntry); removeEmptyEntry = null; }; selectElement.addEventListener("input", removeEmptyEntry); } const getValue = (isExport) => { const name = isExport ? "value" : "textContent"; const { options, multiple } = selectElement; if (!multiple) { return options.selectedIndex === -1 ? null : options[options.selectedIndex][name]; } return Array.prototype.filter.call(options, (option) => option.selected).map((option) => option[name]); }; let selectedValues = getValue(false); const getItems = (event) => { const options = event.target.options; return Array.prototype.map.call(options, (option) => ({ displayValue: option.textContent, exportValue: option.value })); }; if (this.enableScripting && this.hasJSActions) { selectElement.addEventListener("updatefromsandbox", (jsEvent) => { const actions = { value(event) { removeEmptyEntry?.(); const value = event.detail.value; const values = new Set(Array.isArray(value) ? value : [value]); for (const option of selectElement.options) { option.selected = values.has(option.value); } storage.setValue(id, { value: getValue(true) }); selectedValues = getValue(false); }, multipleSelection(event) { selectElement.multiple = true; }, remove(event) { const options = selectElement.options; const index = event.detail.remove; options[index].selected = false; selectElement.remove(index); if (options.length > 0) { const i$7 = Array.prototype.findIndex.call(options, (option) => option.selected); if (i$7 === -1) { options[0].selected = true; } } storage.setValue(id, { value: getValue(true), items: getItems(event) }); selectedValues = getValue(false); }, clear(event) { while (selectElement.length !== 0) { selectElement.remove(0); } storage.setValue(id, { value: null, items: [] }); selectedValues = getValue(false); }, insert(event) { const { index, displayValue, exportValue } = event.detail.insert; const selectChild = selectElement.children[index]; const optionElement = document.createElement("option"); optionElement.textContent = displayValue; optionElement.value = exportValue; if (selectChild) { selectChild.before(optionElement); } else { selectElement.append(optionElement); } storage.setValue(id, { value: getValue(true), items: getItems(event) }); selectedValues = getValue(false); }, items(event) { const { items } = event.detail; while (selectElement.length !== 0) { selectElement.remove(0); } for (const item of items) { const { displayValue, exportValue } = item; const optionElement = document.createElement("option"); optionElement.textContent = displayValue; optionElement.value = exportValue; selectElement.append(optionElement); } if (selectElement.options.length > 0) { selectElement.options[0].selected = true; } storage.setValue(id, { value: getValue(true), items: getItems(event) }); selectedValues = getValue(false); }, indices(event) { const indices = new Set(event.detail.indices); for (const option of event.target.options) { option.selected = indices.has(option.index); } storage.setValue(id, { value: getValue(true) }); selectedValues = getValue(false); }, editable(event) { event.target.disabled = !event.detail.editable; } }; this._dispatchEventFromSandbox(actions, jsEvent); }); selectElement.addEventListener("input", (event) => { const exportValue = getValue(true); const change = getValue(false); storage.setValue(id, { value: exportValue }); event.preventDefault(); this.linkService.eventBus?.dispatch("dispatcheventinsandbox", { source: this, detail: { id, name: "Keystroke", value: selectedValues, change, changeEx: exportValue, willCommit: false, commitKey: 1, keyDown: false } }); }); this._setEventListeners(selectElement, null, [ ["focus", "Focus"], ["blur", "Blur"], ["mousedown", "Mouse Down"], ["mouseenter", "Mouse Enter"], ["mouseleave", "Mouse Exit"], ["mouseup", "Mouse Up"], ["input", "Action"], ["input", "Validate"] ], (event) => event.target.value); } else { selectElement.addEventListener("input", function(event) { storage.setValue(id, { value: getValue(true) }); }); } if (this.data.combo) { this._setTextStyle(selectElement); } else {} this._setBackgroundColor(selectElement); this._setDefaultPropertiesFromJS(selectElement); this.container.append(selectElement); return this.container; } }; PopupAnnotationElement = class extends AnnotationElement { constructor(parameters) { const { data, elements, parent } = parameters; const hasCommentManager = !!parent._commentManager; super(parameters, { isRenderable: !hasCommentManager && AnnotationElement._hasPopupData(data) }); this.elements = elements; if (hasCommentManager && AnnotationElement._hasPopupData(data)) { const popup = this.popup = this.#createPopup(); for (const element of elements) { element.popup = popup; } } else { this.popup = null; } } #createPopup() { return new PopupElement({ container: this.container, color: this.data.color, titleObj: this.data.titleObj, modificationDate: this.data.modificationDate || this.data.creationDate, contentsObj: this.data.contentsObj, richText: this.data.richText, rect: this.data.rect, parentRect: this.data.parentRect || null, parent: this.parent, elements: this.elements, open: this.data.open, commentManager: this.parent._commentManager }); } render() { const { container } = this; container.classList.add("popupAnnotation"); container.role = "comment"; const popup = this.popup = this.#createPopup(); const elementIds = []; for (const element of this.elements) { element.popup = popup; element.container.ariaHasPopup = "dialog"; elementIds.push(element.data.id); element.addHighlightArea(); } this.container.setAttribute("aria-controls", elementIds.map((id) => `${AnnotationPrefix}${id}`).join(",")); return this.container; } }; PopupElement = class { #commentManager = null; #boundKeyDown = this.#keyDown.bind(this); #boundHide = this.#hide.bind(this); #boundShow = this.#show.bind(this); #boundToggle = this.#toggle.bind(this); #color = null; #container = null; #contentsObj = null; #dateObj = null; #elements = null; #parent = null; #parentRect = null; #pinned = false; #popup = null; #popupAbortController = null; #position = null; #commentButton = null; #commentButtonPosition = null; #popupPosition = null; #rect = null; #richText = null; #titleObj = null; #updates = null; #wasVisible = false; #firstElement = null; #commentText = null; constructor({ container, color, elements, titleObj, modificationDate, contentsObj, richText, parent, rect, parentRect, open: open$1, commentManager = null }) { this.#container = container; this.#titleObj = titleObj; this.#contentsObj = contentsObj; this.#richText = richText; this.#parent = parent; this.#color = color; this.#rect = rect; this.#parentRect = parentRect; this.#elements = elements; this.#commentManager = commentManager; this.#firstElement = elements[0]; this.#dateObj = PDFDateString.toDateObject(modificationDate); this.trigger = elements.flatMap((e$10) => e$10.getElementsToTriggerPopup()); if (!commentManager) { this.#addEventListeners(); this.#container.hidden = true; if (open$1) { this.#toggle(); } } } #addEventListeners() { if (this.#popupAbortController) { return; } this.#popupAbortController = new AbortController(); const { signal } = this.#popupAbortController; for (const element of this.trigger) { element.addEventListener("click", this.#boundToggle, { signal }); element.addEventListener("pointerenter", this.#boundShow, { signal }); element.addEventListener("pointerleave", this.#boundHide, { signal }); element.classList.add("popupTriggerArea"); } for (const element of this.#elements) { element.container?.addEventListener("keydown", this.#boundKeyDown, { signal }); } } #setCommentButtonPosition() { const element = this.#elements.find((e$10) => e$10.hasCommentButton); if (!element) { return; } this.#commentButtonPosition = element._normalizePoint(element.commentButtonPosition); } renderCommentButton() { if (this.#commentButton) { if (!this.#commentButton.parentNode) { this.#firstElement.container.after(this.#commentButton); } return; } if (!this.#commentButtonPosition) { this.#setCommentButtonPosition(); } if (!this.#commentButtonPosition) { return; } const { signal } = this.#popupAbortController = new AbortController(); const hasOwnButton = this.#firstElement.hasOwnCommentButton; const togglePopup = () => { this.#commentManager.toggleCommentPopup(this, true, undefined, !hasOwnButton); }; const showPopup = () => { this.#commentManager.toggleCommentPopup(this, false, true, !hasOwnButton); }; const hidePopup = () => { this.#commentManager.toggleCommentPopup(this, false, false); }; if (!hasOwnButton) { const button = this.#commentButton = document.createElement("button"); button.className = "annotationCommentButton"; const parentContainer = this.#firstElement.container; button.style.zIndex = parentContainer.style.zIndex + 1; button.tabIndex = 0; button.ariaHasPopup = "dialog"; button.ariaControls = "commentPopup"; button.setAttribute("data-l10n-id", "pdfjs-show-comment-button"); this.#updateColor(); this.#updateCommentButtonPosition(); button.addEventListener("keydown", this.#boundKeyDown, { signal }); button.addEventListener("click", togglePopup, { signal }); button.addEventListener("pointerenter", showPopup, { signal }); button.addEventListener("pointerleave", hidePopup, { signal }); parentContainer.after(button); } else { this.#commentButton = this.#firstElement.container; for (const element of this.trigger) { element.ariaHasPopup = "dialog"; element.ariaControls = "commentPopup"; element.addEventListener("keydown", this.#boundKeyDown, { signal }); element.addEventListener("click", togglePopup, { signal }); element.addEventListener("pointerenter", showPopup, { signal }); element.addEventListener("pointerleave", hidePopup, { signal }); element.classList.add("popupTriggerArea"); } } } #updateCommentButtonPosition() { if (this.#firstElement.extraPopupElement && !this.#firstElement.editor) { return; } if (!this.#commentButton) { this.renderCommentButton(); } const [x$2, y$3] = this.#commentButtonPosition; const { style } = this.#commentButton; style.left = `calc(${x$2}%)`; style.top = `calc(${y$3}% - var(--comment-button-dim))`; } #updateColor() { if (this.#firstElement.extraPopupElement) { return; } if (!this.#commentButton) { this.renderCommentButton(); } this.#commentButton.style.backgroundColor = this.commentButtonColor || ""; } get commentButtonColor() { const { color, opacity } = this.#firstElement.commentData; if (!color) { return null; } return this.#parent._commentManager.makeCommentColor(color, opacity); } focusCommentButton() { setTimeout(() => { this.#commentButton?.focus(); }, 0); } getData() { const { richText, color, opacity, creationDate, modificationDate } = this.#firstElement.commentData; return { contentsObj: { str: this.comment }, richText, color, opacity, creationDate, modificationDate }; } get elementBeforePopup() { return this.#commentButton; } get comment() { this.#commentText ||= this.#firstElement.commentText; return this.#commentText; } set comment(text$2) { if (text$2 === this.comment) { return; } this.#firstElement.commentText = this.#commentText = text$2; } focus() { this.#firstElement.container?.focus(); } get parentBoundingClientRect() { return this.#firstElement.layer.getBoundingClientRect(); } setCommentButtonStates({ selected, hasPopup }) { if (!this.#commentButton) { return; } this.#commentButton.classList.toggle("selected", selected); this.#commentButton.ariaExpanded = hasPopup; } setSelectedCommentButton(selected) { this.#commentButton.classList.toggle("selected", selected); } get commentPopupPosition() { if (this.#popupPosition) { return this.#popupPosition; } const { x: x$2, y: y$3, height } = this.#commentButton.getBoundingClientRect(); const { x: parentX, y: parentY, width: parentWidth, height: parentHeight } = this.#firstElement.layer.getBoundingClientRect(); return [(x$2 - parentX) / parentWidth, (y$3 + height - parentY) / parentHeight]; } set commentPopupPosition(pos) { this.#popupPosition = pos; } hasDefaultPopupPosition() { return this.#popupPosition === null; } get commentButtonPosition() { return this.#commentButtonPosition; } get commentButtonWidth() { return this.#commentButton.getBoundingClientRect().width / this.parentBoundingClientRect.width; } editComment(options) { const [posX, posY] = this.#popupPosition || this.commentButtonPosition.map((x$2) => x$2 / 100); const parentDimensions = this.parentBoundingClientRect; const { x: parentX, y: parentY, width: parentWidth, height: parentHeight } = parentDimensions; this.#commentManager.showDialog(null, this, parentX + posX * parentWidth, parentY + posY * parentHeight, { ...options, parentDimensions }); } render() { if (this.#popup) { return; } const popup = this.#popup = document.createElement("div"); popup.className = "popup"; if (this.#color) { const baseColor = popup.style.outlineColor = Util.makeHexColor(...this.#color); popup.style.backgroundColor = `color-mix(in srgb, ${baseColor} 30%, white)`; } const header = document.createElement("span"); header.className = "header"; if (this.#titleObj?.str) { const title = document.createElement("span"); title.className = "title"; header.append(title); ({dir: title.dir, str: title.textContent} = this.#titleObj); } popup.append(header); if (this.#dateObj) { const modificationDate = document.createElement("time"); modificationDate.className = "popupDate"; modificationDate.setAttribute("data-l10n-id", "pdfjs-annotation-date-time-string"); modificationDate.setAttribute("data-l10n-args", JSON.stringify({ dateObj: this.#dateObj.valueOf() })); modificationDate.dateTime = this.#dateObj.toISOString(); header.append(modificationDate); } renderRichText({ html: this.#html || this.#contentsObj.str, dir: this.#contentsObj?.dir, className: "popupContent" }, popup); this.#container.append(popup); } get #html() { const richText = this.#richText; const contentsObj = this.#contentsObj; if (richText?.str && (!contentsObj?.str || contentsObj.str === richText.str)) { return this.#richText.html || null; } return null; } get #fontSize() { return this.#html?.attributes?.style?.fontSize || 0; } get #fontColor() { return this.#html?.attributes?.style?.color || null; } #makePopupContent(text$2) { const popupLines = []; const popupContent = { str: text$2, html: { name: "div", attributes: { dir: "auto" }, children: [{ name: "p", children: popupLines }] } }; const lineAttributes = { style: { color: this.#fontColor, fontSize: this.#fontSize ? `calc(${this.#fontSize}px * var(--total-scale-factor))` : "" } }; for (const line of text$2.split("\n")) { popupLines.push({ name: "span", value: line, attributes: lineAttributes }); } return popupContent; } #keyDown(event) { if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) { return; } if (event.key === "Enter" || event.key === "Escape" && this.#pinned) { this.#toggle(); } } updateEdited({ rect, popup, deleted }) { if (this.#commentManager) { if (deleted) { this.remove(); this.#commentText = null; } else if (popup) { if (popup.deleted) { this.remove(); } else { this.#updateColor(); this.#commentText = popup.text; } } if (rect) { this.#commentButtonPosition = null; this.#setCommentButtonPosition(); this.#updateCommentButtonPosition(); } return; } if (deleted || popup?.deleted) { this.remove(); return; } this.#addEventListeners(); this.#updates ||= { contentsObj: this.#contentsObj, richText: this.#richText }; if (rect) { this.#position = null; } if (popup && popup.text) { this.#richText = this.#makePopupContent(popup.text); this.#dateObj = PDFDateString.toDateObject(popup.date); this.#contentsObj = null; } this.#popup?.remove(); this.#popup = null; } resetEdited() { if (!this.#updates) { return; } ({contentsObj: this.#contentsObj, richText: this.#richText} = this.#updates); this.#updates = null; this.#popup?.remove(); this.#popup = null; this.#position = null; } remove() { this.#popupAbortController?.abort(); this.#popupAbortController = null; this.#popup?.remove(); this.#popup = null; this.#wasVisible = false; this.#pinned = false; this.#commentButton?.remove(); this.#commentButton = null; if (this.trigger) { for (const element of this.trigger) { element.classList.remove("popupTriggerArea"); } } } #setPosition() { if (this.#position !== null) { return; } const { page: { view }, viewport: { rawDims: { pageWidth, pageHeight, pageX, pageY } } } = this.#parent; let useParentRect = !!this.#parentRect; let rect = useParentRect ? this.#parentRect : this.#rect; for (const element of this.#elements) { if (!rect || Util.intersect(element.data.rect, rect) !== null) { rect = element.data.rect; useParentRect = true; break; } } const normalizedRect = Util.normalizeRect([ rect[0], view[3] - rect[1] + view[1], rect[2], view[3] - rect[3] + view[1] ]); const HORIZONTAL_SPACE_AFTER_ANNOTATION = 5; const parentWidth = useParentRect ? rect[2] - rect[0] + HORIZONTAL_SPACE_AFTER_ANNOTATION : 0; const popupLeft = normalizedRect[0] + parentWidth; const popupTop = normalizedRect[1]; this.#position = [100 * (popupLeft - pageX) / pageWidth, 100 * (popupTop - pageY) / pageHeight]; const { style } = this.#container; style.left = `${this.#position[0]}%`; style.top = `${this.#position[1]}%`; } #toggle() { if (this.#commentManager) { this.#commentManager.toggleCommentPopup(this, false); return; } this.#pinned = !this.#pinned; if (this.#pinned) { this.#show(); this.#container.addEventListener("click", this.#boundToggle); this.#container.addEventListener("keydown", this.#boundKeyDown); } else { this.#hide(); this.#container.removeEventListener("click", this.#boundToggle); this.#container.removeEventListener("keydown", this.#boundKeyDown); } } #show() { if (!this.#popup) { this.render(); } if (!this.isVisible) { this.#setPosition(); this.#container.hidden = false; this.#container.style.zIndex = parseInt(this.#container.style.zIndex) + 1e3; } else if (this.#pinned) { this.#container.classList.add("focused"); } } #hide() { this.#container.classList.remove("focused"); if (this.#pinned || !this.isVisible) { return; } this.#container.hidden = true; this.#container.style.zIndex = parseInt(this.#container.style.zIndex) - 1e3; } forceHide() { this.#wasVisible = this.isVisible; if (!this.#wasVisible) { return; } this.#container.hidden = true; } maybeShow() { if (this.#commentManager) { return; } this.#addEventListeners(); if (!this.#wasVisible) { return; } if (!this.#popup) { this.#show(); } this.#wasVisible = false; this.#container.hidden = false; } get isVisible() { if (this.#commentManager) { return false; } return this.#container.hidden === false; } }; FreeTextAnnotationElement = class extends AnnotationElement { constructor(parameters) { super(parameters, { isRenderable: true, ignoreBorder: true }); this.textContent = parameters.data.textContent; this.textPosition = parameters.data.textPosition; this.annotationEditorType = AnnotationEditorType.FREETEXT; } render() { this.container.classList.add("freeTextAnnotation"); if (this.textContent) { const content = this.contentElement = document.createElement("div"); content.classList.add("annotationTextContent"); content.setAttribute("role", "comment"); for (const line of this.textContent) { const lineSpan = document.createElement("span"); lineSpan.textContent = line; content.append(lineSpan); } this.container.append(content); } if (!this.data.popupRef && this.hasPopupData) { this.hasOwnCommentButton = true; this._createPopup(); } this._editOnDoubleClick(); return this.container; } }; LineAnnotationElement = class extends AnnotationElement { #line = null; constructor(parameters) { super(parameters, { isRenderable: true, ignoreBorder: true }); } render() { this.container.classList.add("lineAnnotation"); const { data, width, height } = this; const svg = this.svgFactory.create(width, height, true); const line = this.#line = this.svgFactory.createElement("svg:line"); line.setAttribute("x1", data.rect[2] - data.lineCoordinates[0]); line.setAttribute("y1", data.rect[3] - data.lineCoordinates[1]); line.setAttribute("x2", data.rect[2] - data.lineCoordinates[2]); line.setAttribute("y2", data.rect[3] - data.lineCoordinates[3]); line.setAttribute("stroke-width", data.borderStyle.width || 1); line.setAttribute("stroke", "transparent"); line.setAttribute("fill", "transparent"); svg.append(line); this.container.append(svg); if (!data.popupRef && this.hasPopupData) { this.hasOwnCommentButton = true; this._createPopup(); } return this.container; } getElementsToTriggerPopup() { return this.#line; } addHighlightArea() { this.container.classList.add("highlightArea"); } }; SquareAnnotationElement = class extends AnnotationElement { #square = null; constructor(parameters) { super(parameters, { isRenderable: true, ignoreBorder: true }); } render() { this.container.classList.add("squareAnnotation"); const { data, width, height } = this; const svg = this.svgFactory.create(width, height, true); const borderWidth = data.borderStyle.width; const square = this.#square = this.svgFactory.createElement("svg:rect"); square.setAttribute("x", borderWidth / 2); square.setAttribute("y", borderWidth / 2); square.setAttribute("width", width - borderWidth); square.setAttribute("height", height - borderWidth); square.setAttribute("stroke-width", borderWidth || 1); square.setAttribute("stroke", "transparent"); square.setAttribute("fill", "transparent"); svg.append(square); this.container.append(svg); if (!data.popupRef && this.hasPopupData) { this.hasOwnCommentButton = true; this._createPopup(); } return this.container; } getElementsToTriggerPopup() { return this.#square; } addHighlightArea() { this.container.classList.add("highlightArea"); } }; CircleAnnotationElement = class extends AnnotationElement { #circle = null; constructor(parameters) { super(parameters, { isRenderable: true, ignoreBorder: true }); } render() { this.container.classList.add("circleAnnotation"); const { data, width, height } = this; const svg = this.svgFactory.create(width, height, true); const borderWidth = data.borderStyle.width; const circle = this.#circle = this.svgFactory.createElement("svg:ellipse"); circle.setAttribute("cx", width / 2); circle.setAttribute("cy", height / 2); circle.setAttribute("rx", width / 2 - borderWidth / 2); circle.setAttribute("ry", height / 2 - borderWidth / 2); circle.setAttribute("stroke-width", borderWidth || 1); circle.setAttribute("stroke", "transparent"); circle.setAttribute("fill", "transparent"); svg.append(circle); this.container.append(svg); if (!data.popupRef && this.hasPopupData) { this.hasOwnCommentButton = true; this._createPopup(); } return this.container; } getElementsToTriggerPopup() { return this.#circle; } addHighlightArea() { this.container.classList.add("highlightArea"); } }; PolylineAnnotationElement = class extends AnnotationElement { #polyline = null; constructor(parameters) { super(parameters, { isRenderable: true, ignoreBorder: true }); this.containerClassName = "polylineAnnotation"; this.svgElementName = "svg:polyline"; } render() { this.container.classList.add(this.containerClassName); const { data: { rect, vertices, borderStyle, popupRef }, width, height } = this; if (!vertices) { return this.container; } const svg = this.svgFactory.create(width, height, true); let points = []; for (let i$7 = 0, ii = vertices.length; i$7 < ii; i$7 += 2) { const x$2 = vertices[i$7] - rect[0]; const y$3 = rect[3] - vertices[i$7 + 1]; points.push(`${x$2},${y$3}`); } points = points.join(" "); const polyline = this.#polyline = this.svgFactory.createElement(this.svgElementName); polyline.setAttribute("points", points); polyline.setAttribute("stroke-width", borderStyle.width || 1); polyline.setAttribute("stroke", "transparent"); polyline.setAttribute("fill", "transparent"); svg.append(polyline); this.container.append(svg); if (!popupRef && this.hasPopupData) { this.hasOwnCommentButton = true; this._createPopup(); } return this.container; } getElementsToTriggerPopup() { return this.#polyline; } addHighlightArea() { this.container.classList.add("highlightArea"); } }; PolygonAnnotationElement = class extends PolylineAnnotationElement { constructor(parameters) { super(parameters); this.containerClassName = "polygonAnnotation"; this.svgElementName = "svg:polygon"; } }; CaretAnnotationElement = class extends AnnotationElement { constructor(parameters) { super(parameters, { isRenderable: true, ignoreBorder: true }); } render() { this.container.classList.add("caretAnnotation"); if (!this.data.popupRef && this.hasPopupData) { this.hasOwnCommentButton = true; this._createPopup(); } return this.container; } }; InkAnnotationElement = class extends AnnotationElement { #polylinesGroupElement = null; #polylines = []; constructor(parameters) { super(parameters, { isRenderable: true, ignoreBorder: true }); this.containerClassName = "inkAnnotation"; this.svgElementName = "svg:polyline"; this.annotationEditorType = this.data.it === "InkHighlight" ? AnnotationEditorType.HIGHLIGHT : AnnotationEditorType.INK; } #getTransform(rotation, rect) { switch (rotation) { case 90: return { transform: `rotate(90) translate(${-rect[0]},${rect[1]}) scale(1,-1)`, width: rect[3] - rect[1], height: rect[2] - rect[0] }; case 180: return { transform: `rotate(180) translate(${-rect[2]},${rect[1]}) scale(1,-1)`, width: rect[2] - rect[0], height: rect[3] - rect[1] }; case 270: return { transform: `rotate(270) translate(${-rect[2]},${rect[3]}) scale(1,-1)`, width: rect[3] - rect[1], height: rect[2] - rect[0] }; default: return { transform: `translate(${-rect[0]},${rect[3]}) scale(1,-1)`, width: rect[2] - rect[0], height: rect[3] - rect[1] }; } } render() { this.container.classList.add(this.containerClassName); const { data: { rect, rotation, inkLists, borderStyle, popupRef } } = this; const { transform, width, height } = this.#getTransform(rotation, rect); const svg = this.svgFactory.create(width, height, true); const g$1 = this.#polylinesGroupElement = this.svgFactory.createElement("svg:g"); svg.append(g$1); g$1.setAttribute("stroke-width", borderStyle.width || 1); g$1.setAttribute("stroke-linecap", "round"); g$1.setAttribute("stroke-linejoin", "round"); g$1.setAttribute("stroke-miterlimit", 10); g$1.setAttribute("stroke", "transparent"); g$1.setAttribute("fill", "transparent"); g$1.setAttribute("transform", transform); for (let i$7 = 0, ii = inkLists.length; i$7 < ii; i$7++) { const polyline = this.svgFactory.createElement(this.svgElementName); this.#polylines.push(polyline); polyline.setAttribute("points", inkLists[i$7].join(",")); g$1.append(polyline); } if (!popupRef && this.hasPopupData) { this.hasOwnCommentButton = true; this._createPopup(); } this.container.append(svg); this._editOnDoubleClick(); return this.container; } updateEdited(params) { super.updateEdited(params); const { thickness, points, rect } = params; const g$1 = this.#polylinesGroupElement; if (thickness >= 0) { g$1.setAttribute("stroke-width", thickness || 1); } if (points) { for (let i$7 = 0, ii = this.#polylines.length; i$7 < ii; i$7++) { this.#polylines[i$7].setAttribute("points", points[i$7].join(",")); } } if (rect) { const { transform, width, height } = this.#getTransform(this.data.rotation, rect); const root = g$1.parentElement; root.setAttribute("viewBox", `0 0 ${width} ${height}`); g$1.setAttribute("transform", transform); } } getElementsToTriggerPopup() { return this.#polylines; } addHighlightArea() { this.container.classList.add("highlightArea"); } }; HighlightAnnotationElement = class extends AnnotationElement { constructor(parameters) { super(parameters, { isRenderable: true, ignoreBorder: true, createQuadrilaterals: true }); this.annotationEditorType = AnnotationEditorType.HIGHLIGHT; } render() { const { data: { overlaidText, popupRef } } = this; if (!popupRef && this.hasPopupData) { this.hasOwnCommentButton = true; this._createPopup(); } this.container.classList.add("highlightAnnotation"); this._editOnDoubleClick(); if (overlaidText) { const mark = document.createElement("mark"); mark.classList.add("overlaidText"); mark.textContent = overlaidText; this.container.append(mark); } return this.container; } }; UnderlineAnnotationElement = class extends AnnotationElement { constructor(parameters) { super(parameters, { isRenderable: true, ignoreBorder: true, createQuadrilaterals: true }); } render() { const { data: { overlaidText, popupRef } } = this; if (!popupRef && this.hasPopupData) { this.hasOwnCommentButton = true; this._createPopup(); } this.container.classList.add("underlineAnnotation"); if (overlaidText) { const underline = document.createElement("u"); underline.classList.add("overlaidText"); underline.textContent = overlaidText; this.container.append(underline); } return this.container; } }; SquigglyAnnotationElement = class extends AnnotationElement { constructor(parameters) { super(parameters, { isRenderable: true, ignoreBorder: true, createQuadrilaterals: true }); } render() { const { data: { overlaidText, popupRef } } = this; if (!popupRef && this.hasPopupData) { this.hasOwnCommentButton = true; this._createPopup(); } this.container.classList.add("squigglyAnnotation"); if (overlaidText) { const underline = document.createElement("u"); underline.classList.add("overlaidText"); underline.textContent = overlaidText; this.container.append(underline); } return this.container; } }; StrikeOutAnnotationElement = class extends AnnotationElement { constructor(parameters) { super(parameters, { isRenderable: true, ignoreBorder: true, createQuadrilaterals: true }); } render() { const { data: { overlaidText, popupRef } } = this; if (!popupRef && this.hasPopupData) { this.hasOwnCommentButton = true; this._createPopup(); } this.container.classList.add("strikeoutAnnotation"); if (overlaidText) { const strikeout = document.createElement("s"); strikeout.classList.add("overlaidText"); strikeout.textContent = overlaidText; this.container.append(strikeout); } return this.container; } }; StampAnnotationElement = class extends AnnotationElement { constructor(parameters) { super(parameters, { isRenderable: true, ignoreBorder: true }); this.annotationEditorType = AnnotationEditorType.STAMP; } render() { this.container.classList.add("stampAnnotation"); this.container.setAttribute("role", "img"); if (!this.data.popupRef && this.hasPopupData) { this.hasOwnCommentButton = true; this._createPopup(); } this._editOnDoubleClick(); return this.container; } }; FileAttachmentAnnotationElement = class extends AnnotationElement { #trigger = null; constructor(parameters) { super(parameters, { isRenderable: true }); const { file } = this.data; this.filename = file.filename; this.content = file.content; this.linkService.eventBus?.dispatch("fileattachmentannotation", { source: this, ...file }); } render() { this.container.classList.add("fileAttachmentAnnotation"); const { container, data } = this; let trigger; if (data.hasAppearance || data.fillAlpha === 0) { trigger = document.createElement("div"); } else { trigger = document.createElement("img"); trigger.src = `${this.imageResourcesPath}annotation-${/paperclip/i.test(data.name) ? "paperclip" : "pushpin"}.svg`; if (data.fillAlpha && data.fillAlpha < 1) { trigger.style = `filter: opacity(${Math.round(data.fillAlpha * 100)}%);`; } } trigger.addEventListener("dblclick", this.#download.bind(this)); this.#trigger = trigger; const { isMac } = util_FeatureTest.platform; container.addEventListener("keydown", (evt) => { if (evt.key === "Enter" && (isMac ? evt.metaKey : evt.ctrlKey)) { this.#download(); } }); if (!data.popupRef && this.hasPopupData) { this.hasOwnCommentButton = true; this._createPopup(); } else { trigger.classList.add("popupTriggerArea"); } container.append(trigger); return container; } getElementsToTriggerPopup() { return this.#trigger; } addHighlightArea() { this.container.classList.add("highlightArea"); } #download() { this.downloadManager?.openOrDownloadData(this.content, this.filename); } }; AnnotationLayer = class AnnotationLayer { #accessibilityManager = null; #annotationCanvasMap = null; #annotationStorage = null; #editableAnnotations = new Map(); #structTreeLayer = null; #linkService = null; #elements = []; #hasAriaAttributesFromStructTree = false; constructor({ div, accessibilityManager, annotationCanvasMap, annotationEditorUIManager, page, viewport, structTreeLayer, commentManager, linkService, annotationStorage }) { this.div = div; this.#accessibilityManager = accessibilityManager; this.#annotationCanvasMap = annotationCanvasMap; this.#structTreeLayer = structTreeLayer || null; this.#linkService = linkService || null; this.#annotationStorage = annotationStorage || new AnnotationStorage(); this.page = page; this.viewport = viewport; this.zIndex = 0; this._annotationEditorUIManager = annotationEditorUIManager; this._commentManager = commentManager || null; } hasEditableAnnotations() { return this.#editableAnnotations.size > 0; } async render(params) { const { annotations } = params; const layer = this.div; setLayerDimensions(layer, this.viewport); const popupToElements = new Map(); const popupAnnotations = []; const elementParams = { data: null, layer, linkService: this.#linkService, downloadManager: params.downloadManager, imageResourcesPath: params.imageResourcesPath || "", renderForms: params.renderForms !== false, svgFactory: new DOMSVGFactory(), annotationStorage: this.#annotationStorage, enableComment: params.enableComment === true, enableScripting: params.enableScripting === true, hasJSActions: params.hasJSActions, fieldObjects: params.fieldObjects, parent: this, elements: null }; for (const data of annotations) { if (data.noHTML) { continue; } const isPopupAnnotation = data.annotationType === AnnotationType.POPUP; if (!isPopupAnnotation) { if (data.rect[2] === data.rect[0] || data.rect[3] === data.rect[1]) { continue; } } else { const elements = popupToElements.get(data.id); if (!elements) { continue; } if (!this._commentManager) { popupAnnotations.push(data); continue; } elementParams.elements = elements; } elementParams.data = data; const element = AnnotationElementFactory.create(elementParams); if (!element.isRenderable) { continue; } if (!isPopupAnnotation) { this.#elements.push(element); if (data.popupRef) { const elements = popupToElements.get(data.popupRef); if (!elements) { popupToElements.set(data.popupRef, [element]); } else { elements.push(element); } } } const rendered = element.render(); if (data.hidden) { rendered.style.visibility = "hidden"; } if (element._isEditable) { this.#editableAnnotations.set(element.data.id, element); this._annotationEditorUIManager?.renderAnnotationElement(element); } } await this.#addElementsToDOM(); for (const data of popupAnnotations) { const elements = elementParams.elements = popupToElements.get(data.id); elementParams.data = data; const element = AnnotationElementFactory.create(elementParams); if (!element.isRenderable) { continue; } const rendered = element.render(); element.contentElement.id = `${AnnotationPrefix}${data.id}`; if (data.hidden) { rendered.style.visibility = "hidden"; } elements.at(-1).container.after(rendered); } this.#setAnnotationCanvasMap(); } async #addElementsToDOM() { if (this.#elements.length === 0) { return; } this.div.replaceChildren(); const promises = []; if (!this.#hasAriaAttributesFromStructTree) { this.#hasAriaAttributesFromStructTree = true; for (const { contentElement, data: { id } } of this.#elements) { const annotationId = contentElement.id = `${AnnotationPrefix}${id}`; promises.push(this.#structTreeLayer?.getAriaAttributes(annotationId).then((ariaAttributes) => { if (ariaAttributes) { for (const [key, value] of ariaAttributes) { contentElement.setAttribute(key, value); } } })); } } this.#elements.sort(({ data: { rect: [a0, a1, a2, a3] } }, { data: { rect: [b0, b1, b2, b3] } }) => { if (a0 === a2 && a1 === a3) { return +1; } if (b0 === b2 && b1 === b3) { return -1; } const top1 = a3; const bot1 = a1; const mid1 = (a1 + a3) / 2; const top2 = b3; const bot2 = b1; const mid2 = (b1 + b3) / 2; if (mid1 >= top2 && mid2 <= bot1) { return -1; } if (mid2 >= top1 && mid1 <= bot2) { return +1; } const centerX1 = (a0 + a2) / 2; const centerX2 = (b0 + b2) / 2; return centerX1 - centerX2; }); const fragment = document.createDocumentFragment(); for (const element of this.#elements) { fragment.append(element.container); if (this._commentManager) { (element.extraPopupElement?.popup || element.popup)?.renderCommentButton(); } else if (element.extraPopupElement) { fragment.append(element.extraPopupElement.render()); } } this.div.append(fragment); await Promise.all(promises); if (this.#accessibilityManager) { for (const element of this.#elements) { this.#accessibilityManager.addPointerInTextLayer(element.contentElement, false); } } } async addLinkAnnotations(annotations) { const elementParams = { data: null, layer: this.div, linkService: this.#linkService, svgFactory: new DOMSVGFactory(), parent: this }; for (const data of annotations) { data.borderStyle ||= AnnotationLayer._defaultBorderStyle; elementParams.data = data; const element = AnnotationElementFactory.create(elementParams); if (!element.isRenderable) { continue; } element.render(); element.contentElement.id = `${AnnotationPrefix}${data.id}`; this.#elements.push(element); } await this.#addElementsToDOM(); } update({ viewport }) { const layer = this.div; this.viewport = viewport; setLayerDimensions(layer, { rotation: viewport.rotation }); this.#setAnnotationCanvasMap(); layer.hidden = false; } #setAnnotationCanvasMap() { if (!this.#annotationCanvasMap) { return; } const layer = this.div; for (const [id, canvas] of this.#annotationCanvasMap) { const element = layer.querySelector(`[data-annotation-id="${id}"]`); if (!element) { continue; } canvas.className = "annotationContent"; const { firstChild } = element; if (!firstChild) { element.append(canvas); } else if (firstChild.nodeName === "CANVAS") { firstChild.replaceWith(canvas); } else if (!firstChild.classList.contains("annotationContent")) { firstChild.before(canvas); } else { firstChild.after(canvas); } const editableAnnotation = this.#editableAnnotations.get(id); if (!editableAnnotation) { continue; } if (editableAnnotation._hasNoCanvas) { this._annotationEditorUIManager?.setMissingCanvas(id, element.id, canvas); editableAnnotation._hasNoCanvas = false; } else { editableAnnotation.canvas = canvas; } } this.#annotationCanvasMap.clear(); } getEditableAnnotations() { return Array.from(this.#editableAnnotations.values()); } getEditableAnnotation(id) { return this.#editableAnnotations.get(id); } addFakeAnnotation(editor) { const { div } = this; const { id, rotation } = editor; const element = new EditorAnnotationElement({ data: { id, rect: editor.getPDFRect(), rotation }, editor, layer: div, parent: this, enableComment: !!this._commentManager, linkService: this.#linkService, annotationStorage: this.#annotationStorage }); element.render(); element.contentElement.id = `${AnnotationPrefix}${id}`; element.createOrUpdatePopup(); this.#elements.push(element); return element; } removeAnnotation(id) { const index = this.#elements.findIndex((el) => el.data.id === id); if (index < 0) { return; } const [element] = this.#elements.splice(index, 1); this.#accessibilityManager?.removePointerInTextLayer(element.contentElement); } updateFakeAnnotations(editors) { if (editors.length === 0) { return; } for (const editor of editors) { editor.updateFakeAnnotationElement(this); } this.#addElementsToDOM(); } togglePointerEvents(enabled = false) { this.div.classList.toggle("disabled", !enabled); } static get _defaultBorderStyle() { return shadow(this, "_defaultBorderStyle", Object.freeze({ width: 1, rawWidth: 1, style: AnnotationBorderStyleType.SOLID, dashArray: [3], horizontalCornerRadius: 0, verticalCornerRadius: 0 })); } }; ; EOL_PATTERN = /\r\n?|\n/g; FreeTextEditor = class FreeTextEditor extends AnnotationEditor { #content = ""; #editorDivId = `${this.id}-editor`; #editModeAC = null; #fontSize; _colorPicker = null; static _freeTextDefaultContent = ""; static _internalPadding = 0; static _defaultColor = null; static _defaultFontSize = 10; static get _keyboardManager() { const proto = FreeTextEditor.prototype; const arrowChecker = (self$1) => self$1.isEmpty(); const small = AnnotationEditorUIManager.TRANSLATE_SMALL; const big = AnnotationEditorUIManager.TRANSLATE_BIG; return shadow(this, "_keyboardManager", new KeyboardManager([ [ [ "ctrl+s", "mac+meta+s", "ctrl+p", "mac+meta+p" ], proto.commitOrRemove, { bubbles: true } ], [[ "ctrl+Enter", "mac+meta+Enter", "Escape", "mac+Escape" ], proto.commitOrRemove], [ ["ArrowLeft", "mac+ArrowLeft"], proto._translateEmpty, { args: [-small, 0], checker: arrowChecker } ], [ ["ctrl+ArrowLeft", "mac+shift+ArrowLeft"], proto._translateEmpty, { args: [-big, 0], checker: arrowChecker } ], [ ["ArrowRight", "mac+ArrowRight"], proto._translateEmpty, { args: [small, 0], checker: arrowChecker } ], [ ["ctrl+ArrowRight", "mac+shift+ArrowRight"], proto._translateEmpty, { args: [big, 0], checker: arrowChecker } ], [ ["ArrowUp", "mac+ArrowUp"], proto._translateEmpty, { args: [0, -small], checker: arrowChecker } ], [ ["ctrl+ArrowUp", "mac+shift+ArrowUp"], proto._translateEmpty, { args: [0, -big], checker: arrowChecker } ], [ ["ArrowDown", "mac+ArrowDown"], proto._translateEmpty, { args: [0, small], checker: arrowChecker } ], [ ["ctrl+ArrowDown", "mac+shift+ArrowDown"], proto._translateEmpty, { args: [0, big], checker: arrowChecker } ] ])); } static _type = "freetext"; static _editorType = AnnotationEditorType.FREETEXT; constructor(params) { super({ ...params, name: "freeTextEditor" }); this.color = params.color || FreeTextEditor._defaultColor || AnnotationEditor._defaultLineColor; this.#fontSize = params.fontSize || FreeTextEditor._defaultFontSize; if (!this.annotationElementId) { this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert"); } this.canAddComment = false; } static initialize(l10n, uiManager) { AnnotationEditor.initialize(l10n, uiManager); const style = getComputedStyle(document.documentElement); this._internalPadding = parseFloat(style.getPropertyValue("--freetext-padding")); } static updateDefaultParams(type, value) { switch (type) { case AnnotationEditorParamsType.FREETEXT_SIZE: FreeTextEditor._defaultFontSize = value; break; case AnnotationEditorParamsType.FREETEXT_COLOR: FreeTextEditor._defaultColor = value; break; } } updateParams(type, value) { switch (type) { case AnnotationEditorParamsType.FREETEXT_SIZE: this.#updateFontSize(value); break; case AnnotationEditorParamsType.FREETEXT_COLOR: this.#updateColor(value); break; } } static get defaultPropertiesToUpdate() { return [[AnnotationEditorParamsType.FREETEXT_SIZE, FreeTextEditor._defaultFontSize], [AnnotationEditorParamsType.FREETEXT_COLOR, FreeTextEditor._defaultColor || AnnotationEditor._defaultLineColor]]; } get propertiesToUpdate() { return [[AnnotationEditorParamsType.FREETEXT_SIZE, this.#fontSize], [AnnotationEditorParamsType.FREETEXT_COLOR, this.color]]; } get toolbarButtons() { this._colorPicker ||= new BasicColorPicker(this); return [["colorPicker", this._colorPicker]]; } get colorType() { return AnnotationEditorParamsType.FREETEXT_COLOR; } #updateFontSize(fontSize) { const setFontsize = (size) => { this.editorDiv.style.fontSize = `calc(${size}px * var(--total-scale-factor))`; this.translate(0, -(size - this.#fontSize) * this.parentScale); this.#fontSize = size; this.#setEditorDimensions(); }; const savedFontsize = this.#fontSize; this.addCommands({ cmd: setFontsize.bind(this, fontSize), undo: setFontsize.bind(this, savedFontsize), post: this._uiManager.updateUI.bind(this._uiManager, this), mustExec: true, type: AnnotationEditorParamsType.FREETEXT_SIZE, overwriteIfSameType: true, keepUndo: true }); } onUpdatedColor() { this.editorDiv.style.color = this.color; this._colorPicker?.update(this.color); super.onUpdatedColor(); } #updateColor(color) { const setColor = (col) => { this.color = col; this.onUpdatedColor(); }; const savedColor = this.color; this.addCommands({ cmd: setColor.bind(this, color), undo: setColor.bind(this, savedColor), post: this._uiManager.updateUI.bind(this._uiManager, this), mustExec: true, type: AnnotationEditorParamsType.FREETEXT_COLOR, overwriteIfSameType: true, keepUndo: true }); } _translateEmpty(x$2, y$3) { this._uiManager.translateSelectedEditors(x$2, y$3, true); } getInitialTranslation() { const scale = this.parentScale; return [-FreeTextEditor._internalPadding * scale, -(FreeTextEditor._internalPadding + this.#fontSize) * scale]; } rebuild() { if (!this.parent) { return; } super.rebuild(); if (this.div === null) { return; } if (!this.isAttachedToDOM) { this.parent.add(this); } } enableEditMode() { if (!super.enableEditMode()) { return false; } this.overlayDiv.classList.remove("enabled"); this.editorDiv.contentEditable = true; this._isDraggable = false; this.div.removeAttribute("aria-activedescendant"); this.#editModeAC = new AbortController(); const signal = this._uiManager.combinedSignal(this.#editModeAC); this.editorDiv.addEventListener("keydown", this.editorDivKeydown.bind(this), { signal }); this.editorDiv.addEventListener("focus", this.editorDivFocus.bind(this), { signal }); this.editorDiv.addEventListener("blur", this.editorDivBlur.bind(this), { signal }); this.editorDiv.addEventListener("input", this.editorDivInput.bind(this), { signal }); this.editorDiv.addEventListener("paste", this.editorDivPaste.bind(this), { signal }); return true; } disableEditMode() { if (!super.disableEditMode()) { return false; } this.overlayDiv.classList.add("enabled"); this.editorDiv.contentEditable = false; this.div.setAttribute("aria-activedescendant", this.#editorDivId); this._isDraggable = true; this.#editModeAC?.abort(); this.#editModeAC = null; this.div.focus({ preventScroll: true }); this.isEditing = false; this.parent.div.classList.add("freetextEditing"); return true; } focusin(event) { if (!this._focusEventsAllowed) { return; } super.focusin(event); if (event.target !== this.editorDiv) { this.editorDiv.focus(); } } onceAdded(focus) { if (this.width) { return; } this.enableEditMode(); if (focus) { this.editorDiv.focus(); } if (this._initialOptions?.isCentered) { this.center(); } this._initialOptions = null; } isEmpty() { return !this.editorDiv || this.editorDiv.innerText.trim() === ""; } remove() { this.isEditing = false; if (this.parent) { this.parent.setEditingState(true); this.parent.div.classList.add("freetextEditing"); } super.remove(); } #extractText() { const buffer = []; this.editorDiv.normalize(); let prevChild = null; for (const child of this.editorDiv.childNodes) { if (prevChild?.nodeType === Node.TEXT_NODE && child.nodeName === "BR") { continue; } buffer.push(FreeTextEditor.#getNodeContent(child)); prevChild = child; } return buffer.join("\n"); } #setEditorDimensions() { const [parentWidth, parentHeight] = this.parentDimensions; let rect; if (this.isAttachedToDOM) { rect = this.div.getBoundingClientRect(); } else { const { currentLayer, div } = this; const savedDisplay = div.style.display; const savedVisibility = div.classList.contains("hidden"); div.classList.remove("hidden"); div.style.display = "hidden"; currentLayer.div.append(this.div); rect = div.getBoundingClientRect(); div.remove(); div.style.display = savedDisplay; div.classList.toggle("hidden", savedVisibility); } if (this.rotation % 180 === this.parentRotation % 180) { this.width = rect.width / parentWidth; this.height = rect.height / parentHeight; } else { this.width = rect.height / parentWidth; this.height = rect.width / parentHeight; } this.fixAndSetPosition(); } commit() { if (!this.isInEditMode()) { return; } super.commit(); this.disableEditMode(); const savedText = this.#content; const newText = this.#content = this.#extractText().trimEnd(); if (savedText === newText) { return; } const setText = (text$2) => { this.#content = text$2; if (!text$2) { this.remove(); return; } this.#setContent(); this._uiManager.rebuild(this); this.#setEditorDimensions(); }; this.addCommands({ cmd: () => { setText(newText); }, undo: () => { setText(savedText); }, mustExec: false }); this.#setEditorDimensions(); } shouldGetKeyboardEvents() { return this.isInEditMode(); } enterInEditMode() { this.enableEditMode(); this.editorDiv.focus(); } keydown(event) { if (event.target === this.div && event.key === "Enter") { this.enterInEditMode(); event.preventDefault(); } } editorDivKeydown(event) { FreeTextEditor._keyboardManager.exec(this, event); } editorDivFocus(event) { this.isEditing = true; } editorDivBlur(event) { this.isEditing = false; } editorDivInput(event) { this.parent.div.classList.toggle("freetextEditing", this.isEmpty()); } disableEditing() { this.editorDiv.setAttribute("role", "comment"); this.editorDiv.removeAttribute("aria-multiline"); } enableEditing() { this.editorDiv.setAttribute("role", "textbox"); this.editorDiv.setAttribute("aria-multiline", true); } get canChangeContent() { return true; } render() { if (this.div) { return this.div; } let baseX, baseY; if (this._isCopy || this.annotationElementId) { baseX = this.x; baseY = this.y; } super.render(); this.editorDiv = document.createElement("div"); this.editorDiv.className = "internal"; this.editorDiv.setAttribute("id", this.#editorDivId); this.editorDiv.setAttribute("data-l10n-id", "pdfjs-free-text2"); this.editorDiv.setAttribute("data-l10n-attrs", "default-content"); this.enableEditing(); this.editorDiv.contentEditable = true; const { style } = this.editorDiv; style.fontSize = `calc(${this.#fontSize}px * var(--total-scale-factor))`; style.color = this.color; this.div.append(this.editorDiv); this.overlayDiv = document.createElement("div"); this.overlayDiv.classList.add("overlay", "enabled"); this.div.append(this.overlayDiv); if (this._isCopy || this.annotationElementId) { const [parentWidth, parentHeight] = this.parentDimensions; if (this.annotationElementId) { const { position } = this._initialData; let [tx, ty] = this.getInitialTranslation(); [tx, ty] = this.pageTranslationToScreen(tx, ty); const [pageWidth, pageHeight] = this.pageDimensions; const [pageX, pageY] = this.pageTranslation; let posX, posY; switch (this.rotation) { case 0: posX = baseX + (position[0] - pageX) / pageWidth; posY = baseY + this.height - (position[1] - pageY) / pageHeight; break; case 90: posX = baseX + (position[0] - pageX) / pageWidth; posY = baseY - (position[1] - pageY) / pageHeight; [tx, ty] = [ty, -tx]; break; case 180: posX = baseX - this.width + (position[0] - pageX) / pageWidth; posY = baseY - (position[1] - pageY) / pageHeight; [tx, ty] = [-tx, -ty]; break; case 270: posX = baseX + (position[0] - pageX - this.height * pageHeight) / pageWidth; posY = baseY + (position[1] - pageY - this.width * pageWidth) / pageHeight; [tx, ty] = [-ty, tx]; break; } this.setAt(posX * parentWidth, posY * parentHeight, tx, ty); } else { this._moveAfterPaste(baseX, baseY); } this.#setContent(); this._isDraggable = true; this.editorDiv.contentEditable = false; } else { this._isDraggable = false; this.editorDiv.contentEditable = true; } return this.div; } static #getNodeContent(node) { return (node.nodeType === Node.TEXT_NODE ? node.nodeValue : node.innerText).replaceAll(EOL_PATTERN, ""); } editorDivPaste(event) { const clipboardData = event.clipboardData || window.clipboardData; const { types } = clipboardData; if (types.length === 1 && types[0] === "text/plain") { return; } event.preventDefault(); const paste = FreeTextEditor.#deserializeContent(clipboardData.getData("text") || "").replaceAll(EOL_PATTERN, "\n"); if (!paste) { return; } const selection = window.getSelection(); if (!selection.rangeCount) { return; } this.editorDiv.normalize(); selection.deleteFromDocument(); const range = selection.getRangeAt(0); if (!paste.includes("\n")) { range.insertNode(document.createTextNode(paste)); this.editorDiv.normalize(); selection.collapseToStart(); return; } const { startContainer, startOffset } = range; const bufferBefore = []; const bufferAfter = []; if (startContainer.nodeType === Node.TEXT_NODE) { const parent = startContainer.parentElement; bufferAfter.push(startContainer.nodeValue.slice(startOffset).replaceAll(EOL_PATTERN, "")); if (parent !== this.editorDiv) { let buffer = bufferBefore; for (const child of this.editorDiv.childNodes) { if (child === parent) { buffer = bufferAfter; continue; } buffer.push(FreeTextEditor.#getNodeContent(child)); } } bufferBefore.push(startContainer.nodeValue.slice(0, startOffset).replaceAll(EOL_PATTERN, "")); } else if (startContainer === this.editorDiv) { let buffer = bufferBefore; let i$7 = 0; for (const child of this.editorDiv.childNodes) { if (i$7++ === startOffset) { buffer = bufferAfter; } buffer.push(FreeTextEditor.#getNodeContent(child)); } } this.#content = `${bufferBefore.join("\n")}${paste}${bufferAfter.join("\n")}`; this.#setContent(); const newRange = new Range(); let beforeLength = Math.sumPrecise(bufferBefore.map((line) => line.length)); for (const { firstChild } of this.editorDiv.childNodes) { if (firstChild.nodeType === Node.TEXT_NODE) { const length = firstChild.nodeValue.length; if (beforeLength <= length) { newRange.setStart(firstChild, beforeLength); newRange.setEnd(firstChild, beforeLength); break; } beforeLength -= length; } } selection.removeAllRanges(); selection.addRange(newRange); } #setContent() { this.editorDiv.replaceChildren(); if (!this.#content) { return; } for (const line of this.#content.split("\n")) { const div = document.createElement("div"); div.append(line ? document.createTextNode(line) : document.createElement("br")); this.editorDiv.append(div); } } #serializeContent() { return this.#content.replaceAll("\xA0", " "); } static #deserializeContent(content) { return content.replaceAll(" ", "\xA0"); } get contentDiv() { return this.editorDiv; } getPDFRect() { const padding = FreeTextEditor._internalPadding * this.parentScale; return this.getRect(padding, padding); } static async deserialize(data, parent, uiManager) { let initialData = null; if (data instanceof FreeTextAnnotationElement) { const { data: { defaultAppearanceData: { fontSize, fontColor }, rect, rotation, id, popupRef, richText, contentsObj, creationDate, modificationDate }, textContent, textPosition, parent: { page: { pageNumber } } } = data; if (!textContent || textContent.length === 0) { return null; } initialData = data = { annotationType: AnnotationEditorType.FREETEXT, color: Array.from(fontColor), fontSize, value: textContent.join("\n"), position: textPosition, pageIndex: pageNumber - 1, rect: rect.slice(0), rotation, annotationElementId: id, id, deleted: false, popupRef, comment: contentsObj?.str || null, richText, creationDate, modificationDate }; } const editor = await super.deserialize(data, parent, uiManager); editor.#fontSize = data.fontSize; editor.color = Util.makeHexColor(...data.color); editor.#content = FreeTextEditor.#deserializeContent(data.value); editor._initialData = initialData; if (data.comment) { editor.setCommentData(data); } return editor; } serialize(isForCopying = false) { if (this.isEmpty()) { return null; } if (this.deleted) { return this.serializeDeleted(); } const color = AnnotationEditor._colorManager.convert(this.isAttachedToDOM ? getComputedStyle(this.editorDiv).color : this.color); const serialized = Object.assign(super.serialize(isForCopying), { color, fontSize: this.#fontSize, value: this.#serializeContent() }); this.addComment(serialized); if (isForCopying) { serialized.isCopy = true; return serialized; } if (this.annotationElementId && !this.#hasElementChanged(serialized)) { return null; } serialized.id = this.annotationElementId; return serialized; } #hasElementChanged(serialized) { const { value, fontSize, color, pageIndex } = this._initialData; return this.hasEditedComment || this._hasBeenMoved || serialized.value !== value || serialized.fontSize !== fontSize || serialized.color.some((c$7, i$7) => c$7 !== color[i$7]) || serialized.pageIndex !== pageIndex; } renderAnnotationElement(annotation) { const content = super.renderAnnotationElement(annotation); if (!content) { return null; } const { style } = content; style.fontSize = `calc(${this.#fontSize}px * var(--total-scale-factor))`; style.color = this.color; content.replaceChildren(); for (const line of this.#content.split("\n")) { const div = document.createElement("div"); div.append(line ? document.createTextNode(line) : document.createElement("br")); content.append(div); } annotation.updateEdited({ rect: this.getPDFRect(), popup: this._uiManager.hasCommentManager() || this.hasEditedComment ? this.comment : { text: this.#content } }); return content; } resetAnnotationElement(annotation) { super.resetAnnotationElement(annotation); annotation.resetEdited(); } }; ; Outline = class { static PRECISION = 1e-4; toSVGPath() { unreachable("Abstract method `toSVGPath` must be implemented."); } get box() { unreachable("Abstract getter `box` must be implemented."); } serialize(_bbox, _rotation) { unreachable("Abstract method `serialize` must be implemented."); } static _rescale(src, tx, ty, sx, sy, dest) { dest ||= new Float32Array(src.length); for (let i$7 = 0, ii = src.length; i$7 < ii; i$7 += 2) { dest[i$7] = tx + src[i$7] * sx; dest[i$7 + 1] = ty + src[i$7 + 1] * sy; } return dest; } static _rescaleAndSwap(src, tx, ty, sx, sy, dest) { dest ||= new Float32Array(src.length); for (let i$7 = 0, ii = src.length; i$7 < ii; i$7 += 2) { dest[i$7] = tx + src[i$7 + 1] * sx; dest[i$7 + 1] = ty + src[i$7] * sy; } return dest; } static _translate(src, tx, ty, dest) { dest ||= new Float32Array(src.length); for (let i$7 = 0, ii = src.length; i$7 < ii; i$7 += 2) { dest[i$7] = tx + src[i$7]; dest[i$7 + 1] = ty + src[i$7 + 1]; } return dest; } static svgRound(x$2) { return Math.round(x$2 * 1e4); } static _normalizePoint(x$2, y$3, parentWidth, parentHeight, rotation) { switch (rotation) { case 90: return [1 - y$3 / parentWidth, x$2 / parentHeight]; case 180: return [1 - x$2 / parentWidth, 1 - y$3 / parentHeight]; case 270: return [y$3 / parentWidth, 1 - x$2 / parentHeight]; default: return [x$2 / parentWidth, y$3 / parentHeight]; } } static _normalizePagePoint(x$2, y$3, rotation) { switch (rotation) { case 90: return [1 - y$3, x$2]; case 180: return [1 - x$2, 1 - y$3]; case 270: return [y$3, 1 - x$2]; default: return [x$2, y$3]; } } static createBezierPoints(x1, y1, x2, y2, x3, y3) { return [ (x1 + 5 * x2) / 6, (y1 + 5 * y2) / 6, (5 * x2 + x3) / 6, (5 * y2 + y3) / 6, (x2 + x3) / 2, (y2 + y3) / 2 ]; } }; ; FreeDrawOutliner = class FreeDrawOutliner { #box; #bottom = []; #innerMargin; #isLTR; #top = []; #last = new Float32Array(18); #lastX; #lastY; #min; #min_dist; #scaleFactor; #thickness; #points = []; static #MIN_DIST = 8; static #MIN_DIFF = 2; static #MIN = FreeDrawOutliner.#MIN_DIST + FreeDrawOutliner.#MIN_DIFF; constructor({ x: x$2, y: y$3 }, box, scaleFactor, thickness, isLTR, innerMargin = 0) { this.#box = box; this.#thickness = thickness * scaleFactor; this.#isLTR = isLTR; this.#last.set([ NaN, NaN, NaN, NaN, x$2, y$3 ], 6); this.#innerMargin = innerMargin; this.#min_dist = FreeDrawOutliner.#MIN_DIST * scaleFactor; this.#min = FreeDrawOutliner.#MIN * scaleFactor; this.#scaleFactor = scaleFactor; this.#points.push(x$2, y$3); } isEmpty() { return isNaN(this.#last[8]); } #getLastCoords() { const lastTop = this.#last.subarray(4, 6); const lastBottom = this.#last.subarray(16, 18); const [x$2, y$3, width, height] = this.#box; return [ (this.#lastX + (lastTop[0] - lastBottom[0]) / 2 - x$2) / width, (this.#lastY + (lastTop[1] - lastBottom[1]) / 2 - y$3) / height, (this.#lastX + (lastBottom[0] - lastTop[0]) / 2 - x$2) / width, (this.#lastY + (lastBottom[1] - lastTop[1]) / 2 - y$3) / height ]; } add({ x: x$2, y: y$3 }) { this.#lastX = x$2; this.#lastY = y$3; const [layerX, layerY, layerWidth, layerHeight] = this.#box; let [x1, y1, x2, y2] = this.#last.subarray(8, 12); const diffX = x$2 - x2; const diffY = y$3 - y2; const d$5 = Math.hypot(diffX, diffY); if (d$5 < this.#min) { return false; } const diffD = d$5 - this.#min_dist; const K$1 = diffD / d$5; const shiftX = K$1 * diffX; const shiftY = K$1 * diffY; let x0 = x1; let y0 = y1; x1 = x2; y1 = y2; x2 += shiftX; y2 += shiftY; this.#points?.push(x$2, y$3); const nX = -shiftY / diffD; const nY = shiftX / diffD; const thX = nX * this.#thickness; const thY = nY * this.#thickness; this.#last.set(this.#last.subarray(2, 8), 0); this.#last.set([x2 + thX, y2 + thY], 4); this.#last.set(this.#last.subarray(14, 18), 12); this.#last.set([x2 - thX, y2 - thY], 16); if (isNaN(this.#last[6])) { if (this.#top.length === 0) { this.#last.set([x1 + thX, y1 + thY], 2); this.#top.push(NaN, NaN, NaN, NaN, (x1 + thX - layerX) / layerWidth, (y1 + thY - layerY) / layerHeight); this.#last.set([x1 - thX, y1 - thY], 14); this.#bottom.push(NaN, NaN, NaN, NaN, (x1 - thX - layerX) / layerWidth, (y1 - thY - layerY) / layerHeight); } this.#last.set([ x0, y0, x1, y1, x2, y2 ], 6); return !this.isEmpty(); } this.#last.set([ x0, y0, x1, y1, x2, y2 ], 6); const angle = Math.abs(Math.atan2(y0 - y1, x0 - x1) - Math.atan2(shiftY, shiftX)); if (angle < Math.PI / 2) { [x1, y1, x2, y2] = this.#last.subarray(2, 6); this.#top.push(NaN, NaN, NaN, NaN, ((x1 + x2) / 2 - layerX) / layerWidth, ((y1 + y2) / 2 - layerY) / layerHeight); [x1, y1, x0, y0] = this.#last.subarray(14, 18); this.#bottom.push(NaN, NaN, NaN, NaN, ((x0 + x1) / 2 - layerX) / layerWidth, ((y0 + y1) / 2 - layerY) / layerHeight); return true; } [x0, y0, x1, y1, x2, y2] = this.#last.subarray(0, 6); this.#top.push(((x0 + 5 * x1) / 6 - layerX) / layerWidth, ((y0 + 5 * y1) / 6 - layerY) / layerHeight, ((5 * x1 + x2) / 6 - layerX) / layerWidth, ((5 * y1 + y2) / 6 - layerY) / layerHeight, ((x1 + x2) / 2 - layerX) / layerWidth, ((y1 + y2) / 2 - layerY) / layerHeight); [x2, y2, x1, y1, x0, y0] = this.#last.subarray(12, 18); this.#bottom.push(((x0 + 5 * x1) / 6 - layerX) / layerWidth, ((y0 + 5 * y1) / 6 - layerY) / layerHeight, ((5 * x1 + x2) / 6 - layerX) / layerWidth, ((5 * y1 + y2) / 6 - layerY) / layerHeight, ((x1 + x2) / 2 - layerX) / layerWidth, ((y1 + y2) / 2 - layerY) / layerHeight); return true; } toSVGPath() { if (this.isEmpty()) { return ""; } const top = this.#top; const bottom = this.#bottom; if (isNaN(this.#last[6]) && !this.isEmpty()) { return this.#toSVGPathTwoPoints(); } const buffer = []; buffer.push(`M${top[4]} ${top[5]}`); for (let i$7 = 6; i$7 < top.length; i$7 += 6) { if (isNaN(top[i$7])) { buffer.push(`L${top[i$7 + 4]} ${top[i$7 + 5]}`); } else { buffer.push(`C${top[i$7]} ${top[i$7 + 1]} ${top[i$7 + 2]} ${top[i$7 + 3]} ${top[i$7 + 4]} ${top[i$7 + 5]}`); } } this.#toSVGPathEnd(buffer); for (let i$7 = bottom.length - 6; i$7 >= 6; i$7 -= 6) { if (isNaN(bottom[i$7])) { buffer.push(`L${bottom[i$7 + 4]} ${bottom[i$7 + 5]}`); } else { buffer.push(`C${bottom[i$7]} ${bottom[i$7 + 1]} ${bottom[i$7 + 2]} ${bottom[i$7 + 3]} ${bottom[i$7 + 4]} ${bottom[i$7 + 5]}`); } } this.#toSVGPathStart(buffer); return buffer.join(" "); } #toSVGPathTwoPoints() { const [x$2, y$3, width, height] = this.#box; const [lastTopX, lastTopY, lastBottomX, lastBottomY] = this.#getLastCoords(); return `M${(this.#last[2] - x$2) / width} ${(this.#last[3] - y$3) / height} L${(this.#last[4] - x$2) / width} ${(this.#last[5] - y$3) / height} L${lastTopX} ${lastTopY} L${lastBottomX} ${lastBottomY} L${(this.#last[16] - x$2) / width} ${(this.#last[17] - y$3) / height} L${(this.#last[14] - x$2) / width} ${(this.#last[15] - y$3) / height} Z`; } #toSVGPathStart(buffer) { const bottom = this.#bottom; buffer.push(`L${bottom[4]} ${bottom[5]} Z`); } #toSVGPathEnd(buffer) { const [x$2, y$3, width, height] = this.#box; const lastTop = this.#last.subarray(4, 6); const lastBottom = this.#last.subarray(16, 18); const [lastTopX, lastTopY, lastBottomX, lastBottomY] = this.#getLastCoords(); buffer.push(`L${(lastTop[0] - x$2) / width} ${(lastTop[1] - y$3) / height} L${lastTopX} ${lastTopY} L${lastBottomX} ${lastBottomY} L${(lastBottom[0] - x$2) / width} ${(lastBottom[1] - y$3) / height}`); } newFreeDrawOutline(outline, points, box, scaleFactor, innerMargin, isLTR) { return new FreeDrawOutline(outline, points, box, scaleFactor, innerMargin, isLTR); } getOutlines() { const top = this.#top; const bottom = this.#bottom; const last = this.#last; const [layerX, layerY, layerWidth, layerHeight] = this.#box; const points = new Float32Array((this.#points?.length ?? 0) + 2); for (let i$7 = 0, ii = points.length - 2; i$7 < ii; i$7 += 2) { points[i$7] = (this.#points[i$7] - layerX) / layerWidth; points[i$7 + 1] = (this.#points[i$7 + 1] - layerY) / layerHeight; } points[points.length - 2] = (this.#lastX - layerX) / layerWidth; points[points.length - 1] = (this.#lastY - layerY) / layerHeight; if (isNaN(last[6]) && !this.isEmpty()) { return this.#getOutlineTwoPoints(points); } const outline = new Float32Array(this.#top.length + 24 + this.#bottom.length); let N$2 = top.length; for (let i$7 = 0; i$7 < N$2; i$7 += 2) { if (isNaN(top[i$7])) { outline[i$7] = outline[i$7 + 1] = NaN; continue; } outline[i$7] = top[i$7]; outline[i$7 + 1] = top[i$7 + 1]; } N$2 = this.#getOutlineEnd(outline, N$2); for (let i$7 = bottom.length - 6; i$7 >= 6; i$7 -= 6) { for (let j$2 = 0; j$2 < 6; j$2 += 2) { if (isNaN(bottom[i$7 + j$2])) { outline[N$2] = outline[N$2 + 1] = NaN; N$2 += 2; continue; } outline[N$2] = bottom[i$7 + j$2]; outline[N$2 + 1] = bottom[i$7 + j$2 + 1]; N$2 += 2; } } this.#getOutlineStart(outline, N$2); return this.newFreeDrawOutline(outline, points, this.#box, this.#scaleFactor, this.#innerMargin, this.#isLTR); } #getOutlineTwoPoints(points) { const last = this.#last; const [layerX, layerY, layerWidth, layerHeight] = this.#box; const [lastTopX, lastTopY, lastBottomX, lastBottomY] = this.#getLastCoords(); const outline = new Float32Array(36); outline.set([ NaN, NaN, NaN, NaN, (last[2] - layerX) / layerWidth, (last[3] - layerY) / layerHeight, NaN, NaN, NaN, NaN, (last[4] - layerX) / layerWidth, (last[5] - layerY) / layerHeight, NaN, NaN, NaN, NaN, lastTopX, lastTopY, NaN, NaN, NaN, NaN, lastBottomX, lastBottomY, NaN, NaN, NaN, NaN, (last[16] - layerX) / layerWidth, (last[17] - layerY) / layerHeight, NaN, NaN, NaN, NaN, (last[14] - layerX) / layerWidth, (last[15] - layerY) / layerHeight ], 0); return this.newFreeDrawOutline(outline, points, this.#box, this.#scaleFactor, this.#innerMargin, this.#isLTR); } #getOutlineStart(outline, pos) { const bottom = this.#bottom; outline.set([ NaN, NaN, NaN, NaN, bottom[4], bottom[5] ], pos); return pos += 6; } #getOutlineEnd(outline, pos) { const lastTop = this.#last.subarray(4, 6); const lastBottom = this.#last.subarray(16, 18); const [layerX, layerY, layerWidth, layerHeight] = this.#box; const [lastTopX, lastTopY, lastBottomX, lastBottomY] = this.#getLastCoords(); outline.set([ NaN, NaN, NaN, NaN, (lastTop[0] - layerX) / layerWidth, (lastTop[1] - layerY) / layerHeight, NaN, NaN, NaN, NaN, lastTopX, lastTopY, NaN, NaN, NaN, NaN, lastBottomX, lastBottomY, NaN, NaN, NaN, NaN, (lastBottom[0] - layerX) / layerWidth, (lastBottom[1] - layerY) / layerHeight ], pos); return pos += 24; } }; FreeDrawOutline = class extends Outline { #box; #bbox = new Float32Array(4); #innerMargin; #isLTR; #points; #scaleFactor; #outline; constructor(outline, points, box, scaleFactor, innerMargin, isLTR) { super(); this.#outline = outline; this.#points = points; this.#box = box; this.#scaleFactor = scaleFactor; this.#innerMargin = innerMargin; this.#isLTR = isLTR; this.firstPoint = [NaN, NaN]; this.lastPoint = [NaN, NaN]; this.#computeMinMax(isLTR); const [x$2, y$3, width, height] = this.#bbox; for (let i$7 = 0, ii = outline.length; i$7 < ii; i$7 += 2) { outline[i$7] = (outline[i$7] - x$2) / width; outline[i$7 + 1] = (outline[i$7 + 1] - y$3) / height; } for (let i$7 = 0, ii = points.length; i$7 < ii; i$7 += 2) { points[i$7] = (points[i$7] - x$2) / width; points[i$7 + 1] = (points[i$7 + 1] - y$3) / height; } } toSVGPath() { const buffer = [`M${this.#outline[4]} ${this.#outline[5]}`]; for (let i$7 = 6, ii = this.#outline.length; i$7 < ii; i$7 += 6) { if (isNaN(this.#outline[i$7])) { buffer.push(`L${this.#outline[i$7 + 4]} ${this.#outline[i$7 + 5]}`); continue; } buffer.push(`C${this.#outline[i$7]} ${this.#outline[i$7 + 1]} ${this.#outline[i$7 + 2]} ${this.#outline[i$7 + 3]} ${this.#outline[i$7 + 4]} ${this.#outline[i$7 + 5]}`); } buffer.push("Z"); return buffer.join(" "); } serialize([blX, blY, trX, trY], rotation) { const width = trX - blX; const height = trY - blY; let outline; let points; switch (rotation) { case 0: outline = Outline._rescale(this.#outline, blX, trY, width, -height); points = Outline._rescale(this.#points, blX, trY, width, -height); break; case 90: outline = Outline._rescaleAndSwap(this.#outline, blX, blY, width, height); points = Outline._rescaleAndSwap(this.#points, blX, blY, width, height); break; case 180: outline = Outline._rescale(this.#outline, trX, blY, -width, height); points = Outline._rescale(this.#points, trX, blY, -width, height); break; case 270: outline = Outline._rescaleAndSwap(this.#outline, trX, trY, -width, -height); points = Outline._rescaleAndSwap(this.#points, trX, trY, -width, -height); break; } return { outline: Array.from(outline), points: [Array.from(points)] }; } #computeMinMax(isLTR) { const outline = this.#outline; let lastX = outline[4]; let lastY = outline[5]; const minMax = [ lastX, lastY, lastX, lastY ]; let firstPointX = lastX; let firstPointY = lastY; let lastPointX = lastX; let lastPointY = lastY; const ltrCallback = isLTR ? Math.max : Math.min; const bezierBbox = new Float32Array(4); for (let i$7 = 6, ii = outline.length; i$7 < ii; i$7 += 6) { const x$2 = outline[i$7 + 4], y$3 = outline[i$7 + 5]; if (isNaN(outline[i$7])) { Util.pointBoundingBox(x$2, y$3, minMax); if (firstPointY > y$3) { firstPointX = x$2; firstPointY = y$3; } else if (firstPointY === y$3) { firstPointX = ltrCallback(firstPointX, x$2); } if (lastPointY < y$3) { lastPointX = x$2; lastPointY = y$3; } else if (lastPointY === y$3) { lastPointX = ltrCallback(lastPointX, x$2); } } else { bezierBbox[0] = bezierBbox[1] = Infinity; bezierBbox[2] = bezierBbox[3] = -Infinity; Util.bezierBoundingBox(lastX, lastY, ...outline.slice(i$7, i$7 + 6), bezierBbox); Util.rectBoundingBox(bezierBbox[0], bezierBbox[1], bezierBbox[2], bezierBbox[3], minMax); if (firstPointY > bezierBbox[1]) { firstPointX = bezierBbox[0]; firstPointY = bezierBbox[1]; } else if (firstPointY === bezierBbox[1]) { firstPointX = ltrCallback(firstPointX, bezierBbox[0]); } if (lastPointY < bezierBbox[3]) { lastPointX = bezierBbox[2]; lastPointY = bezierBbox[3]; } else if (lastPointY === bezierBbox[3]) { lastPointX = ltrCallback(lastPointX, bezierBbox[2]); } } lastX = x$2; lastY = y$3; } const bbox = this.#bbox; bbox[0] = minMax[0] - this.#innerMargin; bbox[1] = minMax[1] - this.#innerMargin; bbox[2] = minMax[2] - minMax[0] + 2 * this.#innerMargin; bbox[3] = minMax[3] - minMax[1] + 2 * this.#innerMargin; this.firstPoint = [firstPointX, firstPointY]; this.lastPoint = [lastPointX, lastPointY]; } get box() { return this.#bbox; } newOutliner(point, box, scaleFactor, thickness, isLTR, innerMargin = 0) { return new FreeDrawOutliner(point, box, scaleFactor, thickness, isLTR, innerMargin); } getNewOutline(thickness, innerMargin) { const [x$2, y$3, width, height] = this.#bbox; const [layerX, layerY, layerWidth, layerHeight] = this.#box; const sx = width * layerWidth; const sy = height * layerHeight; const tx = x$2 * layerWidth + layerX; const ty = y$3 * layerHeight + layerY; const outliner = this.newOutliner({ x: this.#points[0] * sx + tx, y: this.#points[1] * sy + ty }, this.#box, this.#scaleFactor, thickness, this.#isLTR, innerMargin ?? this.#innerMargin); for (let i$7 = 2; i$7 < this.#points.length; i$7 += 2) { outliner.add({ x: this.#points[i$7] * sx + tx, y: this.#points[i$7 + 1] * sy + ty }); } return outliner.getOutlines(); } }; ; HighlightOutliner = class { #box; #firstPoint; #lastPoint; #verticalEdges = []; #intervals = []; constructor(boxes, borderWidth = 0, innerMargin = 0, isLTR = true) { const minMax = [ Infinity, Infinity, -Infinity, -Infinity ]; const NUMBER_OF_DIGITS = 4; const EPSILON = 10 ** -NUMBER_OF_DIGITS; for (const { x: x$2, y: y$3, width, height } of boxes) { const x1 = Math.floor((x$2 - borderWidth) / EPSILON) * EPSILON; const x2 = Math.ceil((x$2 + width + borderWidth) / EPSILON) * EPSILON; const y1 = Math.floor((y$3 - borderWidth) / EPSILON) * EPSILON; const y2 = Math.ceil((y$3 + height + borderWidth) / EPSILON) * EPSILON; const left = [ x1, y1, y2, true ]; const right = [ x2, y1, y2, false ]; this.#verticalEdges.push(left, right); Util.rectBoundingBox(x1, y1, x2, y2, minMax); } const bboxWidth = minMax[2] - minMax[0] + 2 * innerMargin; const bboxHeight = minMax[3] - minMax[1] + 2 * innerMargin; const shiftedMinX = minMax[0] - innerMargin; const shiftedMinY = minMax[1] - innerMargin; let firstPointX = isLTR ? -Infinity : Infinity; let firstPointY = Infinity; const lastEdge = this.#verticalEdges.at(isLTR ? -1 : -2); const lastPoint = [lastEdge[0], lastEdge[2]]; for (const edge of this.#verticalEdges) { const [x$2, y1, y2, left] = edge; if (!left && isLTR) { if (y1 < firstPointY) { firstPointY = y1; firstPointX = x$2; } else if (y1 === firstPointY) { firstPointX = Math.max(firstPointX, x$2); } } else if (left && !isLTR) { if (y1 < firstPointY) { firstPointY = y1; firstPointX = x$2; } else if (y1 === firstPointY) { firstPointX = Math.min(firstPointX, x$2); } } edge[0] = (x$2 - shiftedMinX) / bboxWidth; edge[1] = (y1 - shiftedMinY) / bboxHeight; edge[2] = (y2 - shiftedMinY) / bboxHeight; } this.#box = new Float32Array([ shiftedMinX, shiftedMinY, bboxWidth, bboxHeight ]); this.#firstPoint = [firstPointX, firstPointY]; this.#lastPoint = lastPoint; } getOutlines() { this.#verticalEdges.sort((a$2, b$3) => a$2[0] - b$3[0] || a$2[1] - b$3[1] || a$2[2] - b$3[2]); const outlineVerticalEdges = []; for (const edge of this.#verticalEdges) { if (edge[3]) { outlineVerticalEdges.push(...this.#breakEdge(edge)); this.#insert(edge); } else { this.#remove(edge); outlineVerticalEdges.push(...this.#breakEdge(edge)); } } return this.#getOutlines(outlineVerticalEdges); } #getOutlines(outlineVerticalEdges) { const edges = []; const allEdges = new Set(); for (const edge of outlineVerticalEdges) { const [x$2, y1, y2] = edge; edges.push([ x$2, y1, edge ], [ x$2, y2, edge ]); } edges.sort((a$2, b$3) => a$2[1] - b$3[1] || a$2[0] - b$3[0]); for (let i$7 = 0, ii = edges.length; i$7 < ii; i$7 += 2) { const edge1 = edges[i$7][2]; const edge2 = edges[i$7 + 1][2]; edge1.push(edge2); edge2.push(edge1); allEdges.add(edge1); allEdges.add(edge2); } const outlines = []; let outline; while (allEdges.size > 0) { const edge = allEdges.values().next().value; let [x$2, y1, y2, edge1, edge2] = edge; allEdges.delete(edge); let lastPointX = x$2; let lastPointY = y1; outline = [x$2, y2]; outlines.push(outline); while (true) { let e$10; if (allEdges.has(edge1)) { e$10 = edge1; } else if (allEdges.has(edge2)) { e$10 = edge2; } else { break; } allEdges.delete(e$10); [x$2, y1, y2, edge1, edge2] = e$10; if (lastPointX !== x$2) { outline.push(lastPointX, lastPointY, x$2, lastPointY === y1 ? y1 : y2); lastPointX = x$2; } lastPointY = lastPointY === y1 ? y2 : y1; } outline.push(lastPointX, lastPointY); } return new HighlightOutline(outlines, this.#box, this.#firstPoint, this.#lastPoint); } #binarySearch(y$3) { const array = this.#intervals; let start = 0; let end = array.length - 1; while (start <= end) { const middle = start + end >> 1; const y1 = array[middle][0]; if (y1 === y$3) { return middle; } if (y1 < y$3) { start = middle + 1; } else { end = middle - 1; } } return end + 1; } #insert([, y1, y2]) { const index = this.#binarySearch(y1); this.#intervals.splice(index, 0, [y1, y2]); } #remove([, y1, y2]) { const index = this.#binarySearch(y1); for (let i$7 = index; i$7 < this.#intervals.length; i$7++) { const [start, end] = this.#intervals[i$7]; if (start !== y1) { break; } if (start === y1 && end === y2) { this.#intervals.splice(i$7, 1); return; } } for (let i$7 = index - 1; i$7 >= 0; i$7--) { const [start, end] = this.#intervals[i$7]; if (start !== y1) { break; } if (start === y1 && end === y2) { this.#intervals.splice(i$7, 1); return; } } } #breakEdge(edge) { const [x$2, y1, y2] = edge; const results = [[ x$2, y1, y2 ]]; const index = this.#binarySearch(y2); for (let i$7 = 0; i$7 < index; i$7++) { const [start, end] = this.#intervals[i$7]; for (let j$2 = 0, jj = results.length; j$2 < jj; j$2++) { const [, y3, y4] = results[j$2]; if (end <= y3 || y4 <= start) { continue; } if (y3 >= start) { if (y4 > end) { results[j$2][1] = end; } else { if (jj === 1) { return []; } results.splice(j$2, 1); j$2--; jj--; } continue; } results[j$2][2] = start; if (y4 > end) { results.push([ x$2, end, y4 ]); } } } return results; } }; HighlightOutline = class extends Outline { #box; #outlines; constructor(outlines, box, firstPoint, lastPoint) { super(); this.#outlines = outlines; this.#box = box; this.firstPoint = firstPoint; this.lastPoint = lastPoint; } toSVGPath() { const buffer = []; for (const polygon of this.#outlines) { let [prevX, prevY] = polygon; buffer.push(`M${prevX} ${prevY}`); for (let i$7 = 2; i$7 < polygon.length; i$7 += 2) { const x$2 = polygon[i$7]; const y$3 = polygon[i$7 + 1]; if (x$2 === prevX) { buffer.push(`V${y$3}`); prevY = y$3; } else if (y$3 === prevY) { buffer.push(`H${x$2}`); prevX = x$2; } } buffer.push("Z"); } return buffer.join(" "); } serialize([blX, blY, trX, trY], _rotation) { const outlines = []; const width = trX - blX; const height = trY - blY; for (const outline of this.#outlines) { const points = new Array(outline.length); for (let i$7 = 0; i$7 < outline.length; i$7 += 2) { points[i$7] = blX + outline[i$7] * width; points[i$7 + 1] = trY - outline[i$7 + 1] * height; } outlines.push(points); } return outlines; } get box() { return this.#box; } get classNamesForOutlining() { return ["highlightOutline"]; } }; FreeHighlightOutliner = class extends FreeDrawOutliner { newFreeDrawOutline(outline, points, box, scaleFactor, innerMargin, isLTR) { return new FreeHighlightOutline(outline, points, box, scaleFactor, innerMargin, isLTR); } }; FreeHighlightOutline = class extends FreeDrawOutline { newOutliner(point, box, scaleFactor, thickness, isLTR, innerMargin = 0) { return new FreeHighlightOutliner(point, box, scaleFactor, thickness, isLTR, innerMargin); } }; ; HighlightEditor = class HighlightEditor extends AnnotationEditor { #anchorNode = null; #anchorOffset = 0; #boxes; #clipPathId = null; #colorPicker = null; #focusOutlines = null; #focusNode = null; #focusOffset = 0; #highlightDiv = null; #highlightOutlines = null; #id = null; #isFreeHighlight = false; #firstPoint = null; #lastPoint = null; #outlineId = null; #text = ""; #thickness; #methodOfCreation = ""; static _defaultColor = null; static _defaultOpacity = 1; static _defaultThickness = 12; static _type = "highlight"; static _editorType = AnnotationEditorType.HIGHLIGHT; static _freeHighlightId = -1; static _freeHighlight = null; static _freeHighlightClipId = ""; static get _keyboardManager() { const proto = HighlightEditor.prototype; return shadow(this, "_keyboardManager", new KeyboardManager([ [ ["ArrowLeft", "mac+ArrowLeft"], proto._moveCaret, { args: [0] } ], [ ["ArrowRight", "mac+ArrowRight"], proto._moveCaret, { args: [1] } ], [ ["ArrowUp", "mac+ArrowUp"], proto._moveCaret, { args: [2] } ], [ ["ArrowDown", "mac+ArrowDown"], proto._moveCaret, { args: [3] } ] ])); } constructor(params) { super({ ...params, name: "highlightEditor" }); this.color = params.color || HighlightEditor._defaultColor; this.#thickness = params.thickness || HighlightEditor._defaultThickness; this.opacity = params.opacity || HighlightEditor._defaultOpacity; this.#boxes = params.boxes || null; this.#methodOfCreation = params.methodOfCreation || ""; this.#text = params.text || ""; this._isDraggable = false; this.defaultL10nId = "pdfjs-editor-highlight-editor"; if (params.highlightId > -1) { this.#isFreeHighlight = true; this.#createFreeOutlines(params); this.#addToDrawLayer(); } else if (this.#boxes) { this.#anchorNode = params.anchorNode; this.#anchorOffset = params.anchorOffset; this.#focusNode = params.focusNode; this.#focusOffset = params.focusOffset; this.#createOutlines(); this.#addToDrawLayer(); this.rotate(this.rotation); } if (!this.annotationElementId) { this._uiManager.a11yAlert("pdfjs-editor-highlight-added-alert"); } } get telemetryInitialData() { return { action: "added", type: this.#isFreeHighlight ? "free_highlight" : "highlight", color: this._uiManager.getNonHCMColorName(this.color), thickness: this.#thickness, methodOfCreation: this.#methodOfCreation }; } get telemetryFinalData() { return { type: "highlight", color: this._uiManager.getNonHCMColorName(this.color) }; } static computeTelemetryFinalData(data) { return { numberOfColors: data.get("color").size }; } #createOutlines() { const outliner = new HighlightOutliner(this.#boxes, .001); this.#highlightOutlines = outliner.getOutlines(); [this.x, this.y, this.width, this.height] = this.#highlightOutlines.box; const outlinerForOutline = new HighlightOutliner(this.#boxes, .0025, .001, this._uiManager.direction === "ltr"); this.#focusOutlines = outlinerForOutline.getOutlines(); const { firstPoint } = this.#highlightOutlines; this.#firstPoint = [(firstPoint[0] - this.x) / this.width, (firstPoint[1] - this.y) / this.height]; const { lastPoint } = this.#focusOutlines; this.#lastPoint = [(lastPoint[0] - this.x) / this.width, (lastPoint[1] - this.y) / this.height]; } #createFreeOutlines({ highlightOutlines, highlightId, clipPathId }) { this.#highlightOutlines = highlightOutlines; const extraThickness = 1.5; this.#focusOutlines = highlightOutlines.getNewOutline(this.#thickness / 2 + extraThickness, .0025); if (highlightId >= 0) { this.#id = highlightId; this.#clipPathId = clipPathId; this.parent.drawLayer.finalizeDraw(highlightId, { bbox: highlightOutlines.box, path: { d: highlightOutlines.toSVGPath() } }); this.#outlineId = this.parent.drawLayer.drawOutline({ rootClass: { highlightOutline: true, free: true }, bbox: this.#focusOutlines.box, path: { d: this.#focusOutlines.toSVGPath() } }, true); } else if (this.parent) { const angle = this.parent.viewport.rotation; this.parent.drawLayer.updateProperties(this.#id, { bbox: HighlightEditor.#rotateBbox(this.#highlightOutlines.box, (angle - this.rotation + 360) % 360), path: { d: highlightOutlines.toSVGPath() } }); this.parent.drawLayer.updateProperties(this.#outlineId, { bbox: HighlightEditor.#rotateBbox(this.#focusOutlines.box, angle), path: { d: this.#focusOutlines.toSVGPath() } }); } const [x$2, y$3, width, height] = highlightOutlines.box; switch (this.rotation) { case 0: this.x = x$2; this.y = y$3; this.width = width; this.height = height; break; case 90: { const [pageWidth, pageHeight] = this.parentDimensions; this.x = y$3; this.y = 1 - x$2; this.width = width * pageHeight / pageWidth; this.height = height * pageWidth / pageHeight; break; } case 180: this.x = 1 - x$2; this.y = 1 - y$3; this.width = width; this.height = height; break; case 270: { const [pageWidth, pageHeight] = this.parentDimensions; this.x = 1 - y$3; this.y = x$2; this.width = width * pageHeight / pageWidth; this.height = height * pageWidth / pageHeight; break; } } const { firstPoint } = highlightOutlines; this.#firstPoint = [(firstPoint[0] - x$2) / width, (firstPoint[1] - y$3) / height]; const { lastPoint } = this.#focusOutlines; this.#lastPoint = [(lastPoint[0] - x$2) / width, (lastPoint[1] - y$3) / height]; } static initialize(l10n, uiManager) { AnnotationEditor.initialize(l10n, uiManager); HighlightEditor._defaultColor ||= uiManager.highlightColors?.values().next().value || "#fff066"; } static updateDefaultParams(type, value) { switch (type) { case AnnotationEditorParamsType.HIGHLIGHT_COLOR: HighlightEditor._defaultColor = value; break; case AnnotationEditorParamsType.HIGHLIGHT_THICKNESS: HighlightEditor._defaultThickness = value; break; } } translateInPage(x$2, y$3) {} get toolbarPosition() { return this.#lastPoint; } get commentButtonPosition() { return this.#firstPoint; } updateParams(type, value) { switch (type) { case AnnotationEditorParamsType.HIGHLIGHT_COLOR: this.#updateColor(value); break; case AnnotationEditorParamsType.HIGHLIGHT_THICKNESS: this.#updateThickness(value); break; } } static get defaultPropertiesToUpdate() { return [[AnnotationEditorParamsType.HIGHLIGHT_COLOR, HighlightEditor._defaultColor], [AnnotationEditorParamsType.HIGHLIGHT_THICKNESS, HighlightEditor._defaultThickness]]; } get propertiesToUpdate() { return [ [AnnotationEditorParamsType.HIGHLIGHT_COLOR, this.color || HighlightEditor._defaultColor], [AnnotationEditorParamsType.HIGHLIGHT_THICKNESS, this.#thickness || HighlightEditor._defaultThickness], [AnnotationEditorParamsType.HIGHLIGHT_FREE, this.#isFreeHighlight] ]; } onUpdatedColor() { this.parent?.drawLayer.updateProperties(this.#id, { root: { fill: this.color, "fill-opacity": this.opacity } }); this.#colorPicker?.updateColor(this.color); super.onUpdatedColor(); } #updateColor(color) { const setColorAndOpacity = (col, opa) => { this.color = col; this.opacity = opa; this.onUpdatedColor(); }; const savedColor = this.color; const savedOpacity = this.opacity; this.addCommands({ cmd: setColorAndOpacity.bind(this, color, HighlightEditor._defaultOpacity), undo: setColorAndOpacity.bind(this, savedColor, savedOpacity), post: this._uiManager.updateUI.bind(this._uiManager, this), mustExec: true, type: AnnotationEditorParamsType.HIGHLIGHT_COLOR, overwriteIfSameType: true, keepUndo: true }); this._reportTelemetry({ action: "color_changed", color: this._uiManager.getNonHCMColorName(color) }, true); } #updateThickness(thickness) { const savedThickness = this.#thickness; const setThickness = (th) => { this.#thickness = th; this.#changeThickness(th); }; this.addCommands({ cmd: setThickness.bind(this, thickness), undo: setThickness.bind(this, savedThickness), post: this._uiManager.updateUI.bind(this._uiManager, this), mustExec: true, type: AnnotationEditorParamsType.INK_THICKNESS, overwriteIfSameType: true, keepUndo: true }); this._reportTelemetry({ action: "thickness_changed", thickness }, true); } get toolbarButtons() { if (this._uiManager.highlightColors) { const colorPicker = this.#colorPicker = new ColorPicker({ editor: this }); return [["colorPicker", colorPicker]]; } return super.toolbarButtons; } disableEditing() { super.disableEditing(); this.div.classList.toggle("disabled", true); } enableEditing() { super.enableEditing(); this.div.classList.toggle("disabled", false); } fixAndSetPosition() { return super.fixAndSetPosition(this.#getRotation()); } getBaseTranslation() { return [0, 0]; } getRect(tx, ty) { return super.getRect(tx, ty, this.#getRotation()); } onceAdded(focus) { if (!this.annotationElementId) { this.parent.addUndoableEditor(this); } if (focus) { this.div.focus(); } } remove() { this.#cleanDrawLayer(); this._reportTelemetry({ action: "deleted" }); super.remove(); } rebuild() { if (!this.parent) { return; } super.rebuild(); if (this.div === null) { return; } this.#addToDrawLayer(); if (!this.isAttachedToDOM) { this.parent.add(this); } } setParent(parent) { let mustBeSelected = false; if (this.parent && !parent) { this.#cleanDrawLayer(); } else if (parent) { this.#addToDrawLayer(parent); mustBeSelected = !this.parent && this.div?.classList.contains("selectedEditor"); } super.setParent(parent); this.show(this._isVisible); if (mustBeSelected) { this.select(); } } #changeThickness(thickness) { if (!this.#isFreeHighlight) { return; } this.#createFreeOutlines({ highlightOutlines: this.#highlightOutlines.getNewOutline(thickness / 2) }); this.fixAndSetPosition(); this.setDims(); } #cleanDrawLayer() { if (this.#id === null || !this.parent) { return; } this.parent.drawLayer.remove(this.#id); this.#id = null; this.parent.drawLayer.remove(this.#outlineId); this.#outlineId = null; } #addToDrawLayer(parent = this.parent) { if (this.#id !== null) { return; } ({id: this.#id, clipPathId: this.#clipPathId} = parent.drawLayer.draw({ bbox: this.#highlightOutlines.box, root: { viewBox: "0 0 1 1", fill: this.color, "fill-opacity": this.opacity }, rootClass: { highlight: true, free: this.#isFreeHighlight }, path: { d: this.#highlightOutlines.toSVGPath() } }, false, true)); this.#outlineId = parent.drawLayer.drawOutline({ rootClass: { highlightOutline: true, free: this.#isFreeHighlight }, bbox: this.#focusOutlines.box, path: { d: this.#focusOutlines.toSVGPath() } }, this.#isFreeHighlight); if (this.#highlightDiv) { this.#highlightDiv.style.clipPath = this.#clipPathId; } } static #rotateBbox([x$2, y$3, width, height], angle) { switch (angle) { case 90: return [ 1 - y$3 - height, x$2, height, width ]; case 180: return [ 1 - x$2 - width, 1 - y$3 - height, width, height ]; case 270: return [ y$3, 1 - x$2 - width, height, width ]; } return [ x$2, y$3, width, height ]; } rotate(angle) { const { drawLayer } = this.parent; let box; if (this.#isFreeHighlight) { angle = (angle - this.rotation + 360) % 360; box = HighlightEditor.#rotateBbox(this.#highlightOutlines.box, angle); } else { box = HighlightEditor.#rotateBbox([ this.x, this.y, this.width, this.height ], angle); } drawLayer.updateProperties(this.#id, { bbox: box, root: { "data-main-rotation": angle } }); drawLayer.updateProperties(this.#outlineId, { bbox: HighlightEditor.#rotateBbox(this.#focusOutlines.box, angle), root: { "data-main-rotation": angle } }); } render() { if (this.div) { return this.div; } const div = super.render(); if (this.#text) { div.setAttribute("aria-label", this.#text); div.setAttribute("role", "mark"); } if (this.#isFreeHighlight) { div.classList.add("free"); } else { this.div.addEventListener("keydown", this.#keydown.bind(this), { signal: this._uiManager._signal }); } const highlightDiv = this.#highlightDiv = document.createElement("div"); div.append(highlightDiv); highlightDiv.setAttribute("aria-hidden", "true"); highlightDiv.className = "internal"; highlightDiv.style.clipPath = this.#clipPathId; this.setDims(); bindEvents(this, this.#highlightDiv, ["pointerover", "pointerleave"]); this.enableEditing(); return div; } pointerover() { if (!this.isSelected) { this.parent?.drawLayer.updateProperties(this.#outlineId, { rootClass: { hovered: true } }); } } pointerleave() { if (!this.isSelected) { this.parent?.drawLayer.updateProperties(this.#outlineId, { rootClass: { hovered: false } }); } } #keydown(event) { HighlightEditor._keyboardManager.exec(this, event); } _moveCaret(direction) { this.parent.unselect(this); switch (direction) { case 0: case 2: this.#setCaret(true); break; case 1: case 3: this.#setCaret(false); break; } } #setCaret(start) { if (!this.#anchorNode) { return; } const selection = window.getSelection(); if (start) { selection.setPosition(this.#anchorNode, this.#anchorOffset); } else { selection.setPosition(this.#focusNode, this.#focusOffset); } } select() { super.select(); if (!this.#outlineId) { return; } this.parent?.drawLayer.updateProperties(this.#outlineId, { rootClass: { hovered: false, selected: true } }); } unselect() { super.unselect(); if (!this.#outlineId) { return; } this.parent?.drawLayer.updateProperties(this.#outlineId, { rootClass: { selected: false } }); if (!this.#isFreeHighlight) { this.#setCaret(false); } } get _mustFixPosition() { return !this.#isFreeHighlight; } show(visible = this._isVisible) { super.show(visible); if (this.parent) { this.parent.drawLayer.updateProperties(this.#id, { rootClass: { hidden: !visible } }); this.parent.drawLayer.updateProperties(this.#outlineId, { rootClass: { hidden: !visible } }); } } #getRotation() { return this.#isFreeHighlight ? this.rotation : 0; } #serializeBoxes() { if (this.#isFreeHighlight) { return null; } const [pageWidth, pageHeight] = this.pageDimensions; const [pageX, pageY] = this.pageTranslation; const boxes = this.#boxes; const quadPoints = new Float32Array(boxes.length * 8); let i$7 = 0; for (const { x: x$2, y: y$3, width, height } of boxes) { const sx = x$2 * pageWidth + pageX; const sy = (1 - y$3) * pageHeight + pageY; quadPoints[i$7] = quadPoints[i$7 + 4] = sx; quadPoints[i$7 + 1] = quadPoints[i$7 + 3] = sy; quadPoints[i$7 + 2] = quadPoints[i$7 + 6] = sx + width * pageWidth; quadPoints[i$7 + 5] = quadPoints[i$7 + 7] = sy - height * pageHeight; i$7 += 8; } return quadPoints; } #serializeOutlines(rect) { return this.#highlightOutlines.serialize(rect, this.#getRotation()); } static startHighlighting(parent, isLTR, { target: textLayer, x: x$2, y: y$3 }) { const { x: layerX, y: layerY, width: parentWidth, height: parentHeight } = textLayer.getBoundingClientRect(); const ac = new AbortController(); const signal = parent.combinedSignal(ac); const pointerUpCallback = (e$10) => { ac.abort(); this.#endHighlight(parent, e$10); }; window.addEventListener("blur", pointerUpCallback, { signal }); window.addEventListener("pointerup", pointerUpCallback, { signal }); window.addEventListener("pointerdown", stopEvent, { capture: true, passive: false, signal }); window.addEventListener("contextmenu", noContextMenu, { signal }); textLayer.addEventListener("pointermove", this.#highlightMove.bind(this, parent), { signal }); this._freeHighlight = new FreeHighlightOutliner({ x: x$2, y: y$3 }, [ layerX, layerY, parentWidth, parentHeight ], parent.scale, this._defaultThickness / 2, isLTR, .001); ({id: this._freeHighlightId, clipPathId: this._freeHighlightClipId} = parent.drawLayer.draw({ bbox: [ 0, 0, 1, 1 ], root: { viewBox: "0 0 1 1", fill: this._defaultColor, "fill-opacity": this._defaultOpacity }, rootClass: { highlight: true, free: true }, path: { d: this._freeHighlight.toSVGPath() } }, true, true)); } static #highlightMove(parent, event) { if (this._freeHighlight.add(event)) { parent.drawLayer.updateProperties(this._freeHighlightId, { path: { d: this._freeHighlight.toSVGPath() } }); } } static #endHighlight(parent, event) { if (!this._freeHighlight.isEmpty()) { parent.createAndAddNewEditor(event, false, { highlightId: this._freeHighlightId, highlightOutlines: this._freeHighlight.getOutlines(), clipPathId: this._freeHighlightClipId, methodOfCreation: "main_toolbar" }); } else { parent.drawLayer.remove(this._freeHighlightId); } this._freeHighlightId = -1; this._freeHighlight = null; this._freeHighlightClipId = ""; } static async deserialize(data, parent, uiManager) { let initialData = null; if (data instanceof HighlightAnnotationElement) { const { data: { quadPoints: quadPoints$1, rect, rotation, id, color: color$1, opacity: opacity$1, popupRef, richText, contentsObj, creationDate, modificationDate }, parent: { page: { pageNumber } } } = data; initialData = data = { annotationType: AnnotationEditorType.HIGHLIGHT, color: Array.from(color$1), opacity: opacity$1, quadPoints: quadPoints$1, boxes: null, pageIndex: pageNumber - 1, rect: rect.slice(0), rotation, annotationElementId: id, id, deleted: false, popupRef, richText, comment: contentsObj?.str || null, creationDate, modificationDate }; } else if (data instanceof InkAnnotationElement) { const { data: { inkLists: inkLists$1, rect, rotation, id, color: color$1, borderStyle: { rawWidth: thickness }, popupRef, richText, contentsObj, creationDate, modificationDate }, parent: { page: { pageNumber } } } = data; initialData = data = { annotationType: AnnotationEditorType.HIGHLIGHT, color: Array.from(color$1), thickness, inkLists: inkLists$1, boxes: null, pageIndex: pageNumber - 1, rect: rect.slice(0), rotation, annotationElementId: id, id, deleted: false, popupRef, richText, comment: contentsObj?.str || null, creationDate, modificationDate }; } const { color, quadPoints, inkLists, opacity } = data; const editor = await super.deserialize(data, parent, uiManager); editor.color = Util.makeHexColor(...color); editor.opacity = opacity || 1; if (inkLists) { editor.#thickness = data.thickness; } editor._initialData = initialData; if (data.comment) { editor.setCommentData(data); } const [pageWidth, pageHeight] = editor.pageDimensions; const [pageX, pageY] = editor.pageTranslation; if (quadPoints) { const boxes = editor.#boxes = []; for (let i$7 = 0; i$7 < quadPoints.length; i$7 += 8) { boxes.push({ x: (quadPoints[i$7] - pageX) / pageWidth, y: 1 - (quadPoints[i$7 + 1] - pageY) / pageHeight, width: (quadPoints[i$7 + 2] - quadPoints[i$7]) / pageWidth, height: (quadPoints[i$7 + 1] - quadPoints[i$7 + 5]) / pageHeight }); } editor.#createOutlines(); editor.#addToDrawLayer(); editor.rotate(editor.rotation); } else if (inkLists) { editor.#isFreeHighlight = true; const points = inkLists[0]; const point = { x: points[0] - pageX, y: pageHeight - (points[1] - pageY) }; const outliner = new FreeHighlightOutliner(point, [ 0, 0, pageWidth, pageHeight ], 1, editor.#thickness / 2, true, .001); for (let i$7 = 0, ii = points.length; i$7 < ii; i$7 += 2) { point.x = points[i$7] - pageX; point.y = pageHeight - (points[i$7 + 1] - pageY); outliner.add(point); } const { id, clipPathId } = parent.drawLayer.draw({ bbox: [ 0, 0, 1, 1 ], root: { viewBox: "0 0 1 1", fill: editor.color, "fill-opacity": editor._defaultOpacity }, rootClass: { highlight: true, free: true }, path: { d: outliner.toSVGPath() } }, true, true); editor.#createFreeOutlines({ highlightOutlines: outliner.getOutlines(), highlightId: id, clipPathId }); editor.#addToDrawLayer(); editor.rotate(editor.parentRotation); } return editor; } serialize(isForCopying = false) { if (this.isEmpty() || isForCopying) { return null; } if (this.deleted) { return this.serializeDeleted(); } const color = AnnotationEditor._colorManager.convert(this._uiManager.getNonHCMColor(this.color)); const serialized = super.serialize(isForCopying); Object.assign(serialized, { color, opacity: this.opacity, thickness: this.#thickness, quadPoints: this.#serializeBoxes(), outlines: this.#serializeOutlines(serialized.rect) }); this.addComment(serialized); if (this.annotationElementId && !this.#hasElementChanged(serialized)) { return null; } serialized.id = this.annotationElementId; return serialized; } #hasElementChanged(serialized) { const { color } = this._initialData; return this.hasEditedComment || serialized.color.some((c$7, i$7) => c$7 !== color[i$7]); } renderAnnotationElement(annotation) { if (this.deleted) { annotation.hide(); return null; } annotation.updateEdited({ rect: this.getPDFRect(), popup: this.comment }); return null; } static canCreateNewEmptyEditor() { return false; } }; ; DrawingOptions = class { #svgProperties = Object.create(null); updateProperty(name, value) { this[name] = value; this.updateSVGProperty(name, value); } updateProperties(properties$1) { if (!properties$1) { return; } for (const [name, value] of Object.entries(properties$1)) { if (!name.startsWith("_")) { this.updateProperty(name, value); } } } updateSVGProperty(name, value) { this.#svgProperties[name] = value; } toSVGProperties() { const root = this.#svgProperties; this.#svgProperties = Object.create(null); return { root }; } reset() { this.#svgProperties = Object.create(null); } updateAll(options = this) { this.updateProperties(options); } clone() { unreachable("Not implemented"); } }; DrawingEditor = class DrawingEditor extends AnnotationEditor { #drawOutlines = null; #mustBeCommitted; _colorPicker = null; _drawId = null; static _currentDrawId = -1; static _currentParent = null; static #currentDraw = null; static #currentDrawingAC = null; static #currentDrawingOptions = null; static _INNER_MARGIN = 3; constructor(params) { super(params); this.#mustBeCommitted = params.mustBeCommitted || false; this._addOutlines(params); } onUpdatedColor() { this._colorPicker?.update(this.color); super.onUpdatedColor(); } _addOutlines(params) { if (params.drawOutlines) { this.#createDrawOutlines(params); this.#addToDrawLayer(); } } #createDrawOutlines({ drawOutlines, drawId, drawingOptions }) { this.#drawOutlines = drawOutlines; this._drawingOptions ||= drawingOptions; if (!this.annotationElementId) { this._uiManager.a11yAlert(`pdfjs-editor-${this.editorType}-added-alert`); } if (drawId >= 0) { this._drawId = drawId; this.parent.drawLayer.finalizeDraw(drawId, drawOutlines.defaultProperties); } else { this._drawId = this.#createDrawing(drawOutlines, this.parent); } this.#updateBbox(drawOutlines.box); } #createDrawing(drawOutlines, parent) { const { id } = parent.drawLayer.draw(DrawingEditor._mergeSVGProperties(this._drawingOptions.toSVGProperties(), drawOutlines.defaultSVGProperties), false, false); return id; } static _mergeSVGProperties(p1, p2) { const p1Keys = new Set(Object.keys(p1)); for (const [key, value] of Object.entries(p2)) { if (p1Keys.has(key)) { Object.assign(p1[key], value); } else { p1[key] = value; } } return p1; } static getDefaultDrawingOptions(_options) { unreachable("Not implemented"); } static get typesMap() { unreachable("Not implemented"); } static get isDrawer() { return true; } static get supportMultipleDrawings() { return false; } static updateDefaultParams(type, value) { const propertyName = this.typesMap.get(type); if (propertyName) { this._defaultDrawingOptions.updateProperty(propertyName, value); } if (this._currentParent) { DrawingEditor.#currentDraw.updateProperty(propertyName, value); this._currentParent.drawLayer.updateProperties(this._currentDrawId, this._defaultDrawingOptions.toSVGProperties()); } } updateParams(type, value) { const propertyName = this.constructor.typesMap.get(type); if (propertyName) { this._updateProperty(type, propertyName, value); } } static get defaultPropertiesToUpdate() { const properties$1 = []; const options = this._defaultDrawingOptions; for (const [type, name] of this.typesMap) { properties$1.push([type, options[name]]); } return properties$1; } get propertiesToUpdate() { const properties$1 = []; const { _drawingOptions } = this; for (const [type, name] of this.constructor.typesMap) { properties$1.push([type, _drawingOptions[name]]); } return properties$1; } _updateProperty(type, name, value) { const options = this._drawingOptions; const savedValue = options[name]; const setter = (val$1) => { options.updateProperty(name, val$1); const bbox = this.#drawOutlines.updateProperty(name, val$1); if (bbox) { this.#updateBbox(bbox); } this.parent?.drawLayer.updateProperties(this._drawId, options.toSVGProperties()); if (type === this.colorType) { this.onUpdatedColor(); } }; this.addCommands({ cmd: setter.bind(this, value), undo: setter.bind(this, savedValue), post: this._uiManager.updateUI.bind(this._uiManager, this), mustExec: true, type, overwriteIfSameType: true, keepUndo: true }); } _onResizing() { this.parent?.drawLayer.updateProperties(this._drawId, DrawingEditor._mergeSVGProperties(this.#drawOutlines.getPathResizingSVGProperties(this.#convertToDrawSpace()), { bbox: this.#rotateBox() })); } _onResized() { this.parent?.drawLayer.updateProperties(this._drawId, DrawingEditor._mergeSVGProperties(this.#drawOutlines.getPathResizedSVGProperties(this.#convertToDrawSpace()), { bbox: this.#rotateBox() })); } _onTranslating(_x, _y) { this.parent?.drawLayer.updateProperties(this._drawId, { bbox: this.#rotateBox() }); } _onTranslated() { this.parent?.drawLayer.updateProperties(this._drawId, DrawingEditor._mergeSVGProperties(this.#drawOutlines.getPathTranslatedSVGProperties(this.#convertToDrawSpace(), this.parentDimensions), { bbox: this.#rotateBox() })); } _onStartDragging() { this.parent?.drawLayer.updateProperties(this._drawId, { rootClass: { moving: true } }); } _onStopDragging() { this.parent?.drawLayer.updateProperties(this._drawId, { rootClass: { moving: false } }); } commit() { super.commit(); this.disableEditMode(); this.disableEditing(); } disableEditing() { super.disableEditing(); this.div.classList.toggle("disabled", true); } enableEditing() { super.enableEditing(); this.div.classList.toggle("disabled", false); } getBaseTranslation() { return [0, 0]; } get isResizable() { return true; } onceAdded(focus) { if (!this.annotationElementId) { this.parent.addUndoableEditor(this); } this._isDraggable = true; if (this.#mustBeCommitted) { this.#mustBeCommitted = false; this.commit(); this.parent.setSelected(this); if (focus && this.isOnScreen) { this.div.focus(); } } } remove() { this.#cleanDrawLayer(); super.remove(); } rebuild() { if (!this.parent) { return; } super.rebuild(); if (this.div === null) { return; } this.#addToDrawLayer(); this.#updateBbox(this.#drawOutlines.box); if (!this.isAttachedToDOM) { this.parent.add(this); } } setParent(parent) { let mustBeSelected = false; if (this.parent && !parent) { this._uiManager.removeShouldRescale(this); this.#cleanDrawLayer(); } else if (parent) { this._uiManager.addShouldRescale(this); this.#addToDrawLayer(parent); mustBeSelected = !this.parent && this.div?.classList.contains("selectedEditor"); } super.setParent(parent); if (mustBeSelected) { this.select(); } } #cleanDrawLayer() { if (this._drawId === null || !this.parent) { return; } this.parent.drawLayer.remove(this._drawId); this._drawId = null; this._drawingOptions.reset(); } #addToDrawLayer(parent = this.parent) { if (this._drawId !== null && this.parent === parent) { return; } if (this._drawId !== null) { this.parent.drawLayer.updateParent(this._drawId, parent.drawLayer); return; } this._drawingOptions.updateAll(); this._drawId = this.#createDrawing(this.#drawOutlines, parent); } #convertToParentSpace([x$2, y$3, width, height]) { const { parentDimensions: [pW, pH], rotation } = this; switch (rotation) { case 90: return [ y$3, 1 - x$2, width * (pH / pW), height * (pW / pH) ]; case 180: return [ 1 - x$2, 1 - y$3, width, height ]; case 270: return [ 1 - y$3, x$2, width * (pH / pW), height * (pW / pH) ]; default: return [ x$2, y$3, width, height ]; } } #convertToDrawSpace() { const { x: x$2, y: y$3, width, height, parentDimensions: [pW, pH], rotation } = this; switch (rotation) { case 90: return [ 1 - y$3, x$2, width * (pW / pH), height * (pH / pW) ]; case 180: return [ 1 - x$2, 1 - y$3, width, height ]; case 270: return [ y$3, 1 - x$2, width * (pW / pH), height * (pH / pW) ]; default: return [ x$2, y$3, width, height ]; } } #updateBbox(bbox) { [this.x, this.y, this.width, this.height] = this.#convertToParentSpace(bbox); if (this.div) { this.fixAndSetPosition(); this.setDims(); } this._onResized(); } #rotateBox() { const { x: x$2, y: y$3, width, height, rotation, parentRotation, parentDimensions: [pW, pH] } = this; switch ((rotation * 4 + parentRotation) / 90) { case 1: return [ 1 - y$3 - height, x$2, height, width ]; case 2: return [ 1 - x$2 - width, 1 - y$3 - height, width, height ]; case 3: return [ y$3, 1 - x$2 - width, height, width ]; case 4: return [ x$2, y$3 - width * (pW / pH), height * (pH / pW), width * (pW / pH) ]; case 5: return [ 1 - y$3, x$2, width * (pW / pH), height * (pH / pW) ]; case 6: return [ 1 - x$2 - height * (pH / pW), 1 - y$3, height * (pH / pW), width * (pW / pH) ]; case 7: return [ y$3 - width * (pW / pH), 1 - x$2 - height * (pH / pW), width * (pW / pH), height * (pH / pW) ]; case 8: return [ x$2 - width, y$3 - height, width, height ]; case 9: return [ 1 - y$3, x$2 - width, height, width ]; case 10: return [ 1 - x$2, 1 - y$3, width, height ]; case 11: return [ y$3 - height, 1 - x$2, height, width ]; case 12: return [ x$2 - height * (pH / pW), y$3, height * (pH / pW), width * (pW / pH) ]; case 13: return [ 1 - y$3 - width * (pW / pH), x$2 - height * (pH / pW), width * (pW / pH), height * (pH / pW) ]; case 14: return [ 1 - x$2, 1 - y$3 - width * (pW / pH), height * (pH / pW), width * (pW / pH) ]; case 15: return [ y$3, 1 - x$2, width * (pW / pH), height * (pH / pW) ]; default: return [ x$2, y$3, width, height ]; } } rotate() { if (!this.parent) { return; } this.parent.drawLayer.updateProperties(this._drawId, DrawingEditor._mergeSVGProperties({ bbox: this.#rotateBox() }, this.#drawOutlines.updateRotation((this.parentRotation - this.rotation + 360) % 360))); } onScaleChanging() { if (!this.parent) { return; } this.#updateBbox(this.#drawOutlines.updateParentDimensions(this.parentDimensions, this.parent.scale)); } static onScaleChangingWhenDrawing() {} render() { if (this.div) { return this.div; } let baseX, baseY; if (this._isCopy) { baseX = this.x; baseY = this.y; } const div = super.render(); div.classList.add("draw"); const drawDiv = document.createElement("div"); div.append(drawDiv); drawDiv.setAttribute("aria-hidden", "true"); drawDiv.className = "internal"; this.setDims(); this._uiManager.addShouldRescale(this); this.disableEditing(); if (this._isCopy) { this._moveAfterPaste(baseX, baseY); } return div; } static createDrawerInstance(_x, _y, _parentWidth, _parentHeight, _rotation) { unreachable("Not implemented"); } static startDrawing(parent, uiManager, _isLTR, event) { const { target, offsetX: x$2, offsetY: y$3, pointerId, pointerType } = event; if (CurrentPointers.isInitializedAndDifferentPointerType(pointerType)) { return; } const { viewport: { rotation } } = parent; const { width: parentWidth, height: parentHeight } = target.getBoundingClientRect(); const ac = DrawingEditor.#currentDrawingAC = new AbortController(); const signal = parent.combinedSignal(ac); CurrentPointers.setPointer(pointerType, pointerId); window.addEventListener("pointerup", (e$10) => { if (CurrentPointers.isSamePointerIdOrRemove(e$10.pointerId)) { this._endDraw(e$10); } }, { signal }); window.addEventListener("pointercancel", (e$10) => { if (CurrentPointers.isSamePointerIdOrRemove(e$10.pointerId)) { this._currentParent.endDrawingSession(); } }, { signal }); window.addEventListener("pointerdown", (e$10) => { if (!CurrentPointers.isSamePointerType(e$10.pointerType)) { return; } CurrentPointers.initializeAndAddPointerId(e$10.pointerId); if (DrawingEditor.#currentDraw.isCancellable()) { DrawingEditor.#currentDraw.removeLastElement(); if (DrawingEditor.#currentDraw.isEmpty()) { this._currentParent.endDrawingSession(true); } else { this._endDraw(null); } } }, { capture: true, passive: false, signal }); window.addEventListener("contextmenu", noContextMenu, { signal }); target.addEventListener("pointermove", this._drawMove.bind(this), { signal }); target.addEventListener("touchmove", (e$10) => { if (CurrentPointers.isSameTimeStamp(e$10.timeStamp)) { stopEvent(e$10); } }, { signal }); parent.toggleDrawing(); uiManager._editorUndoBar?.hide(); if (DrawingEditor.#currentDraw) { parent.drawLayer.updateProperties(this._currentDrawId, DrawingEditor.#currentDraw.startNew(x$2, y$3, parentWidth, parentHeight, rotation)); return; } uiManager.updateUIForDefaultProperties(this); DrawingEditor.#currentDraw = this.createDrawerInstance(x$2, y$3, parentWidth, parentHeight, rotation); DrawingEditor.#currentDrawingOptions = this.getDefaultDrawingOptions(); this._currentParent = parent; ({id: this._currentDrawId} = parent.drawLayer.draw(this._mergeSVGProperties(DrawingEditor.#currentDrawingOptions.toSVGProperties(), DrawingEditor.#currentDraw.defaultSVGProperties), true, false)); } static _drawMove(event) { CurrentPointers.isSameTimeStamp(event.timeStamp); if (!DrawingEditor.#currentDraw) { return; } const { offsetX, offsetY, pointerId } = event; if (!CurrentPointers.isSamePointerId(pointerId)) { return; } if (CurrentPointers.isUsingMultiplePointers()) { this._endDraw(event); return; } this._currentParent.drawLayer.updateProperties(this._currentDrawId, DrawingEditor.#currentDraw.add(offsetX, offsetY)); CurrentPointers.setTimeStamp(event.timeStamp); stopEvent(event); } static _cleanup(all) { if (all) { this._currentDrawId = -1; this._currentParent = null; DrawingEditor.#currentDraw = null; DrawingEditor.#currentDrawingOptions = null; CurrentPointers.clearPointerType(); CurrentPointers.clearTimeStamp(); } if (DrawingEditor.#currentDrawingAC) { DrawingEditor.#currentDrawingAC.abort(); DrawingEditor.#currentDrawingAC = null; CurrentPointers.clearPointerIds(); } } static _endDraw(event) { const parent = this._currentParent; if (!parent) { return; } parent.toggleDrawing(true); this._cleanup(false); if (event?.target === parent.div) { parent.drawLayer.updateProperties(this._currentDrawId, DrawingEditor.#currentDraw.end(event.offsetX, event.offsetY)); } if (this.supportMultipleDrawings) { const draw = DrawingEditor.#currentDraw; const drawId = this._currentDrawId; const lastElement = draw.getLastElement(); parent.addCommands({ cmd: () => { parent.drawLayer.updateProperties(drawId, draw.setLastElement(lastElement)); }, undo: () => { parent.drawLayer.updateProperties(drawId, draw.removeLastElement()); }, mustExec: false, type: AnnotationEditorParamsType.DRAW_STEP }); return; } this.endDrawing(false); } static endDrawing(isAborted) { const parent = this._currentParent; if (!parent) { return null; } parent.toggleDrawing(true); parent.cleanUndoStack(AnnotationEditorParamsType.DRAW_STEP); if (!DrawingEditor.#currentDraw.isEmpty()) { const { pageDimensions: [pageWidth, pageHeight], scale } = parent; const editor = parent.createAndAddNewEditor({ offsetX: 0, offsetY: 0 }, false, { drawId: this._currentDrawId, drawOutlines: DrawingEditor.#currentDraw.getOutlines(pageWidth * scale, pageHeight * scale, scale, this._INNER_MARGIN), drawingOptions: DrawingEditor.#currentDrawingOptions, mustBeCommitted: !isAborted }); this._cleanup(true); return editor; } parent.drawLayer.remove(this._currentDrawId); this._cleanup(true); return null; } createDrawingOptions(_data) {} static deserializeDraw(_pageX, _pageY, _pageWidth, _pageHeight, _innerWidth, _data) { unreachable("Not implemented"); } static async deserialize(data, parent, uiManager) { const { rawDims: { pageWidth, pageHeight, pageX, pageY } } = parent.viewport; const drawOutlines = this.deserializeDraw(pageX, pageY, pageWidth, pageHeight, this._INNER_MARGIN, data); const editor = await super.deserialize(data, parent, uiManager); editor.createDrawingOptions(data); editor.#createDrawOutlines({ drawOutlines }); editor.#addToDrawLayer(); editor.onScaleChanging(); editor.rotate(); return editor; } serializeDraw(isForCopying) { const [pageX, pageY] = this.pageTranslation; const [pageWidth, pageHeight] = this.pageDimensions; return this.#drawOutlines.serialize([ pageX, pageY, pageWidth, pageHeight ], isForCopying); } renderAnnotationElement(annotation) { annotation.updateEdited({ rect: this.getPDFRect() }); return null; } static canCreateNewEmptyEditor() { return false; } }; ; InkDrawOutliner = class { #last = new Float64Array(6); #line; #lines; #rotation; #thickness; #points; #lastSVGPath = ""; #lastIndex = 0; #outlines = new InkDrawOutline(); #parentWidth; #parentHeight; constructor(x$2, y$3, parentWidth, parentHeight, rotation, thickness) { this.#parentWidth = parentWidth; this.#parentHeight = parentHeight; this.#rotation = rotation; this.#thickness = thickness; [x$2, y$3] = this.#normalizePoint(x$2, y$3); const line = this.#line = [ NaN, NaN, NaN, NaN, x$2, y$3 ]; this.#points = [x$2, y$3]; this.#lines = [{ line, points: this.#points }]; this.#last.set(line, 0); } updateProperty(name, value) { if (name === "stroke-width") { this.#thickness = value; } } #normalizePoint(x$2, y$3) { return Outline._normalizePoint(x$2, y$3, this.#parentWidth, this.#parentHeight, this.#rotation); } isEmpty() { return !this.#lines || this.#lines.length === 0; } isCancellable() { return this.#points.length <= 10; } add(x$2, y$3) { [x$2, y$3] = this.#normalizePoint(x$2, y$3); const [x1, y1, x2, y2] = this.#last.subarray(2, 6); const diffX = x$2 - x2; const diffY = y$3 - y2; const d$5 = Math.hypot(this.#parentWidth * diffX, this.#parentHeight * diffY); if (d$5 <= 2) { return null; } this.#points.push(x$2, y$3); if (isNaN(x1)) { this.#last.set([ x2, y2, x$2, y$3 ], 2); this.#line.push(NaN, NaN, NaN, NaN, x$2, y$3); return { path: { d: this.toSVGPath() } }; } if (isNaN(this.#last[0])) { this.#line.splice(6, 6); } this.#last.set([ x1, y1, x2, y2, x$2, y$3 ], 0); this.#line.push(...Outline.createBezierPoints(x1, y1, x2, y2, x$2, y$3)); return { path: { d: this.toSVGPath() } }; } end(x$2, y$3) { const change = this.add(x$2, y$3); if (change) { return change; } if (this.#points.length === 2) { return { path: { d: this.toSVGPath() } }; } return null; } startNew(x$2, y$3, parentWidth, parentHeight, rotation) { this.#parentWidth = parentWidth; this.#parentHeight = parentHeight; this.#rotation = rotation; [x$2, y$3] = this.#normalizePoint(x$2, y$3); const line = this.#line = [ NaN, NaN, NaN, NaN, x$2, y$3 ]; this.#points = [x$2, y$3]; const last = this.#lines.at(-1); if (last) { last.line = new Float32Array(last.line); last.points = new Float32Array(last.points); } this.#lines.push({ line, points: this.#points }); this.#last.set(line, 0); this.#lastIndex = 0; this.toSVGPath(); return null; } getLastElement() { return this.#lines.at(-1); } setLastElement(element) { if (!this.#lines) { return this.#outlines.setLastElement(element); } this.#lines.push(element); this.#line = element.line; this.#points = element.points; this.#lastIndex = 0; return { path: { d: this.toSVGPath() } }; } removeLastElement() { if (!this.#lines) { return this.#outlines.removeLastElement(); } this.#lines.pop(); this.#lastSVGPath = ""; for (let i$7 = 0, ii = this.#lines.length; i$7 < ii; i$7++) { const { line, points } = this.#lines[i$7]; this.#line = line; this.#points = points; this.#lastIndex = 0; this.toSVGPath(); } return { path: { d: this.#lastSVGPath } }; } toSVGPath() { const firstX = Outline.svgRound(this.#line[4]); const firstY = Outline.svgRound(this.#line[5]); if (this.#points.length === 2) { this.#lastSVGPath = `${this.#lastSVGPath} M ${firstX} ${firstY} Z`; return this.#lastSVGPath; } if (this.#points.length <= 6) { const i$7 = this.#lastSVGPath.lastIndexOf("M"); this.#lastSVGPath = `${this.#lastSVGPath.slice(0, i$7)} M ${firstX} ${firstY}`; this.#lastIndex = 6; } if (this.#points.length === 4) { const secondX = Outline.svgRound(this.#line[10]); const secondY = Outline.svgRound(this.#line[11]); this.#lastSVGPath = `${this.#lastSVGPath} L ${secondX} ${secondY}`; this.#lastIndex = 12; return this.#lastSVGPath; } const buffer = []; if (this.#lastIndex === 0) { buffer.push(`M ${firstX} ${firstY}`); this.#lastIndex = 6; } for (let i$7 = this.#lastIndex, ii = this.#line.length; i$7 < ii; i$7 += 6) { const [c1x, c1y, c2x, c2y, x$2, y$3] = this.#line.slice(i$7, i$7 + 6).map(Outline.svgRound); buffer.push(`C${c1x} ${c1y} ${c2x} ${c2y} ${x$2} ${y$3}`); } this.#lastSVGPath += buffer.join(" "); this.#lastIndex = this.#line.length; return this.#lastSVGPath; } getOutlines(parentWidth, parentHeight, scale, innerMargin) { const last = this.#lines.at(-1); last.line = new Float32Array(last.line); last.points = new Float32Array(last.points); this.#outlines.build(this.#lines, parentWidth, parentHeight, scale, this.#rotation, this.#thickness, innerMargin); this.#last = null; this.#line = null; this.#lines = null; this.#lastSVGPath = null; return this.#outlines; } get defaultSVGProperties() { return { root: { viewBox: "0 0 10000 10000" }, rootClass: { draw: true }, bbox: [ 0, 0, 1, 1 ] }; } }; InkDrawOutline = class extends Outline { #bbox; #currentRotation = 0; #innerMargin; #lines; #parentWidth; #parentHeight; #parentScale; #rotation; #thickness; build(lines, parentWidth, parentHeight, parentScale, rotation, thickness, innerMargin) { this.#parentWidth = parentWidth; this.#parentHeight = parentHeight; this.#parentScale = parentScale; this.#rotation = rotation; this.#thickness = thickness; this.#innerMargin = innerMargin ?? 0; this.#lines = lines; this.#computeBbox(); } get thickness() { return this.#thickness; } setLastElement(element) { this.#lines.push(element); return { path: { d: this.toSVGPath() } }; } removeLastElement() { this.#lines.pop(); return { path: { d: this.toSVGPath() } }; } toSVGPath() { const buffer = []; for (const { line } of this.#lines) { buffer.push(`M${Outline.svgRound(line[4])} ${Outline.svgRound(line[5])}`); if (line.length === 6) { buffer.push("Z"); continue; } if (line.length === 12 && isNaN(line[6])) { buffer.push(`L${Outline.svgRound(line[10])} ${Outline.svgRound(line[11])}`); continue; } for (let i$7 = 6, ii = line.length; i$7 < ii; i$7 += 6) { const [c1x, c1y, c2x, c2y, x$2, y$3] = line.subarray(i$7, i$7 + 6).map(Outline.svgRound); buffer.push(`C${c1x} ${c1y} ${c2x} ${c2y} ${x$2} ${y$3}`); } } return buffer.join(""); } serialize([pageX, pageY, pageWidth, pageHeight], isForCopying) { const serializedLines = []; const serializedPoints = []; const [x$2, y$3, width, height] = this.#getBBoxWithNoMargin(); let tx, ty, sx, sy, x1, y1, x2, y2, rescaleFn; switch (this.#rotation) { case 0: rescaleFn = Outline._rescale; tx = pageX; ty = pageY + pageHeight; sx = pageWidth; sy = -pageHeight; x1 = pageX + x$2 * pageWidth; y1 = pageY + (1 - y$3 - height) * pageHeight; x2 = pageX + (x$2 + width) * pageWidth; y2 = pageY + (1 - y$3) * pageHeight; break; case 90: rescaleFn = Outline._rescaleAndSwap; tx = pageX; ty = pageY; sx = pageWidth; sy = pageHeight; x1 = pageX + y$3 * pageWidth; y1 = pageY + x$2 * pageHeight; x2 = pageX + (y$3 + height) * pageWidth; y2 = pageY + (x$2 + width) * pageHeight; break; case 180: rescaleFn = Outline._rescale; tx = pageX + pageWidth; ty = pageY; sx = -pageWidth; sy = pageHeight; x1 = pageX + (1 - x$2 - width) * pageWidth; y1 = pageY + y$3 * pageHeight; x2 = pageX + (1 - x$2) * pageWidth; y2 = pageY + (y$3 + height) * pageHeight; break; case 270: rescaleFn = Outline._rescaleAndSwap; tx = pageX + pageWidth; ty = pageY + pageHeight; sx = -pageWidth; sy = -pageHeight; x1 = pageX + (1 - y$3 - height) * pageWidth; y1 = pageY + (1 - x$2 - width) * pageHeight; x2 = pageX + (1 - y$3) * pageWidth; y2 = pageY + (1 - x$2) * pageHeight; break; } for (const { line, points } of this.#lines) { serializedLines.push(rescaleFn(line, tx, ty, sx, sy, isForCopying ? new Array(line.length) : null)); serializedPoints.push(rescaleFn(points, tx, ty, sx, sy, isForCopying ? new Array(points.length) : null)); } return { lines: serializedLines, points: serializedPoints, rect: [ x1, y1, x2, y2 ] }; } static deserialize(pageX, pageY, pageWidth, pageHeight, innerMargin, { paths: { lines, points }, rotation, thickness }) { const newLines = []; let tx, ty, sx, sy, rescaleFn; switch (rotation) { case 0: rescaleFn = Outline._rescale; tx = -pageX / pageWidth; ty = pageY / pageHeight + 1; sx = 1 / pageWidth; sy = -1 / pageHeight; break; case 90: rescaleFn = Outline._rescaleAndSwap; tx = -pageY / pageHeight; ty = -pageX / pageWidth; sx = 1 / pageHeight; sy = 1 / pageWidth; break; case 180: rescaleFn = Outline._rescale; tx = pageX / pageWidth + 1; ty = -pageY / pageHeight; sx = -1 / pageWidth; sy = 1 / pageHeight; break; case 270: rescaleFn = Outline._rescaleAndSwap; tx = pageY / pageHeight + 1; ty = pageX / pageWidth + 1; sx = -1 / pageHeight; sy = -1 / pageWidth; break; } if (!lines) { lines = []; for (const point of points) { const len = point.length; if (len === 2) { lines.push(new Float32Array([ NaN, NaN, NaN, NaN, point[0], point[1] ])); continue; } if (len === 4) { lines.push(new Float32Array([ NaN, NaN, NaN, NaN, point[0], point[1], NaN, NaN, NaN, NaN, point[2], point[3] ])); continue; } const line = new Float32Array(3 * (len - 2)); lines.push(line); let [x1, y1, x2, y2] = point.subarray(0, 4); line.set([ NaN, NaN, NaN, NaN, x1, y1 ], 0); for (let i$7 = 4; i$7 < len; i$7 += 2) { const x$2 = point[i$7]; const y$3 = point[i$7 + 1]; line.set(Outline.createBezierPoints(x1, y1, x2, y2, x$2, y$3), (i$7 - 2) * 3); [x1, y1, x2, y2] = [ x2, y2, x$2, y$3 ]; } } } for (let i$7 = 0, ii = lines.length; i$7 < ii; i$7++) { newLines.push({ line: rescaleFn(lines[i$7].map((x$2) => x$2 ?? NaN), tx, ty, sx, sy), points: rescaleFn(points[i$7].map((x$2) => x$2 ?? NaN), tx, ty, sx, sy) }); } const outlines = new this.prototype.constructor(); outlines.build(newLines, pageWidth, pageHeight, 1, rotation, thickness, innerMargin); return outlines; } #getMarginComponents(thickness = this.#thickness) { const margin = this.#innerMargin + thickness / 2 * this.#parentScale; return this.#rotation % 180 === 0 ? [margin / this.#parentWidth, margin / this.#parentHeight] : [margin / this.#parentHeight, margin / this.#parentWidth]; } #getBBoxWithNoMargin() { const [x$2, y$3, width, height] = this.#bbox; const [marginX, marginY] = this.#getMarginComponents(0); return [ x$2 + marginX, y$3 + marginY, width - 2 * marginX, height - 2 * marginY ]; } #computeBbox() { const bbox = this.#bbox = new Float32Array([ Infinity, Infinity, -Infinity, -Infinity ]); for (const { line } of this.#lines) { if (line.length <= 12) { for (let i$7 = 4, ii = line.length; i$7 < ii; i$7 += 6) { Util.pointBoundingBox(line[i$7], line[i$7 + 1], bbox); } continue; } let lastX = line[4], lastY = line[5]; for (let i$7 = 6, ii = line.length; i$7 < ii; i$7 += 6) { const [c1x, c1y, c2x, c2y, x$2, y$3] = line.subarray(i$7, i$7 + 6); Util.bezierBoundingBox(lastX, lastY, c1x, c1y, c2x, c2y, x$2, y$3, bbox); lastX = x$2; lastY = y$3; } } const [marginX, marginY] = this.#getMarginComponents(); bbox[0] = MathClamp(bbox[0] - marginX, 0, 1); bbox[1] = MathClamp(bbox[1] - marginY, 0, 1); bbox[2] = MathClamp(bbox[2] + marginX, 0, 1); bbox[3] = MathClamp(bbox[3] + marginY, 0, 1); bbox[2] -= bbox[0]; bbox[3] -= bbox[1]; } get box() { return this.#bbox; } updateProperty(name, value) { if (name === "stroke-width") { return this.#updateThickness(value); } return null; } #updateThickness(thickness) { const [oldMarginX, oldMarginY] = this.#getMarginComponents(); this.#thickness = thickness; const [newMarginX, newMarginY] = this.#getMarginComponents(); const [diffMarginX, diffMarginY] = [newMarginX - oldMarginX, newMarginY - oldMarginY]; const bbox = this.#bbox; bbox[0] -= diffMarginX; bbox[1] -= diffMarginY; bbox[2] += 2 * diffMarginX; bbox[3] += 2 * diffMarginY; return bbox; } updateParentDimensions([width, height], scale) { const [oldMarginX, oldMarginY] = this.#getMarginComponents(); this.#parentWidth = width; this.#parentHeight = height; this.#parentScale = scale; const [newMarginX, newMarginY] = this.#getMarginComponents(); const diffMarginX = newMarginX - oldMarginX; const diffMarginY = newMarginY - oldMarginY; const bbox = this.#bbox; bbox[0] -= diffMarginX; bbox[1] -= diffMarginY; bbox[2] += 2 * diffMarginX; bbox[3] += 2 * diffMarginY; return bbox; } updateRotation(rotation) { this.#currentRotation = rotation; return { path: { transform: this.rotationTransform } }; } get viewBox() { return this.#bbox.map(Outline.svgRound).join(" "); } get defaultProperties() { const [x$2, y$3] = this.#bbox; return { root: { viewBox: this.viewBox }, path: { "transform-origin": `${Outline.svgRound(x$2)} ${Outline.svgRound(y$3)}` } }; } get rotationTransform() { const [, , width, height] = this.#bbox; let a$2 = 0, b$3 = 0, c$7 = 0, d$5 = 0, e$10 = 0, f$4 = 0; switch (this.#currentRotation) { case 90: b$3 = height / width; c$7 = -width / height; e$10 = width; break; case 180: a$2 = -1; d$5 = -1; e$10 = width; f$4 = height; break; case 270: b$3 = -height / width; c$7 = width / height; f$4 = height; break; default: return ""; } return `matrix(${a$2} ${b$3} ${c$7} ${d$5} ${Outline.svgRound(e$10)} ${Outline.svgRound(f$4)})`; } getPathResizingSVGProperties([newX, newY, newWidth, newHeight]) { const [marginX, marginY] = this.#getMarginComponents(); const [x$2, y$3, width, height] = this.#bbox; if (Math.abs(width - marginX) <= Outline.PRECISION || Math.abs(height - marginY) <= Outline.PRECISION) { const tx = newX + newWidth / 2 - (x$2 + width / 2); const ty = newY + newHeight / 2 - (y$3 + height / 2); return { path: { "transform-origin": `${Outline.svgRound(newX)} ${Outline.svgRound(newY)}`, transform: `${this.rotationTransform} translate(${tx} ${ty})` } }; } const s1x = (newWidth - 2 * marginX) / (width - 2 * marginX); const s1y = (newHeight - 2 * marginY) / (height - 2 * marginY); const s2x = width / newWidth; const s2y = height / newHeight; return { path: { "transform-origin": `${Outline.svgRound(x$2)} ${Outline.svgRound(y$3)}`, transform: `${this.rotationTransform} scale(${s2x} ${s2y}) ` + `translate(${Outline.svgRound(marginX)} ${Outline.svgRound(marginY)}) scale(${s1x} ${s1y}) ` + `translate(${Outline.svgRound(-marginX)} ${Outline.svgRound(-marginY)})` } }; } getPathResizedSVGProperties([newX, newY, newWidth, newHeight]) { const [marginX, marginY] = this.#getMarginComponents(); const bbox = this.#bbox; const [x$2, y$3, width, height] = bbox; bbox[0] = newX; bbox[1] = newY; bbox[2] = newWidth; bbox[3] = newHeight; if (Math.abs(width - marginX) <= Outline.PRECISION || Math.abs(height - marginY) <= Outline.PRECISION) { const tx$1 = newX + newWidth / 2 - (x$2 + width / 2); const ty$1 = newY + newHeight / 2 - (y$3 + height / 2); for (const { line, points } of this.#lines) { Outline._translate(line, tx$1, ty$1, line); Outline._translate(points, tx$1, ty$1, points); } return { root: { viewBox: this.viewBox }, path: { "transform-origin": `${Outline.svgRound(newX)} ${Outline.svgRound(newY)}`, transform: this.rotationTransform || null, d: this.toSVGPath() } }; } const s1x = (newWidth - 2 * marginX) / (width - 2 * marginX); const s1y = (newHeight - 2 * marginY) / (height - 2 * marginY); const tx = -s1x * (x$2 + marginX) + newX + marginX; const ty = -s1y * (y$3 + marginY) + newY + marginY; if (s1x !== 1 || s1y !== 1 || tx !== 0 || ty !== 0) { for (const { line, points } of this.#lines) { Outline._rescale(line, tx, ty, s1x, s1y, line); Outline._rescale(points, tx, ty, s1x, s1y, points); } } return { root: { viewBox: this.viewBox }, path: { "transform-origin": `${Outline.svgRound(newX)} ${Outline.svgRound(newY)}`, transform: this.rotationTransform || null, d: this.toSVGPath() } }; } getPathTranslatedSVGProperties([newX, newY], parentDimensions) { const [newParentWidth, newParentHeight] = parentDimensions; const bbox = this.#bbox; const tx = newX - bbox[0]; const ty = newY - bbox[1]; if (this.#parentWidth === newParentWidth && this.#parentHeight === newParentHeight) { for (const { line, points } of this.#lines) { Outline._translate(line, tx, ty, line); Outline._translate(points, tx, ty, points); } } else { const sx = this.#parentWidth / newParentWidth; const sy = this.#parentHeight / newParentHeight; this.#parentWidth = newParentWidth; this.#parentHeight = newParentHeight; for (const { line, points } of this.#lines) { Outline._rescale(line, tx, ty, sx, sy, line); Outline._rescale(points, tx, ty, sx, sy, points); } bbox[2] *= sx; bbox[3] *= sy; } bbox[0] = newX; bbox[1] = newY; return { root: { viewBox: this.viewBox }, path: { d: this.toSVGPath(), "transform-origin": `${Outline.svgRound(newX)} ${Outline.svgRound(newY)}` } }; } get defaultSVGProperties() { const bbox = this.#bbox; return { root: { viewBox: this.viewBox }, rootClass: { draw: true }, path: { d: this.toSVGPath(), "transform-origin": `${Outline.svgRound(bbox[0])} ${Outline.svgRound(bbox[1])}`, transform: this.rotationTransform || null }, bbox }; } }; ; InkDrawingOptions = class InkDrawingOptions extends DrawingOptions { constructor(viewerParameters) { super(); this._viewParameters = viewerParameters; super.updateProperties({ fill: "none", stroke: AnnotationEditor._defaultLineColor, "stroke-opacity": 1, "stroke-width": 1, "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-miterlimit": 10 }); } updateSVGProperty(name, value) { if (name === "stroke-width") { value ??= this["stroke-width"]; value *= this._viewParameters.realScale; } super.updateSVGProperty(name, value); } clone() { const clone = new InkDrawingOptions(this._viewParameters); clone.updateAll(this); return clone; } }; InkEditor = class InkEditor extends DrawingEditor { static _type = "ink"; static _editorType = AnnotationEditorType.INK; static _defaultDrawingOptions = null; constructor(params) { super({ ...params, name: "inkEditor" }); this._willKeepAspectRatio = true; this.defaultL10nId = "pdfjs-editor-ink-editor"; } static initialize(l10n, uiManager) { AnnotationEditor.initialize(l10n, uiManager); this._defaultDrawingOptions = new InkDrawingOptions(uiManager.viewParameters); } static getDefaultDrawingOptions(options) { const clone = this._defaultDrawingOptions.clone(); clone.updateProperties(options); return clone; } static get supportMultipleDrawings() { return true; } static get typesMap() { return shadow(this, "typesMap", new Map([ [AnnotationEditorParamsType.INK_THICKNESS, "stroke-width"], [AnnotationEditorParamsType.INK_COLOR, "stroke"], [AnnotationEditorParamsType.INK_OPACITY, "stroke-opacity"] ])); } static createDrawerInstance(x$2, y$3, parentWidth, parentHeight, rotation) { return new InkDrawOutliner(x$2, y$3, parentWidth, parentHeight, rotation, this._defaultDrawingOptions["stroke-width"]); } static deserializeDraw(pageX, pageY, pageWidth, pageHeight, innerMargin, data) { return InkDrawOutline.deserialize(pageX, pageY, pageWidth, pageHeight, innerMargin, data); } static async deserialize(data, parent, uiManager) { let initialData = null; if (data instanceof InkAnnotationElement) { const { data: { inkLists, rect, rotation, id, color, opacity, borderStyle: { rawWidth: thickness }, popupRef, richText, contentsObj, creationDate, modificationDate }, parent: { page: { pageNumber } } } = data; initialData = data = { annotationType: AnnotationEditorType.INK, color: Array.from(color), thickness, opacity, paths: { points: inkLists }, boxes: null, pageIndex: pageNumber - 1, rect: rect.slice(0), rotation, annotationElementId: id, id, deleted: false, popupRef, richText, comment: contentsObj?.str || null, creationDate, modificationDate }; } const editor = await super.deserialize(data, parent, uiManager); editor._initialData = initialData; if (data.comment) { editor.setCommentData(data); } return editor; } get toolbarButtons() { this._colorPicker ||= new BasicColorPicker(this); return [["colorPicker", this._colorPicker]]; } get colorType() { return AnnotationEditorParamsType.INK_COLOR; } get color() { return this._drawingOptions.stroke; } get opacity() { return this._drawingOptions["stroke-opacity"]; } onScaleChanging() { if (!this.parent) { return; } super.onScaleChanging(); const { _drawId, _drawingOptions, parent } = this; _drawingOptions.updateSVGProperty("stroke-width"); parent.drawLayer.updateProperties(_drawId, _drawingOptions.toSVGProperties()); } static onScaleChangingWhenDrawing() { const parent = this._currentParent; if (!parent) { return; } super.onScaleChangingWhenDrawing(); this._defaultDrawingOptions.updateSVGProperty("stroke-width"); parent.drawLayer.updateProperties(this._currentDrawId, this._defaultDrawingOptions.toSVGProperties()); } createDrawingOptions({ color, thickness, opacity }) { this._drawingOptions = InkEditor.getDefaultDrawingOptions({ stroke: Util.makeHexColor(...color), "stroke-width": thickness, "stroke-opacity": opacity }); } serialize(isForCopying = false) { if (this.isEmpty()) { return null; } if (this.deleted) { return this.serializeDeleted(); } const { lines, points } = this.serializeDraw(isForCopying); const { _drawingOptions: { stroke, "stroke-opacity": opacity, "stroke-width": thickness } } = this; const serialized = Object.assign(super.serialize(isForCopying), { color: AnnotationEditor._colorManager.convert(stroke), opacity, thickness, paths: { lines, points } }); this.addComment(serialized); if (isForCopying) { serialized.isCopy = true; return serialized; } if (this.annotationElementId && !this.#hasElementChanged(serialized)) { return null; } serialized.id = this.annotationElementId; return serialized; } #hasElementChanged(serialized) { const { color, thickness, opacity, pageIndex } = this._initialData; return this.hasEditedComment || this._hasBeenMoved || this._hasBeenResized || serialized.color.some((c$7, i$7) => c$7 !== color[i$7]) || serialized.thickness !== thickness || serialized.opacity !== opacity || serialized.pageIndex !== pageIndex; } renderAnnotationElement(annotation) { if (this.deleted) { annotation.hide(); return null; } const { points, rect } = this.serializeDraw(false); annotation.updateEdited({ rect, thickness: this._drawingOptions["stroke-width"], points, popup: this.comment }); return null; } }; ; ContourDrawOutline = class extends InkDrawOutline { toSVGPath() { let path$1 = super.toSVGPath(); if (!path$1.endsWith("Z")) { path$1 += "Z"; } return path$1; } }; ; BASE_HEADER_LENGTH = 8; POINTS_PROPERTIES_NUMBER = 3; SignatureExtractor = class { static #PARAMETERS = { maxDim: 512, sigmaSFactor: .02, sigmaR: 25, kernelSize: 16 }; static #neighborIndexToId(i0, j0, i$7, j$2) { i$7 -= i0; j$2 -= j0; if (i$7 === 0) { return j$2 > 0 ? 0 : 4; } if (i$7 === 1) { return j$2 + 6; } return 2 - j$2; } static #neighborIdToIndex = new Int32Array([ 0, 1, -1, 1, -1, 0, -1, -1, 0, -1, 1, -1, 1, 0, 1, 1 ]); static #clockwiseNonZero(buf, width, i0, j0, i$7, j$2, offset) { const id = this.#neighborIndexToId(i0, j0, i$7, j$2); for (let k$2 = 0; k$2 < 8; k$2++) { const kk = (-k$2 + id - offset + 16) % 8; const shiftI = this.#neighborIdToIndex[2 * kk]; const shiftJ = this.#neighborIdToIndex[2 * kk + 1]; if (buf[(i0 + shiftI) * width + (j0 + shiftJ)] !== 0) { return kk; } } return -1; } static #counterClockwiseNonZero(buf, width, i0, j0, i$7, j$2, offset) { const id = this.#neighborIndexToId(i0, j0, i$7, j$2); for (let k$2 = 0; k$2 < 8; k$2++) { const kk = (k$2 + id + offset + 16) % 8; const shiftI = this.#neighborIdToIndex[2 * kk]; const shiftJ = this.#neighborIdToIndex[2 * kk + 1]; if (buf[(i0 + shiftI) * width + (j0 + shiftJ)] !== 0) { return kk; } } return -1; } static #findContours(buf, width, height, threshold) { const N$2 = buf.length; const types = new Int32Array(N$2); for (let i$7 = 0; i$7 < N$2; i$7++) { types[i$7] = buf[i$7] <= threshold ? 1 : 0; } for (let i$7 = 1; i$7 < height - 1; i$7++) { types[i$7 * width] = types[i$7 * width + width - 1] = 0; } for (let i$7 = 0; i$7 < width; i$7++) { types[i$7] = types[width * height - 1 - i$7] = 0; } let nbd = 1; let lnbd; const contours = []; for (let i$7 = 1; i$7 < height - 1; i$7++) { lnbd = 1; for (let j$2 = 1; j$2 < width - 1; j$2++) { const ij = i$7 * width + j$2; const pix = types[ij]; if (pix === 0) { continue; } let i2 = i$7; let j2 = j$2; if (pix === 1 && types[ij - 1] === 0) { nbd += 1; j2 -= 1; } else if (pix >= 1 && types[ij + 1] === 0) { nbd += 1; j2 += 1; if (pix > 1) { lnbd = pix; } } else { if (pix !== 1) { lnbd = Math.abs(pix); } continue; } const points = [j$2, i$7]; const isHole = j2 === j$2 + 1; const contour = { isHole, points, id: nbd, parent: 0 }; contours.push(contour); let contour0; for (const c$7 of contours) { if (c$7.id === lnbd) { contour0 = c$7; break; } } if (!contour0) { contour.parent = isHole ? lnbd : 0; } else if (contour0.isHole) { contour.parent = isHole ? contour0.parent : lnbd; } else { contour.parent = isHole ? lnbd : contour0.parent; } const k$2 = this.#clockwiseNonZero(types, width, i$7, j$2, i2, j2, 0); if (k$2 === -1) { types[ij] = -nbd; if (types[ij] !== 1) { lnbd = Math.abs(types[ij]); } continue; } let shiftI = this.#neighborIdToIndex[2 * k$2]; let shiftJ = this.#neighborIdToIndex[2 * k$2 + 1]; const i1 = i$7 + shiftI; const j1 = j$2 + shiftJ; i2 = i1; j2 = j1; let i3 = i$7; let j3 = j$2; while (true) { const kk = this.#counterClockwiseNonZero(types, width, i3, j3, i2, j2, 1); shiftI = this.#neighborIdToIndex[2 * kk]; shiftJ = this.#neighborIdToIndex[2 * kk + 1]; const i4 = i3 + shiftI; const j4 = j3 + shiftJ; points.push(j4, i4); const ij3 = i3 * width + j3; if (types[ij3 + 1] === 0) { types[ij3] = -nbd; } else if (types[ij3] === 1) { types[ij3] = nbd; } if (i4 === i$7 && j4 === j$2 && i3 === i1 && j3 === j1) { if (types[ij] !== 1) { lnbd = Math.abs(types[ij]); } break; } else { i2 = i3; j2 = j3; i3 = i4; j3 = j4; } } } } return contours; } static #douglasPeuckerHelper(points, start, end, output) { if (end - start <= 4) { for (let i$7 = start; i$7 < end - 2; i$7 += 2) { output.push(points[i$7], points[i$7 + 1]); } return; } const ax = points[start]; const ay = points[start + 1]; const abx = points[end - 4] - ax; const aby = points[end - 3] - ay; const dist = Math.hypot(abx, aby); const nabx = abx / dist; const naby = aby / dist; const aa = nabx * ay - naby * ax; const m$3 = aby / abx; const invS = 1 / dist; const phi = Math.atan(m$3); const cosPhi = Math.cos(phi); const sinPhi = Math.sin(phi); const tmax = invS * (Math.abs(cosPhi) + Math.abs(sinPhi)); const poly = invS * (1 - tmax + tmax ** 2); const partialPhi = Math.max(Math.atan(Math.abs(sinPhi + cosPhi) * poly), Math.atan(Math.abs(sinPhi - cosPhi) * poly)); let dmax = 0; let index = start; for (let i$7 = start + 2; i$7 < end - 2; i$7 += 2) { const d$5 = Math.abs(aa - nabx * points[i$7 + 1] + naby * points[i$7]); if (d$5 > dmax) { index = i$7; dmax = d$5; } } if (dmax > (dist * partialPhi) ** 2) { this.#douglasPeuckerHelper(points, start, index + 2, output); this.#douglasPeuckerHelper(points, index, end, output); } else { output.push(ax, ay); } } static #douglasPeucker(points) { const output = []; const len = points.length; this.#douglasPeuckerHelper(points, 0, len, output); output.push(points[len - 2], points[len - 1]); return output.length <= 4 ? null : output; } static #bilateralFilter(buf, width, height, sigmaS, sigmaR, kernelSize) { const kernel = new Float32Array(kernelSize ** 2); const sigmaS2 = -2 * sigmaS ** 2; const halfSize = kernelSize >> 1; for (let i$7 = 0; i$7 < kernelSize; i$7++) { const x$2 = (i$7 - halfSize) ** 2; for (let j$2 = 0; j$2 < kernelSize; j$2++) { kernel[i$7 * kernelSize + j$2] = Math.exp((x$2 + (j$2 - halfSize) ** 2) / sigmaS2); } } const rangeValues = new Float32Array(256); const sigmaR2 = -2 * sigmaR ** 2; for (let i$7 = 0; i$7 < 256; i$7++) { rangeValues[i$7] = Math.exp(i$7 ** 2 / sigmaR2); } const N$2 = buf.length; const out = new Uint8Array(N$2); const histogram = new Uint32Array(256); for (let i$7 = 0; i$7 < height; i$7++) { for (let j$2 = 0; j$2 < width; j$2++) { const ij = i$7 * width + j$2; const center = buf[ij]; let sum = 0; let norm = 0; for (let k$2 = 0; k$2 < kernelSize; k$2++) { const y$3 = i$7 + k$2 - halfSize; if (y$3 < 0 || y$3 >= height) { continue; } for (let l$3 = 0; l$3 < kernelSize; l$3++) { const x$2 = j$2 + l$3 - halfSize; if (x$2 < 0 || x$2 >= width) { continue; } const neighbour = buf[y$3 * width + x$2]; const w$2 = kernel[k$2 * kernelSize + l$3] * rangeValues[Math.abs(neighbour - center)]; sum += neighbour * w$2; norm += w$2; } } const pix = out[ij] = Math.round(sum / norm); histogram[pix]++; } } return [out, histogram]; } static #getHistogram(buf) { const histogram = new Uint32Array(256); for (const g$1 of buf) { histogram[g$1]++; } return histogram; } static #toUint8(buf) { const N$2 = buf.length; const out = new Uint8ClampedArray(N$2 >> 2); let max = -Infinity; let min = Infinity; for (let i$7 = 0, ii = out.length; i$7 < ii; i$7++) { const pix = out[i$7] = buf[i$7 << 2]; max = Math.max(max, pix); min = Math.min(min, pix); } const ratio = 255 / (max - min); for (let i$7 = 0, ii = out.length; i$7 < ii; i$7++) { out[i$7] = (out[i$7] - min) * ratio; } return out; } static #guessThreshold(histogram) { let i$7; let M$3 = -Infinity; let L$2 = -Infinity; const min = histogram.findIndex((v$3) => v$3 !== 0); let pos = min; let spos = min; for (i$7 = min; i$7 < 256; i$7++) { const v$3 = histogram[i$7]; if (v$3 > M$3) { if (i$7 - pos > L$2) { L$2 = i$7 - pos; spos = i$7 - 1; } M$3 = v$3; pos = i$7; } } for (i$7 = spos - 1; i$7 >= 0; i$7--) { if (histogram[i$7] > histogram[i$7 + 1]) { break; } } return i$7; } static #getGrayPixels(bitmap) { const originalBitmap = bitmap; const { width, height } = bitmap; const { maxDim } = this.#PARAMETERS; let newWidth = width; let newHeight = height; if (width > maxDim || height > maxDim) { let prevWidth = width; let prevHeight = height; let steps = Math.log2(Math.max(width, height) / maxDim); const isteps = Math.floor(steps); steps = steps === isteps ? isteps - 1 : isteps; for (let i$7 = 0; i$7 < steps; i$7++) { newWidth = Math.ceil(prevWidth / 2); newHeight = Math.ceil(prevHeight / 2); const offscreen$1 = new OffscreenCanvas(newWidth, newHeight); const ctx$1 = offscreen$1.getContext("2d"); ctx$1.drawImage(bitmap, 0, 0, prevWidth, prevHeight, 0, 0, newWidth, newHeight); prevWidth = newWidth; prevHeight = newHeight; if (bitmap !== originalBitmap) { bitmap.close(); } bitmap = offscreen$1.transferToImageBitmap(); } const ratio = Math.min(maxDim / newWidth, maxDim / newHeight); newWidth = Math.round(newWidth * ratio); newHeight = Math.round(newHeight * ratio); } const offscreen = new OffscreenCanvas(newWidth, newHeight); const ctx = offscreen.getContext("2d", { willReadFrequently: true }); ctx.fillStyle = "white"; ctx.fillRect(0, 0, newWidth, newHeight); ctx.filter = "grayscale(1)"; ctx.drawImage(bitmap, 0, 0, bitmap.width, bitmap.height, 0, 0, newWidth, newHeight); const grayImage = ctx.getImageData(0, 0, newWidth, newHeight).data; const uint8Buf = this.#toUint8(grayImage); return [ uint8Buf, newWidth, newHeight ]; } static extractContoursFromText(text$2, { fontFamily, fontStyle, fontWeight }, pageWidth, pageHeight, rotation, innerMargin) { let canvas = new OffscreenCanvas(1, 1); let ctx = canvas.getContext("2d", { alpha: false }); const fontSize = 200; const font = ctx.font = `${fontStyle} ${fontWeight} ${fontSize}px ${fontFamily}`; const { actualBoundingBoxLeft, actualBoundingBoxRight, actualBoundingBoxAscent, actualBoundingBoxDescent, fontBoundingBoxAscent, fontBoundingBoxDescent, width } = ctx.measureText(text$2); const SCALE = 1.5; const canvasWidth = Math.ceil(Math.max(Math.abs(actualBoundingBoxLeft) + Math.abs(actualBoundingBoxRight) || 0, width) * SCALE); const canvasHeight = Math.ceil(Math.max(Math.abs(actualBoundingBoxAscent) + Math.abs(actualBoundingBoxDescent) || fontSize, Math.abs(fontBoundingBoxAscent) + Math.abs(fontBoundingBoxDescent) || fontSize) * SCALE); canvas = new OffscreenCanvas(canvasWidth, canvasHeight); ctx = canvas.getContext("2d", { alpha: true, willReadFrequently: true }); ctx.font = font; ctx.filter = "grayscale(1)"; ctx.fillStyle = "white"; ctx.fillRect(0, 0, canvasWidth, canvasHeight); ctx.fillStyle = "black"; ctx.fillText(text$2, canvasWidth * (SCALE - 1) / 2, canvasHeight * (3 - SCALE) / 2); const uint8Buf = this.#toUint8(ctx.getImageData(0, 0, canvasWidth, canvasHeight).data); const histogram = this.#getHistogram(uint8Buf); const threshold = this.#guessThreshold(histogram); const contourList = this.#findContours(uint8Buf, canvasWidth, canvasHeight, threshold); return this.processDrawnLines({ lines: { curves: contourList, width: canvasWidth, height: canvasHeight }, pageWidth, pageHeight, rotation, innerMargin, mustSmooth: true, areContours: true }); } static process(bitmap, pageWidth, pageHeight, rotation, innerMargin) { const [uint8Buf, width, height] = this.#getGrayPixels(bitmap); const [buffer, histogram] = this.#bilateralFilter(uint8Buf, width, height, Math.hypot(width, height) * this.#PARAMETERS.sigmaSFactor, this.#PARAMETERS.sigmaR, this.#PARAMETERS.kernelSize); const threshold = this.#guessThreshold(histogram); const contourList = this.#findContours(buffer, width, height, threshold); return this.processDrawnLines({ lines: { curves: contourList, width, height }, pageWidth, pageHeight, rotation, innerMargin, mustSmooth: true, areContours: true }); } static processDrawnLines({ lines, pageWidth, pageHeight, rotation, innerMargin, mustSmooth, areContours }) { if (rotation % 180 !== 0) { [pageWidth, pageHeight] = [pageHeight, pageWidth]; } const { curves, width, height } = lines; const thickness = lines.thickness ?? 0; const linesAndPoints = []; const ratio = Math.min(pageWidth / width, pageHeight / height); const xScale = ratio / pageWidth; const yScale = ratio / pageHeight; const newCurves = []; for (const { points } of curves) { const reducedPoints = mustSmooth ? this.#douglasPeucker(points) : points; if (!reducedPoints) { continue; } newCurves.push(reducedPoints); const len = reducedPoints.length; const newPoints = new Float32Array(len); const line = new Float32Array(3 * (len === 2 ? 2 : len - 2)); linesAndPoints.push({ line, points: newPoints }); if (len === 2) { newPoints[0] = reducedPoints[0] * xScale; newPoints[1] = reducedPoints[1] * yScale; line.set([ NaN, NaN, NaN, NaN, newPoints[0], newPoints[1] ], 0); continue; } let [x1, y1, x2, y2] = reducedPoints; x1 *= xScale; y1 *= yScale; x2 *= xScale; y2 *= yScale; newPoints.set([ x1, y1, x2, y2 ], 0); line.set([ NaN, NaN, NaN, NaN, x1, y1 ], 0); for (let i$7 = 4; i$7 < len; i$7 += 2) { const x$2 = newPoints[i$7] = reducedPoints[i$7] * xScale; const y$3 = newPoints[i$7 + 1] = reducedPoints[i$7 + 1] * yScale; line.set(Outline.createBezierPoints(x1, y1, x2, y2, x$2, y$3), (i$7 - 2) * 3); [x1, y1, x2, y2] = [ x2, y2, x$2, y$3 ]; } } if (linesAndPoints.length === 0) { return null; } const outline = areContours ? new ContourDrawOutline() : new InkDrawOutline(); outline.build(linesAndPoints, pageWidth, pageHeight, 1, rotation, areContours ? 0 : thickness, innerMargin); return { outline, newCurves, areContours, thickness, width, height }; } static async compressSignature({ outlines, areContours, thickness, width, height }) { let minDiff = Infinity; let maxDiff = -Infinity; let outlinesLength = 0; for (const points of outlines) { outlinesLength += points.length; for (let i$7 = 2, ii = points.length; i$7 < ii; i$7++) { const dx = points[i$7] - points[i$7 - 2]; minDiff = Math.min(minDiff, dx); maxDiff = Math.max(maxDiff, dx); } } let bufferType; if (minDiff >= -128 && maxDiff <= 127) { bufferType = Int8Array; } else if (minDiff >= -32768 && maxDiff <= 32767) { bufferType = Int16Array; } else { bufferType = Int32Array; } const len = outlines.length; const headerLength = BASE_HEADER_LENGTH + POINTS_PROPERTIES_NUMBER * len; const header = new Uint32Array(headerLength); let offset = 0; header[offset++] = headerLength * Uint32Array.BYTES_PER_ELEMENT + (outlinesLength - 2 * len) * bufferType.BYTES_PER_ELEMENT; header[offset++] = 0; header[offset++] = width; header[offset++] = height; header[offset++] = areContours ? 0 : 1; header[offset++] = Math.max(0, Math.floor(thickness ?? 0)); header[offset++] = len; header[offset++] = bufferType.BYTES_PER_ELEMENT; for (const points of outlines) { header[offset++] = points.length - 2; header[offset++] = points[0]; header[offset++] = points[1]; } const cs = new CompressionStream("deflate-raw"); const writer = cs.writable.getWriter(); await writer.ready; writer.write(header); const BufferCtor = bufferType.prototype.constructor; for (const points of outlines) { const diffs = new BufferCtor(points.length - 2); for (let i$7 = 2, ii = points.length; i$7 < ii; i$7++) { diffs[i$7 - 2] = points[i$7] - points[i$7 - 2]; } writer.write(diffs); } writer.close(); const buf = await new Response(cs.readable).arrayBuffer(); const bytes = new Uint8Array(buf); return toBase64Util(bytes); } static async decompressSignature(signatureData) { try { const bytes = fromBase64Util(signatureData); const { readable, writable } = new DecompressionStream("deflate-raw"); const writer = writable.getWriter(); await writer.ready; writer.write(bytes).then(async () => { await writer.ready; await writer.close(); }).catch(() => {}); let data = null; let offset = 0; for await (const chunk of readable) { data ||= new Uint8Array(new Uint32Array(chunk.buffer, 0, 4)[0]); data.set(chunk, offset); offset += chunk.length; } const header = new Uint32Array(data.buffer, 0, data.length >> 2); const version$6 = header[1]; if (version$6 !== 0) { throw new Error(`Invalid version: ${version$6}`); } const width = header[2]; const height = header[3]; const areContours = header[4] === 0; const thickness = header[5]; const numberOfDrawings = header[6]; const bufferType = header[7]; const outlines = []; const diffsOffset = (BASE_HEADER_LENGTH + POINTS_PROPERTIES_NUMBER * numberOfDrawings) * Uint32Array.BYTES_PER_ELEMENT; let diffs; switch (bufferType) { case Int8Array.BYTES_PER_ELEMENT: diffs = new Int8Array(data.buffer, diffsOffset); break; case Int16Array.BYTES_PER_ELEMENT: diffs = new Int16Array(data.buffer, diffsOffset); break; case Int32Array.BYTES_PER_ELEMENT: diffs = new Int32Array(data.buffer, diffsOffset); break; } offset = 0; for (let i$7 = 0; i$7 < numberOfDrawings; i$7++) { const len = header[POINTS_PROPERTIES_NUMBER * i$7 + BASE_HEADER_LENGTH]; const points = new Float32Array(len + 2); outlines.push(points); for (let j$2 = 0; j$2 < POINTS_PROPERTIES_NUMBER - 1; j$2++) { points[j$2] = header[POINTS_PROPERTIES_NUMBER * i$7 + BASE_HEADER_LENGTH + j$2 + 1]; } for (let j$2 = 0; j$2 < len; j$2++) { points[j$2 + 2] = points[j$2] + diffs[offset++]; } } return { areContours, thickness, outlines, width, height }; } catch (e$10) { warn$2(`decompressSignature: ${e$10}`); return null; } } }; ; SignatureOptions = class SignatureOptions extends DrawingOptions { constructor() { super(); super.updateProperties({ fill: AnnotationEditor._defaultLineColor, "stroke-width": 0 }); } clone() { const clone = new SignatureOptions(); clone.updateAll(this); return clone; } }; DrawnSignatureOptions = class DrawnSignatureOptions extends InkDrawingOptions { constructor(viewerParameters) { super(viewerParameters); super.updateProperties({ stroke: AnnotationEditor._defaultLineColor, "stroke-width": 1 }); } clone() { const clone = new DrawnSignatureOptions(this._viewParameters); clone.updateAll(this); return clone; } }; SignatureEditor = class SignatureEditor extends DrawingEditor { #isExtracted = false; #description = null; #signatureData = null; #signatureUUID = null; static _type = "signature"; static _editorType = AnnotationEditorType.SIGNATURE; static _defaultDrawingOptions = null; constructor(params) { super({ ...params, mustBeCommitted: true, name: "signatureEditor" }); this._willKeepAspectRatio = true; this.#signatureData = params.signatureData || null; this.#description = null; this.defaultL10nId = "pdfjs-editor-signature-editor1"; } static initialize(l10n, uiManager) { AnnotationEditor.initialize(l10n, uiManager); this._defaultDrawingOptions = new SignatureOptions(); this._defaultDrawnSignatureOptions = new DrawnSignatureOptions(uiManager.viewParameters); } static getDefaultDrawingOptions(options) { const clone = this._defaultDrawingOptions.clone(); clone.updateProperties(options); return clone; } static get supportMultipleDrawings() { return false; } static get typesMap() { return shadow(this, "typesMap", new Map()); } static get isDrawer() { return false; } get telemetryFinalData() { return { type: "signature", hasDescription: !!this.#description }; } static computeTelemetryFinalData(data) { const hasDescriptionStats = data.get("hasDescription"); return { hasAltText: hasDescriptionStats.get(true) ?? 0, hasNoAltText: hasDescriptionStats.get(false) ?? 0 }; } get isResizable() { return true; } onScaleChanging() { if (this._drawId === null) { return; } super.onScaleChanging(); } render() { if (this.div) { return this.div; } let baseX, baseY; const { _isCopy } = this; if (_isCopy) { this._isCopy = false; baseX = this.x; baseY = this.y; } super.render(); if (this._drawId === null) { if (this.#signatureData) { const { lines, mustSmooth, areContours, description, uuid, heightInPage } = this.#signatureData; const { rawDims: { pageWidth, pageHeight }, rotation } = this.parent.viewport; const outline = SignatureExtractor.processDrawnLines({ lines, pageWidth, pageHeight, rotation, innerMargin: SignatureEditor._INNER_MARGIN, mustSmooth, areContours }); this.addSignature(outline, heightInPage, description, uuid); } else { this.div.setAttribute("data-l10n-args", JSON.stringify({ description: "" })); this.div.hidden = true; this._uiManager.getSignature(this); } } else { this.div.setAttribute("data-l10n-args", JSON.stringify({ description: this.#description || "" })); } if (_isCopy) { this._isCopy = true; this._moveAfterPaste(baseX, baseY); } return this.div; } setUuid(uuid) { this.#signatureUUID = uuid; this.addEditToolbar(); } getUuid() { return this.#signatureUUID; } get description() { return this.#description; } set description(description) { this.#description = description; if (!this.div) { return; } this.div.setAttribute("data-l10n-args", JSON.stringify({ description })); super.addEditToolbar().then((toolbar) => { toolbar?.updateEditSignatureButton(description); }); } getSignaturePreview() { const { newCurves, areContours, thickness, width, height } = this.#signatureData; const maxDim = Math.max(width, height); const outlineData = SignatureExtractor.processDrawnLines({ lines: { curves: newCurves.map((points) => ({ points })), thickness, width, height }, pageWidth: maxDim, pageHeight: maxDim, rotation: 0, innerMargin: 0, mustSmooth: false, areContours }); return { areContours, outline: outlineData.outline }; } get toolbarButtons() { if (this._uiManager.signatureManager) { return [["editSignature", this._uiManager.signatureManager]]; } return super.toolbarButtons; } addSignature(data, heightInPage, description, uuid) { const { x: savedX, y: savedY } = this; const { outline } = this.#signatureData = data; this.#isExtracted = outline instanceof ContourDrawOutline; this.description = description; let drawingOptions; if (this.#isExtracted) { drawingOptions = SignatureEditor.getDefaultDrawingOptions(); } else { drawingOptions = SignatureEditor._defaultDrawnSignatureOptions.clone(); drawingOptions.updateProperties({ "stroke-width": outline.thickness }); } this._addOutlines({ drawOutlines: outline, drawingOptions }); const [, pageHeight] = this.pageDimensions; let newHeight = heightInPage / pageHeight; newHeight = newHeight >= 1 ? .5 : newHeight; this.width *= newHeight / this.height; if (this.width >= 1) { newHeight *= .9 / this.width; this.width = .9; } this.height = newHeight; this.setDims(); this.x = savedX; this.y = savedY; this.center(); this._onResized(); this.onScaleChanging(); this.rotate(); this._uiManager.addToAnnotationStorage(this); this.setUuid(uuid); this._reportTelemetry({ action: "pdfjs.signature.inserted", data: { hasBeenSaved: !!uuid, hasDescription: !!description } }); this.div.hidden = false; } getFromImage(bitmap) { const { rawDims: { pageWidth, pageHeight }, rotation } = this.parent.viewport; return SignatureExtractor.process(bitmap, pageWidth, pageHeight, rotation, SignatureEditor._INNER_MARGIN); } getFromText(text$2, fontInfo) { const { rawDims: { pageWidth, pageHeight }, rotation } = this.parent.viewport; return SignatureExtractor.extractContoursFromText(text$2, fontInfo, pageWidth, pageHeight, rotation, SignatureEditor._INNER_MARGIN); } getDrawnSignature(curves) { const { rawDims: { pageWidth, pageHeight }, rotation } = this.parent.viewport; return SignatureExtractor.processDrawnLines({ lines: curves, pageWidth, pageHeight, rotation, innerMargin: SignatureEditor._INNER_MARGIN, mustSmooth: false, areContours: false }); } createDrawingOptions({ areContours, thickness }) { if (areContours) { this._drawingOptions = SignatureEditor.getDefaultDrawingOptions(); } else { this._drawingOptions = SignatureEditor._defaultDrawnSignatureOptions.clone(); this._drawingOptions.updateProperties({ "stroke-width": thickness }); } } serialize(isForCopying = false) { if (this.isEmpty()) { return null; } const { lines, points } = this.serializeDraw(isForCopying); const { _drawingOptions: { "stroke-width": thickness } } = this; const serialized = Object.assign(super.serialize(isForCopying), { isSignature: true, areContours: this.#isExtracted, color: [ 0, 0, 0 ], thickness: this.#isExtracted ? 0 : thickness }); this.addComment(serialized); if (isForCopying) { serialized.paths = { lines, points }; serialized.uuid = this.#signatureUUID; serialized.isCopy = true; } else { serialized.lines = lines; } if (this.#description) { serialized.accessibilityData = { type: "Figure", alt: this.#description }; } return serialized; } static deserializeDraw(pageX, pageY, pageWidth, pageHeight, innerMargin, data) { if (data.areContours) { return ContourDrawOutline.deserialize(pageX, pageY, pageWidth, pageHeight, innerMargin, data); } return InkDrawOutline.deserialize(pageX, pageY, pageWidth, pageHeight, innerMargin, data); } static async deserialize(data, parent, uiManager) { const editor = await super.deserialize(data, parent, uiManager); editor.#isExtracted = data.areContours; editor.description = data.accessibilityData?.alt || ""; editor.#signatureUUID = data.uuid; return editor; } }; ; StampEditor = class extends AnnotationEditor { #bitmap = null; #bitmapId = null; #bitmapPromise = null; #bitmapUrl = null; #bitmapFile = null; #bitmapFileName = ""; #canvas = null; #missingCanvas = false; #resizeTimeoutId = null; #isSvg = false; #hasBeenAddedInUndoStack = false; static _type = "stamp"; static _editorType = AnnotationEditorType.STAMP; constructor(params) { super({ ...params, name: "stampEditor" }); this.#bitmapUrl = params.bitmapUrl; this.#bitmapFile = params.bitmapFile; this.defaultL10nId = "pdfjs-editor-stamp-editor"; } static initialize(l10n, uiManager) { AnnotationEditor.initialize(l10n, uiManager); } static isHandlingMimeForPasting(mime) { return SupportedImageMimeTypes.includes(mime); } static paste(item, parent) { parent.pasteEditor({ mode: AnnotationEditorType.STAMP }, { bitmapFile: item.getAsFile() }); } altTextFinish() { if (this._uiManager.useNewAltTextFlow) { this.div.hidden = false; } super.altTextFinish(); } get telemetryFinalData() { return { type: "stamp", hasAltText: !!this.altTextData?.altText }; } static computeTelemetryFinalData(data) { const hasAltTextStats = data.get("hasAltText"); return { hasAltText: hasAltTextStats.get(true) ?? 0, hasNoAltText: hasAltTextStats.get(false) ?? 0 }; } #getBitmapFetched(data, fromId = false) { if (!data) { this.remove(); return; } this.#bitmap = data.bitmap; if (!fromId) { this.#bitmapId = data.id; this.#isSvg = data.isSvg; } if (data.file) { this.#bitmapFileName = data.file.name; } this.#createCanvas(); } #getBitmapDone() { this.#bitmapPromise = null; this._uiManager.enableWaiting(false); if (!this.#canvas) { return; } if (this._uiManager.useNewAltTextWhenAddingImage && this._uiManager.useNewAltTextFlow && this.#bitmap) { this.addEditToolbar().then(() => { this._editToolbar.hide(); this._uiManager.editAltText(this, true); }); return; } if (!this._uiManager.useNewAltTextWhenAddingImage && this._uiManager.useNewAltTextFlow && this.#bitmap) { this._reportTelemetry({ action: "pdfjs.image.image_added", data: { alt_text_modal: false, alt_text_type: "empty" } }); try { this.mlGuessAltText(); } catch {} } this.div.focus(); } async mlGuessAltText(imageData = null, updateAltTextData = true) { if (this.hasAltTextData()) { return null; } const { mlManager } = this._uiManager; if (!mlManager) { throw new Error("No ML."); } if (!await mlManager.isEnabledFor("altText")) { throw new Error("ML isn't enabled for alt text."); } const { data, width, height } = imageData || this.copyCanvas(null, null, true).imageData; const response = await mlManager.guess({ name: "altText", request: { data, width, height, channels: data.length / (width * height) } }); if (!response) { throw new Error("No response from the AI service."); } if (response.error) { throw new Error("Error from the AI service."); } if (response.cancel) { return null; } if (!response.output) { throw new Error("No valid response from the AI service."); } const altText = response.output; await this.setGuessedAltText(altText); if (updateAltTextData && !this.hasAltTextData()) { this.altTextData = { alt: altText, decorative: false }; } return altText; } #getBitmap() { if (this.#bitmapId) { this._uiManager.enableWaiting(true); this._uiManager.imageManager.getFromId(this.#bitmapId).then((data) => this.#getBitmapFetched(data, true)).finally(() => this.#getBitmapDone()); return; } if (this.#bitmapUrl) { const url = this.#bitmapUrl; this.#bitmapUrl = null; this._uiManager.enableWaiting(true); this.#bitmapPromise = this._uiManager.imageManager.getFromUrl(url).then((data) => this.#getBitmapFetched(data)).finally(() => this.#getBitmapDone()); return; } if (this.#bitmapFile) { const file = this.#bitmapFile; this.#bitmapFile = null; this._uiManager.enableWaiting(true); this.#bitmapPromise = this._uiManager.imageManager.getFromFile(file).then((data) => this.#getBitmapFetched(data)).finally(() => this.#getBitmapDone()); return; } const input = document.createElement("input"); input.type = "file"; input.accept = SupportedImageMimeTypes.join(","); const signal = this._uiManager._signal; this.#bitmapPromise = new Promise((resolve) => { input.addEventListener("change", async () => { if (!input.files || input.files.length === 0) { this.remove(); } else { this._uiManager.enableWaiting(true); const data = await this._uiManager.imageManager.getFromFile(input.files[0]); this._reportTelemetry({ action: "pdfjs.image.image_selected", data: { alt_text_modal: this._uiManager.useNewAltTextFlow } }); this.#getBitmapFetched(data); } resolve(); }, { signal }); input.addEventListener("cancel", () => { this.remove(); resolve(); }, { signal }); }).finally(() => this.#getBitmapDone()); input.click(); } remove() { if (this.#bitmapId) { this.#bitmap = null; this._uiManager.imageManager.deleteId(this.#bitmapId); this.#canvas?.remove(); this.#canvas = null; if (this.#resizeTimeoutId) { clearTimeout(this.#resizeTimeoutId); this.#resizeTimeoutId = null; } } super.remove(); } rebuild() { if (!this.parent) { if (this.#bitmapId) { this.#getBitmap(); } return; } super.rebuild(); if (this.div === null) { return; } if (this.#bitmapId && this.#canvas === null) { this.#getBitmap(); } if (!this.isAttachedToDOM) { this.parent.add(this); } } onceAdded(focus) { this._isDraggable = true; if (focus) { this.div.focus(); } } isEmpty() { return !(this.#bitmapPromise || this.#bitmap || this.#bitmapUrl || this.#bitmapFile || this.#bitmapId || this.#missingCanvas); } get toolbarButtons() { return [["altText", this.createAltText()]]; } get isResizable() { return true; } render() { if (this.div) { return this.div; } let baseX, baseY; if (this._isCopy) { baseX = this.x; baseY = this.y; } super.render(); this.div.hidden = true; this.createAltText(); if (!this.#missingCanvas) { if (this.#bitmap) { this.#createCanvas(); } else { this.#getBitmap(); } } if (this._isCopy) { this._moveAfterPaste(baseX, baseY); } this._uiManager.addShouldRescale(this); return this.div; } setCanvas(annotationElementId, canvas) { const { id: bitmapId, bitmap } = this._uiManager.imageManager.getFromCanvas(annotationElementId, canvas); canvas.remove(); if (bitmapId && this._uiManager.imageManager.isValidId(bitmapId)) { this.#bitmapId = bitmapId; if (bitmap) { this.#bitmap = bitmap; } this.#missingCanvas = false; this.#createCanvas(); } } _onResized() { this.onScaleChanging(); } onScaleChanging() { if (!this.parent) { return; } if (this.#resizeTimeoutId !== null) { clearTimeout(this.#resizeTimeoutId); } const TIME_TO_WAIT = 200; this.#resizeTimeoutId = setTimeout(() => { this.#resizeTimeoutId = null; this.#drawBitmap(); }, TIME_TO_WAIT); } #createCanvas() { const { div } = this; let { width, height } = this.#bitmap; const [pageWidth, pageHeight] = this.pageDimensions; const MAX_RATIO = .75; if (this.width) { width = this.width * pageWidth; height = this.height * pageHeight; } else if (width > MAX_RATIO * pageWidth || height > MAX_RATIO * pageHeight) { const factor = Math.min(MAX_RATIO * pageWidth / width, MAX_RATIO * pageHeight / height); width *= factor; height *= factor; } this._uiManager.enableWaiting(false); const canvas = this.#canvas = document.createElement("canvas"); canvas.setAttribute("role", "img"); this.addContainer(canvas); this.width = width / pageWidth; this.height = height / pageHeight; this.setDims(); if (this._initialOptions?.isCentered) { this.center(); } else { this.fixAndSetPosition(); } this._initialOptions = null; if (!this._uiManager.useNewAltTextWhenAddingImage || !this._uiManager.useNewAltTextFlow || this.annotationElementId) { div.hidden = false; } this.#drawBitmap(); if (!this.#hasBeenAddedInUndoStack) { this.parent.addUndoableEditor(this); this.#hasBeenAddedInUndoStack = true; } this._reportTelemetry({ action: "inserted_image" }); if (this.#bitmapFileName) { this.div.setAttribute("aria-description", this.#bitmapFileName); } if (!this.annotationElementId) { this._uiManager.a11yAlert("pdfjs-editor-stamp-added-alert"); } } copyCanvas(maxDataDimension, maxPreviewDimension, createImageData = false) { if (!maxDataDimension) { maxDataDimension = 224; } const { width: bitmapWidth, height: bitmapHeight } = this.#bitmap; const outputScale = new OutputScale(); let bitmap = this.#bitmap; let width = bitmapWidth, height = bitmapHeight; let canvas = null; if (maxPreviewDimension) { if (bitmapWidth > maxPreviewDimension || bitmapHeight > maxPreviewDimension) { const ratio = Math.min(maxPreviewDimension / bitmapWidth, maxPreviewDimension / bitmapHeight); width = Math.floor(bitmapWidth * ratio); height = Math.floor(bitmapHeight * ratio); } canvas = document.createElement("canvas"); const scaledWidth = canvas.width = Math.ceil(width * outputScale.sx); const scaledHeight = canvas.height = Math.ceil(height * outputScale.sy); if (!this.#isSvg) { bitmap = this.#scaleBitmap(scaledWidth, scaledHeight); } const ctx = canvas.getContext("2d"); ctx.filter = this._uiManager.hcmFilter; let white = "white", black = "#cfcfd8"; if (this._uiManager.hcmFilter !== "none") { black = "black"; } else if (ColorScheme.isDarkMode) { white = "#8f8f9d"; black = "#42414d"; } const boxDim = 15; const boxDimWidth = boxDim * outputScale.sx; const boxDimHeight = boxDim * outputScale.sy; const pattern = new OffscreenCanvas(boxDimWidth * 2, boxDimHeight * 2); const patternCtx = pattern.getContext("2d"); patternCtx.fillStyle = white; patternCtx.fillRect(0, 0, boxDimWidth * 2, boxDimHeight * 2); patternCtx.fillStyle = black; patternCtx.fillRect(0, 0, boxDimWidth, boxDimHeight); patternCtx.fillRect(boxDimWidth, boxDimHeight, boxDimWidth, boxDimHeight); ctx.fillStyle = ctx.createPattern(pattern, "repeat"); ctx.fillRect(0, 0, scaledWidth, scaledHeight); ctx.drawImage(bitmap, 0, 0, bitmap.width, bitmap.height, 0, 0, scaledWidth, scaledHeight); } let imageData = null; if (createImageData) { let dataWidth, dataHeight; if (outputScale.symmetric && bitmap.width < maxDataDimension && bitmap.height < maxDataDimension) { dataWidth = bitmap.width; dataHeight = bitmap.height; } else { bitmap = this.#bitmap; if (bitmapWidth > maxDataDimension || bitmapHeight > maxDataDimension) { const ratio = Math.min(maxDataDimension / bitmapWidth, maxDataDimension / bitmapHeight); dataWidth = Math.floor(bitmapWidth * ratio); dataHeight = Math.floor(bitmapHeight * ratio); if (!this.#isSvg) { bitmap = this.#scaleBitmap(dataWidth, dataHeight); } } } const offscreen = new OffscreenCanvas(dataWidth, dataHeight); const offscreenCtx = offscreen.getContext("2d", { willReadFrequently: true }); offscreenCtx.drawImage(bitmap, 0, 0, bitmap.width, bitmap.height, 0, 0, dataWidth, dataHeight); imageData = { width: dataWidth, height: dataHeight, data: offscreenCtx.getImageData(0, 0, dataWidth, dataHeight).data }; } return { canvas, width, height, imageData }; } #scaleBitmap(width, height) { const { width: bitmapWidth, height: bitmapHeight } = this.#bitmap; let newWidth = bitmapWidth; let newHeight = bitmapHeight; let bitmap = this.#bitmap; while (newWidth > 2 * width || newHeight > 2 * height) { const prevWidth = newWidth; const prevHeight = newHeight; if (newWidth > 2 * width) { newWidth = newWidth >= 16384 ? Math.floor(newWidth / 2) - 1 : Math.ceil(newWidth / 2); } if (newHeight > 2 * height) { newHeight = newHeight >= 16384 ? Math.floor(newHeight / 2) - 1 : Math.ceil(newHeight / 2); } const offscreen = new OffscreenCanvas(newWidth, newHeight); const ctx = offscreen.getContext("2d"); ctx.drawImage(bitmap, 0, 0, prevWidth, prevHeight, 0, 0, newWidth, newHeight); bitmap = offscreen.transferToImageBitmap(); } return bitmap; } #drawBitmap() { const [parentWidth, parentHeight] = this.parentDimensions; const { width, height } = this; const outputScale = new OutputScale(); const scaledWidth = Math.ceil(width * parentWidth * outputScale.sx); const scaledHeight = Math.ceil(height * parentHeight * outputScale.sy); const canvas = this.#canvas; if (!canvas || canvas.width === scaledWidth && canvas.height === scaledHeight) { return; } canvas.width = scaledWidth; canvas.height = scaledHeight; const bitmap = this.#isSvg ? this.#bitmap : this.#scaleBitmap(scaledWidth, scaledHeight); const ctx = canvas.getContext("2d"); ctx.filter = this._uiManager.hcmFilter; ctx.drawImage(bitmap, 0, 0, bitmap.width, bitmap.height, 0, 0, scaledWidth, scaledHeight); } #serializeBitmap(toUrl) { if (toUrl) { if (this.#isSvg) { const url = this._uiManager.imageManager.getSvgUrl(this.#bitmapId); if (url) { return url; } } const canvas = document.createElement("canvas"); ({width: canvas.width, height: canvas.height} = this.#bitmap); const ctx = canvas.getContext("2d"); ctx.drawImage(this.#bitmap, 0, 0); return canvas.toDataURL(); } if (this.#isSvg) { const [pageWidth, pageHeight] = this.pageDimensions; const width = Math.round(this.width * pageWidth * PixelsPerInch.PDF_TO_CSS_UNITS); const height = Math.round(this.height * pageHeight * PixelsPerInch.PDF_TO_CSS_UNITS); const offscreen = new OffscreenCanvas(width, height); const ctx = offscreen.getContext("2d"); ctx.drawImage(this.#bitmap, 0, 0, this.#bitmap.width, this.#bitmap.height, 0, 0, width, height); return offscreen.transferToImageBitmap(); } return structuredClone(this.#bitmap); } static async deserialize(data, parent, uiManager) { let initialData = null; let missingCanvas = false; if (data instanceof StampAnnotationElement) { const { data: { rect: rect$1, rotation, id, structParent, popupRef, richText, contentsObj, creationDate, modificationDate }, container, parent: { page: { pageNumber } }, canvas } = data; let bitmapId$1, bitmap$1; if (canvas) { delete data.canvas; ({id: bitmapId$1, bitmap: bitmap$1} = uiManager.imageManager.getFromCanvas(container.id, canvas)); canvas.remove(); } else { missingCanvas = true; data._hasNoCanvas = true; } const altText = (await parent._structTree.getAriaAttributes(`${AnnotationPrefix}${id}`))?.get("aria-label") || ""; initialData = data = { annotationType: AnnotationEditorType.STAMP, bitmapId: bitmapId$1, bitmap: bitmap$1, pageIndex: pageNumber - 1, rect: rect$1.slice(0), rotation, annotationElementId: id, id, deleted: false, accessibilityData: { decorative: false, altText }, isSvg: false, structParent, popupRef, richText, comment: contentsObj?.str || null, creationDate, modificationDate }; } const editor = await super.deserialize(data, parent, uiManager); const { rect, bitmap, bitmapUrl, bitmapId, isSvg, accessibilityData } = data; if (missingCanvas) { uiManager.addMissingCanvas(data.id, editor); editor.#missingCanvas = true; } else if (bitmapId && uiManager.imageManager.isValidId(bitmapId)) { editor.#bitmapId = bitmapId; if (bitmap) { editor.#bitmap = bitmap; } } else { editor.#bitmapUrl = bitmapUrl; } editor.#isSvg = isSvg; const [parentWidth, parentHeight] = editor.pageDimensions; editor.width = (rect[2] - rect[0]) / parentWidth; editor.height = (rect[3] - rect[1]) / parentHeight; if (accessibilityData) { editor.altTextData = accessibilityData; } editor._initialData = initialData; if (data.comment) { editor.setCommentData(data); } editor.#hasBeenAddedInUndoStack = !!initialData; return editor; } serialize(isForCopying = false, context = null) { if (this.isEmpty()) { return null; } if (this.deleted) { return this.serializeDeleted(); } const serialized = Object.assign(super.serialize(isForCopying), { bitmapId: this.#bitmapId, isSvg: this.#isSvg }); this.addComment(serialized); if (isForCopying) { serialized.bitmapUrl = this.#serializeBitmap(true); serialized.accessibilityData = this.serializeAltText(true); serialized.isCopy = true; return serialized; } const { decorative, altText } = this.serializeAltText(false); if (!decorative && altText) { serialized.accessibilityData = { type: "Figure", alt: altText }; } if (this.annotationElementId) { const changes = this.#hasElementChanged(serialized); if (changes.isSame) { return null; } if (changes.isSameAltText) { delete serialized.accessibilityData; } else { serialized.accessibilityData.structParent = this._initialData.structParent ?? -1; } serialized.id = this.annotationElementId; delete serialized.bitmapId; return serialized; } if (context === null) { return serialized; } context.stamps ||= new Map(); const area = this.#isSvg ? (serialized.rect[2] - serialized.rect[0]) * (serialized.rect[3] - serialized.rect[1]) : null; if (!context.stamps.has(this.#bitmapId)) { context.stamps.set(this.#bitmapId, { area, serialized }); serialized.bitmap = this.#serializeBitmap(false); } else if (this.#isSvg) { const prevData = context.stamps.get(this.#bitmapId); if (area > prevData.area) { prevData.area = area; prevData.serialized.bitmap.close(); prevData.serialized.bitmap = this.#serializeBitmap(false); } } return serialized; } #hasElementChanged(serialized) { const { pageIndex, accessibilityData: { altText } } = this._initialData; const isSamePageIndex = serialized.pageIndex === pageIndex; const isSameAltText = (serialized.accessibilityData?.alt || "") === altText; return { isSame: !this.hasEditedComment && !this._hasBeenMoved && !this._hasBeenResized && isSamePageIndex && isSameAltText, isSameAltText }; } renderAnnotationElement(annotation) { if (this.deleted) { annotation.hide(); return null; } annotation.updateEdited({ rect: this.getPDFRect(), popup: this.comment }); return null; } }; ; AnnotationEditorLayer = class AnnotationEditorLayer { #accessibilityManager; #allowClick = false; #annotationLayer = null; #clickAC = null; #editorFocusTimeoutId = null; #editors = new Map(); #hadPointerDown = false; #isDisabling = false; #isEnabling = false; #drawingAC = null; #focusedElement = null; #textLayer = null; #textSelectionAC = null; #textLayerDblClickAC = null; #lastPointerDownTimestamp = -1; #uiManager; static _initialized = false; static #editorTypes = new Map([ FreeTextEditor, InkEditor, StampEditor, HighlightEditor, SignatureEditor ].map((type) => [type._editorType, type])); constructor({ uiManager, pageIndex, div, structTreeLayer, accessibilityManager, annotationLayer, drawLayer, textLayer, viewport, l10n }) { const editorTypes = [...AnnotationEditorLayer.#editorTypes.values()]; if (!AnnotationEditorLayer._initialized) { AnnotationEditorLayer._initialized = true; for (const editorType of editorTypes) { editorType.initialize(l10n, uiManager); } } uiManager.registerEditorTypes(editorTypes); this.#uiManager = uiManager; this.pageIndex = pageIndex; this.div = div; this.#accessibilityManager = accessibilityManager; this.#annotationLayer = annotationLayer; this.viewport = viewport; this.#textLayer = textLayer; this.drawLayer = drawLayer; this._structTree = structTreeLayer; this.#uiManager.addLayer(this); } get isEmpty() { return this.#editors.size === 0; } get isInvisible() { return this.isEmpty && this.#uiManager.getMode() === AnnotationEditorType.NONE; } updateToolbar(options) { this.#uiManager.updateToolbar(options); } updateMode(mode = this.#uiManager.getMode()) { this.#cleanup(); switch (mode) { case AnnotationEditorType.NONE: this.div.classList.toggle("nonEditing", true); this.disableTextSelection(); this.togglePointerEvents(false); this.toggleAnnotationLayerPointerEvents(true); this.disableClick(); return; case AnnotationEditorType.INK: this.disableTextSelection(); this.togglePointerEvents(true); this.enableClick(); break; case AnnotationEditorType.HIGHLIGHT: this.enableTextSelection(); this.togglePointerEvents(false); this.disableClick(); break; default: this.disableTextSelection(); this.togglePointerEvents(true); this.enableClick(); } this.toggleAnnotationLayerPointerEvents(false); const { classList } = this.div; classList.toggle("nonEditing", false); if (mode === AnnotationEditorType.POPUP) { classList.toggle("commentEditing", true); } else { classList.toggle("commentEditing", false); for (const editorType of AnnotationEditorLayer.#editorTypes.values()) { classList.toggle(`${editorType._type}Editing`, mode === editorType._editorType); } } this.div.hidden = false; } hasTextLayer(textLayer) { return textLayer === this.#textLayer?.div; } setEditingState(isEditing) { this.#uiManager.setEditingState(isEditing); } addCommands(params) { this.#uiManager.addCommands(params); } cleanUndoStack(type) { this.#uiManager.cleanUndoStack(type); } toggleDrawing(enabled = false) { this.div.classList.toggle("drawing", !enabled); } togglePointerEvents(enabled = false) { this.div.classList.toggle("disabled", !enabled); } toggleAnnotationLayerPointerEvents(enabled = false) { this.#annotationLayer?.togglePointerEvents(enabled); } get #allEditorsIterator() { return this.#editors.size !== 0 ? this.#editors.values() : this.#uiManager.getEditors(this.pageIndex); } async enable() { this.#isEnabling = true; this.div.tabIndex = 0; this.togglePointerEvents(true); this.div.classList.toggle("nonEditing", false); this.#textLayerDblClickAC?.abort(); this.#textLayerDblClickAC = null; const annotationElementIds = new Set(); for (const editor of this.#allEditorsIterator) { editor.enableEditing(); editor.show(true); if (editor.annotationElementId) { this.#uiManager.removeChangedExistingAnnotation(editor); annotationElementIds.add(editor.annotationElementId); } } const annotationLayer = this.#annotationLayer; if (annotationLayer) { for (const editable of annotationLayer.getEditableAnnotations()) { editable.hide(); if (this.#uiManager.isDeletedAnnotationElement(editable.data.id)) { continue; } if (annotationElementIds.has(editable.data.id)) { continue; } const editor = await this.deserialize(editable); if (!editor) { continue; } this.addOrRebuild(editor); editor.enableEditing(); } } this.#isEnabling = false; this.#uiManager._eventBus.dispatch("editorsrendered", { source: this, pageNumber: this.pageIndex + 1 }); } disable() { this.#isDisabling = true; this.div.tabIndex = -1; this.togglePointerEvents(false); this.div.classList.toggle("nonEditing", true); if (this.#textLayer && !this.#textLayerDblClickAC) { this.#textLayerDblClickAC = new AbortController(); const signal = this.#uiManager.combinedSignal(this.#textLayerDblClickAC); this.#textLayer.div.addEventListener("pointerdown", (e$10) => { const DBL_CLICK_THRESHOLD = 500; const { clientX, clientY, timeStamp } = e$10; const lastPointerDownTimestamp = this.#lastPointerDownTimestamp; if (timeStamp - lastPointerDownTimestamp > DBL_CLICK_THRESHOLD) { this.#lastPointerDownTimestamp = timeStamp; return; } this.#lastPointerDownTimestamp = -1; const { classList: classList$1 } = this.div; classList$1.toggle("getElements", true); const elements = document.elementsFromPoint(clientX, clientY); classList$1.toggle("getElements", false); if (!this.div.contains(elements[0])) { return; } let id; const regex = new RegExp(`^${AnnotationEditorPrefix}[0-9]+$`); for (const element of elements) { if (regex.test(element.id)) { id = element.id; break; } } if (!id) { return; } const editor = this.#editors.get(id); if (editor?.annotationElementId === null) { e$10.stopPropagation(); e$10.preventDefault(); editor.dblclick(e$10); } }, { signal, capture: true }); } const annotationLayer = this.#annotationLayer; const needFakeAnnotation = []; if (annotationLayer) { const changedAnnotations = new Map(); const resetAnnotations = new Map(); for (const editor of this.#allEditorsIterator) { editor.disableEditing(); if (!editor.annotationElementId) { needFakeAnnotation.push(editor); continue; } if (editor.serialize() !== null) { changedAnnotations.set(editor.annotationElementId, editor); continue; } else { resetAnnotations.set(editor.annotationElementId, editor); } this.getEditableAnnotation(editor.annotationElementId)?.show(); editor.remove(); } const editables = annotationLayer.getEditableAnnotations(); for (const editable of editables) { const { id } = editable.data; if (this.#uiManager.isDeletedAnnotationElement(id)) { editable.updateEdited({ deleted: true }); continue; } let editor = resetAnnotations.get(id); if (editor) { editor.resetAnnotationElement(editable); editor.show(false); editable.show(); continue; } editor = changedAnnotations.get(id); if (editor) { this.#uiManager.addChangedExistingAnnotation(editor); if (editor.renderAnnotationElement(editable)) { editor.show(false); } } editable.show(); } } this.#cleanup(); if (this.isEmpty) { this.div.hidden = true; } const { classList } = this.div; for (const editorType of AnnotationEditorLayer.#editorTypes.values()) { classList.remove(`${editorType._type}Editing`); } this.disableTextSelection(); this.toggleAnnotationLayerPointerEvents(true); annotationLayer?.updateFakeAnnotations(needFakeAnnotation); this.#isDisabling = false; } getEditableAnnotation(id) { return this.#annotationLayer?.getEditableAnnotation(id) || null; } setActiveEditor(editor) { const currentActive = this.#uiManager.getActive(); if (currentActive === editor) { return; } this.#uiManager.setActiveEditor(editor); } enableTextSelection() { this.div.tabIndex = -1; if (this.#textLayer?.div && !this.#textSelectionAC) { this.#textSelectionAC = new AbortController(); const signal = this.#uiManager.combinedSignal(this.#textSelectionAC); this.#textLayer.div.addEventListener("pointerdown", this.#textLayerPointerDown.bind(this), { signal }); this.#textLayer.div.classList.add("highlighting"); } } disableTextSelection() { this.div.tabIndex = 0; if (this.#textLayer?.div && this.#textSelectionAC) { this.#textSelectionAC.abort(); this.#textSelectionAC = null; this.#textLayer.div.classList.remove("highlighting"); } } #textLayerPointerDown(event) { this.#uiManager.unselectAll(); const { target } = event; if (target === this.#textLayer.div || (target.getAttribute("role") === "img" || target.classList.contains("endOfContent")) && this.#textLayer.div.contains(target)) { const { isMac } = util_FeatureTest.platform; if (event.button !== 0 || event.ctrlKey && isMac) { return; } this.#uiManager.showAllEditors("highlight", true, true); this.#textLayer.div.classList.add("free"); this.toggleDrawing(); HighlightEditor.startHighlighting(this, this.#uiManager.direction === "ltr", { target: this.#textLayer.div, x: event.x, y: event.y }); this.#textLayer.div.addEventListener("pointerup", () => { this.#textLayer.div.classList.remove("free"); this.toggleDrawing(true); }, { once: true, signal: this.#uiManager._signal }); event.preventDefault(); } } enableClick() { if (this.#clickAC) { return; } this.#clickAC = new AbortController(); const signal = this.#uiManager.combinedSignal(this.#clickAC); this.div.addEventListener("pointerdown", this.pointerdown.bind(this), { signal }); const pointerup = this.pointerup.bind(this); this.div.addEventListener("pointerup", pointerup, { signal }); this.div.addEventListener("pointercancel", pointerup, { signal }); } disableClick() { this.#clickAC?.abort(); this.#clickAC = null; } attach(editor) { this.#editors.set(editor.id, editor); const { annotationElementId } = editor; if (annotationElementId && this.#uiManager.isDeletedAnnotationElement(annotationElementId)) { this.#uiManager.removeDeletedAnnotationElement(editor); } } detach(editor) { this.#editors.delete(editor.id); this.#accessibilityManager?.removePointerInTextLayer(editor.contentDiv); if (!this.#isDisabling && editor.annotationElementId) { this.#uiManager.addDeletedAnnotationElement(editor); } } remove(editor) { this.detach(editor); this.#uiManager.removeEditor(editor); editor.div.remove(); editor.isAttachedToDOM = false; } changeParent(editor) { if (editor.parent === this) { return; } if (editor.parent && editor.annotationElementId) { this.#uiManager.addDeletedAnnotationElement(editor.annotationElementId); AnnotationEditor.deleteAnnotationElement(editor); editor.annotationElementId = null; } this.attach(editor); editor.parent?.detach(editor); editor.setParent(this); if (editor.div && editor.isAttachedToDOM) { editor.div.remove(); this.div.append(editor.div); } } add(editor) { if (editor.parent === this && editor.isAttachedToDOM) { return; } this.changeParent(editor); this.#uiManager.addEditor(editor); this.attach(editor); if (!editor.isAttachedToDOM) { const div = editor.render(); this.div.append(div); editor.isAttachedToDOM = true; } editor.fixAndSetPosition(); editor.onceAdded(!this.#isEnabling); this.#uiManager.addToAnnotationStorage(editor); editor._reportTelemetry(editor.telemetryInitialData); } moveEditorInDOM(editor) { if (!editor.isAttachedToDOM) { return; } const { activeElement } = document; if (editor.div.contains(activeElement) && !this.#editorFocusTimeoutId) { editor._focusEventsAllowed = false; this.#editorFocusTimeoutId = setTimeout(() => { this.#editorFocusTimeoutId = null; if (!editor.div.contains(document.activeElement)) { editor.div.addEventListener("focusin", () => { editor._focusEventsAllowed = true; }, { once: true, signal: this.#uiManager._signal }); activeElement.focus(); } else { editor._focusEventsAllowed = true; } }, 0); } editor._structTreeParentId = this.#accessibilityManager?.moveElementInDOM(this.div, editor.div, editor.contentDiv, true); } addOrRebuild(editor) { if (editor.needsToBeRebuilt()) { editor.parent ||= this; editor.rebuild(); editor.show(); } else { this.add(editor); } } addUndoableEditor(editor) { const cmd = () => editor._uiManager.rebuild(editor); const undo = () => { editor.remove(); }; this.addCommands({ cmd, undo, mustExec: false }); } getEditorByUID(uid) { for (const editor of this.#editors.values()) { if (editor.uid === uid) { return editor; } } return null; } getNextId() { return this.#uiManager.getId(); } get #currentEditorType() { return AnnotationEditorLayer.#editorTypes.get(this.#uiManager.getMode()); } combinedSignal(ac) { return this.#uiManager.combinedSignal(ac); } #createNewEditor(params) { const editorType = this.#currentEditorType; return editorType ? new editorType.prototype.constructor(params) : null; } canCreateNewEmptyEditor() { return this.#currentEditorType?.canCreateNewEmptyEditor(); } async pasteEditor(options, params) { this.updateToolbar(options); await this.#uiManager.updateMode(options.mode); const { offsetX, offsetY } = this.#getCenterPoint(); const id = this.getNextId(); const editor = this.#createNewEditor({ parent: this, id, x: offsetX, y: offsetY, uiManager: this.#uiManager, isCentered: true, ...params }); if (editor) { this.add(editor); } } async deserialize(data) { return await AnnotationEditorLayer.#editorTypes.get(data.annotationType ?? data.annotationEditorType)?.deserialize(data, this, this.#uiManager) || null; } createAndAddNewEditor(event, isCentered, data = {}) { const id = this.getNextId(); const editor = this.#createNewEditor({ parent: this, id, x: event.offsetX, y: event.offsetY, uiManager: this.#uiManager, isCentered, ...data }); if (editor) { this.add(editor); } return editor; } get boundingClientRect() { return this.div.getBoundingClientRect(); } #getCenterPoint() { const { x: x$2, y: y$3, width, height } = this.boundingClientRect; const tlX = Math.max(0, x$2); const tlY = Math.max(0, y$3); const brX = Math.min(window.innerWidth, x$2 + width); const brY = Math.min(window.innerHeight, y$3 + height); const centerX = (tlX + brX) / 2 - x$2; const centerY = (tlY + brY) / 2 - y$3; const [offsetX, offsetY] = this.viewport.rotation % 180 === 0 ? [centerX, centerY] : [centerY, centerX]; return { offsetX, offsetY }; } addNewEditor(data = {}) { this.createAndAddNewEditor(this.#getCenterPoint(), true, data); } setSelected(editor) { this.#uiManager.setSelected(editor); } toggleSelected(editor) { this.#uiManager.toggleSelected(editor); } unselect(editor) { this.#uiManager.unselect(editor); } pointerup(event) { const { isMac } = util_FeatureTest.platform; if (event.button !== 0 || event.ctrlKey && isMac) { return; } if (event.target !== this.div) { return; } if (!this.#hadPointerDown) { return; } this.#hadPointerDown = false; if (this.#currentEditorType?.isDrawer && this.#currentEditorType.supportMultipleDrawings) { return; } if (!this.#allowClick) { this.#allowClick = true; return; } const currentMode = this.#uiManager.getMode(); if (currentMode === AnnotationEditorType.STAMP || currentMode === AnnotationEditorType.SIGNATURE) { this.#uiManager.unselectAll(); return; } this.createAndAddNewEditor(event, false); } pointerdown(event) { if (this.#uiManager.getMode() === AnnotationEditorType.HIGHLIGHT) { this.enableTextSelection(); } if (this.#hadPointerDown) { this.#hadPointerDown = false; return; } const { isMac } = util_FeatureTest.platform; if (event.button !== 0 || event.ctrlKey && isMac) { return; } if (event.target !== this.div) { return; } this.#hadPointerDown = true; if (this.#currentEditorType?.isDrawer) { this.startDrawingSession(event); return; } const editor = this.#uiManager.getActive(); this.#allowClick = !editor || editor.isEmpty(); } startDrawingSession(event) { this.div.focus({ preventScroll: true }); if (this.#drawingAC) { this.#currentEditorType.startDrawing(this, this.#uiManager, false, event); return; } this.#uiManager.setCurrentDrawingSession(this); this.#drawingAC = new AbortController(); const signal = this.#uiManager.combinedSignal(this.#drawingAC); this.div.addEventListener("blur", ({ relatedTarget }) => { if (relatedTarget && !this.div.contains(relatedTarget)) { this.#focusedElement = null; this.commitOrRemove(); } }, { signal }); this.#currentEditorType.startDrawing(this, this.#uiManager, false, event); } pause(on) { if (on) { const { activeElement } = document; if (this.div.contains(activeElement)) { this.#focusedElement = activeElement; } return; } if (this.#focusedElement) { setTimeout(() => { this.#focusedElement?.focus(); this.#focusedElement = null; }, 0); } } endDrawingSession(isAborted = false) { if (!this.#drawingAC) { return null; } this.#uiManager.setCurrentDrawingSession(null); this.#drawingAC.abort(); this.#drawingAC = null; this.#focusedElement = null; return this.#currentEditorType.endDrawing(isAborted); } findNewParent(editor, x$2, y$3) { const layer = this.#uiManager.findParent(x$2, y$3); if (layer === null || layer === this) { return false; } layer.changeParent(editor); return true; } commitOrRemove() { if (this.#drawingAC) { this.endDrawingSession(); return true; } return false; } onScaleChanging() { if (!this.#drawingAC) { return; } this.#currentEditorType.onScaleChangingWhenDrawing(this); } destroy() { this.commitOrRemove(); if (this.#uiManager.getActive()?.parent === this) { this.#uiManager.commitOrRemove(); this.#uiManager.setActiveEditor(null); } if (this.#editorFocusTimeoutId) { clearTimeout(this.#editorFocusTimeoutId); this.#editorFocusTimeoutId = null; } for (const editor of this.#editors.values()) { this.#accessibilityManager?.removePointerInTextLayer(editor.contentDiv); editor.setParent(null); editor.isAttachedToDOM = false; editor.div.remove(); } this.div = null; this.#editors.clear(); this.#uiManager.removeLayer(this); } #cleanup() { for (const editor of this.#editors.values()) { if (editor.isEmpty()) { editor.remove(); } } } render({ viewport }) { this.viewport = viewport; setLayerDimensions(this.div, viewport); for (const editor of this.#uiManager.getEditors(this.pageIndex)) { this.add(editor); editor.rebuild(); } this.updateMode(); } update({ viewport }) { this.#uiManager.commitOrRemove(); this.#cleanup(); const oldRotation = this.viewport.rotation; const rotation = viewport.rotation; this.viewport = viewport; setLayerDimensions(this.div, { rotation }); if (oldRotation !== rotation) { for (const editor of this.#editors.values()) { editor.rotate(rotation); } } } get pageDimensions() { const { pageWidth, pageHeight } = this.viewport.rawDims; return [pageWidth, pageHeight]; } get scale() { return this.#uiManager.viewParameters.realScale; } }; ; DrawLayer = class DrawLayer { #parent = null; #mapping = new Map(); #toUpdate = new Map(); static #id = 0; constructor({ pageIndex }) { this.pageIndex = pageIndex; } setParent(parent) { if (!this.#parent) { this.#parent = parent; return; } if (this.#parent !== parent) { if (this.#mapping.size > 0) { for (const root of this.#mapping.values()) { root.remove(); parent.append(root); } } this.#parent = parent; } } static get _svgFactory() { return shadow(this, "_svgFactory", new DOMSVGFactory()); } static #setBox(element, [x$2, y$3, width, height]) { const { style } = element; style.top = `${100 * y$3}%`; style.left = `${100 * x$2}%`; style.width = `${100 * width}%`; style.height = `${100 * height}%`; } #createSVG() { const svg = DrawLayer._svgFactory.create(1, 1, true); this.#parent.append(svg); svg.setAttribute("aria-hidden", true); return svg; } #createClipPath(defs, pathId) { const clipPath = DrawLayer._svgFactory.createElement("clipPath"); defs.append(clipPath); const clipPathId = `clip_${pathId}`; clipPath.setAttribute("id", clipPathId); clipPath.setAttribute("clipPathUnits", "objectBoundingBox"); const clipPathUse = DrawLayer._svgFactory.createElement("use"); clipPath.append(clipPathUse); clipPathUse.setAttribute("href", `#${pathId}`); clipPathUse.classList.add("clip"); return clipPathId; } #updateProperties(element, properties$1) { for (const [key, value] of Object.entries(properties$1)) { if (value === null) { element.removeAttribute(key); } else { element.setAttribute(key, value); } } } draw(properties$1, isPathUpdatable = false, hasClip = false) { const id = DrawLayer.#id++; const root = this.#createSVG(); const defs = DrawLayer._svgFactory.createElement("defs"); root.append(defs); const path$1 = DrawLayer._svgFactory.createElement("path"); defs.append(path$1); const pathId = `path_p${this.pageIndex}_${id}`; path$1.setAttribute("id", pathId); path$1.setAttribute("vector-effect", "non-scaling-stroke"); if (isPathUpdatable) { this.#toUpdate.set(id, path$1); } const clipPathId = hasClip ? this.#createClipPath(defs, pathId) : null; const use = DrawLayer._svgFactory.createElement("use"); root.append(use); use.setAttribute("href", `#${pathId}`); this.updateProperties(root, properties$1); this.#mapping.set(id, root); return { id, clipPathId: `url(#${clipPathId})` }; } drawOutline(properties$1, mustRemoveSelfIntersections) { const id = DrawLayer.#id++; const root = this.#createSVG(); const defs = DrawLayer._svgFactory.createElement("defs"); root.append(defs); const path$1 = DrawLayer._svgFactory.createElement("path"); defs.append(path$1); const pathId = `path_p${this.pageIndex}_${id}`; path$1.setAttribute("id", pathId); path$1.setAttribute("vector-effect", "non-scaling-stroke"); let maskId; if (mustRemoveSelfIntersections) { const mask = DrawLayer._svgFactory.createElement("mask"); defs.append(mask); maskId = `mask_p${this.pageIndex}_${id}`; mask.setAttribute("id", maskId); mask.setAttribute("maskUnits", "objectBoundingBox"); const rect = DrawLayer._svgFactory.createElement("rect"); mask.append(rect); rect.setAttribute("width", "1"); rect.setAttribute("height", "1"); rect.setAttribute("fill", "white"); const use = DrawLayer._svgFactory.createElement("use"); mask.append(use); use.setAttribute("href", `#${pathId}`); use.setAttribute("stroke", "none"); use.setAttribute("fill", "black"); use.setAttribute("fill-rule", "nonzero"); use.classList.add("mask"); } const use1 = DrawLayer._svgFactory.createElement("use"); root.append(use1); use1.setAttribute("href", `#${pathId}`); if (maskId) { use1.setAttribute("mask", `url(#${maskId})`); } const use2 = use1.cloneNode(); root.append(use2); use1.classList.add("mainOutline"); use2.classList.add("secondaryOutline"); this.updateProperties(root, properties$1); this.#mapping.set(id, root); return id; } finalizeDraw(id, properties$1) { this.#toUpdate.delete(id); this.updateProperties(id, properties$1); } updateProperties(elementOrId, properties$1) { if (!properties$1) { return; } const { root, bbox, rootClass, path: path$1 } = properties$1; const element = typeof elementOrId === "number" ? this.#mapping.get(elementOrId) : elementOrId; if (!element) { return; } if (root) { this.#updateProperties(element, root); } if (bbox) { DrawLayer.#setBox(element, bbox); } if (rootClass) { const { classList } = element; for (const [className, value] of Object.entries(rootClass)) { classList.toggle(className, value); } } if (path$1) { const defs = element.firstChild; const pathElement = defs.firstChild; this.#updateProperties(pathElement, path$1); } } updateParent(id, layer) { if (layer === this) { return; } const root = this.#mapping.get(id); if (!root) { return; } layer.#parent.append(root); this.#mapping.delete(id); layer.#mapping.set(id, root); } remove(id) { this.#toUpdate.delete(id); if (this.#parent === null) { return; } this.#mapping.get(id).remove(); this.#mapping.delete(id); } destroy() { this.#parent = null; for (const root of this.#mapping.values()) { root.remove(); } this.#mapping.clear(); this.#toUpdate.clear(); } }; ; { globalThis._pdfjsTestingUtils = { HighlightOutliner }; } globalThis.pdfjsLib = { AbortException, AnnotationEditorLayer, AnnotationEditorParamsType, AnnotationEditorType, AnnotationEditorUIManager, AnnotationLayer, AnnotationMode, AnnotationType, applyOpacity, build, ColorPicker, createValidAbsoluteUrl, CSSConstants, DOMSVGFactory, DrawLayer, FeatureTest: util_FeatureTest, fetchData, findContrastColor, getDocument, getFilenameFromUrl, getPdfFilenameFromUrl, getRGB, getUuid, getXfaPageViewport, GlobalWorkerOptions, ImageKind: util_ImageKind, InvalidPDFException, isDataScheme, isPdfFile, isValidExplicitDest, MathClamp, noContextMenu, normalizeUnicode, OPS, OutputScale, PasswordResponses, PDFDataRangeTransport, PDFDateString, PDFWorker, PermissionFlag, PixelsPerInch, RenderingCancelledException, renderRichText, ResponseException, setLayerDimensions, shadow, SignatureExtractor, stopEvent, SupportedImageMimeTypes, TextLayer, TouchManager, updateUrlHash, Util, VerbosityLevel, version: version$4, XfaLayer }; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/xlsx/xlsx.mjs function reset_ansi() { set_ansi(1252); } function reset_cp() { set_cp(1200); reset_ansi(); } function char_codes(data) { var o$10 = []; for (var i$7 = 0, len = data.length; i$7 < len; ++i$7) o$10[i$7] = data.charCodeAt(i$7); return o$10; } function utf16leread(data) { var o$10 = []; for (var i$7 = 0; i$7 < data.length >> 1; ++i$7) o$10[i$7] = String.fromCharCode(data.charCodeAt(2 * i$7) + (data.charCodeAt(2 * i$7 + 1) << 8)); return o$10.join(""); } function utf16lereadu(data) { var o$10 = []; for (var i$7 = 0; i$7 < data.length >> 1; ++i$7) o$10[i$7] = String.fromCharCode(data[2 * i$7] + (data[2 * i$7 + 1] << 8)); return o$10.join(""); } function utf16beread(data) { var o$10 = []; for (var i$7 = 0; i$7 < data.length >> 1; ++i$7) o$10[i$7] = String.fromCharCode(data.charCodeAt(2 * i$7 + 1) + (data.charCodeAt(2 * i$7) << 8)); return o$10.join(""); } function set_cptable(cptable) { $cptable = cptable; set_cp = function(cp) { current_codepage = cp; set_ansi(cp); }; debom = function(data) { if (data.charCodeAt(0) === 255 && data.charCodeAt(1) === 254) { return $cptable.utils.decode(1200, char_codes(data.slice(2))); } return data; }; _getchar = function _gc2(x$2) { if (current_codepage === 1200) return String.fromCharCode(x$2); return $cptable.utils.decode(current_codepage, [x$2 & 255, x$2 >> 8])[0]; }; _getansi = function _ga2(x$2) { return $cptable.utils.decode(current_ansi, [x$2])[0]; }; cpdoit(); } function Base64_encode(input) { var o$10 = ""; var c1 = 0, c2 = 0, c3 = 0, e1 = 0, e2 = 0, e3 = 0, e4 = 0; for (var i$7 = 0; i$7 < input.length;) { c1 = input.charCodeAt(i$7++); e1 = c1 >> 2; c2 = input.charCodeAt(i$7++); e2 = (c1 & 3) << 4 | c2 >> 4; c3 = input.charCodeAt(i$7++); e3 = (c2 & 15) << 2 | c3 >> 6; e4 = c3 & 63; if (isNaN(c2)) { e3 = e4 = 64; } else if (isNaN(c3)) { e4 = 64; } o$10 += Base64_map.charAt(e1) + Base64_map.charAt(e2) + Base64_map.charAt(e3) + Base64_map.charAt(e4); } return o$10; } function Base64_encode_pass(input) { var o$10 = ""; var c1 = 0, c2 = 0, c3 = 0, e1 = 0, e2 = 0, e3 = 0, e4 = 0; for (var i$7 = 0; i$7 < input.length;) { c1 = input.charCodeAt(i$7++); if (c1 > 255) c1 = 95; e1 = c1 >> 2; c2 = input.charCodeAt(i$7++); if (c2 > 255) c2 = 95; e2 = (c1 & 3) << 4 | c2 >> 4; c3 = input.charCodeAt(i$7++); if (c3 > 255) c3 = 95; e3 = (c2 & 15) << 2 | c3 >> 6; e4 = c3 & 63; if (isNaN(c2)) { e3 = e4 = 64; } else if (isNaN(c3)) { e4 = 64; } o$10 += Base64_map.charAt(e1) + Base64_map.charAt(e2) + Base64_map.charAt(e3) + Base64_map.charAt(e4); } return o$10; } function Base64_encode_arr(input) { var o$10 = ""; var c1 = 0, c2 = 0, c3 = 0, e1 = 0, e2 = 0, e3 = 0, e4 = 0; for (var i$7 = 0; i$7 < input.length;) { c1 = input[i$7++]; e1 = c1 >> 2; c2 = input[i$7++]; e2 = (c1 & 3) << 4 | c2 >> 4; c3 = input[i$7++]; e3 = (c2 & 15) << 2 | c3 >> 6; e4 = c3 & 63; if (isNaN(c2)) { e3 = e4 = 64; } else if (isNaN(c3)) { e4 = 64; } o$10 += Base64_map.charAt(e1) + Base64_map.charAt(e2) + Base64_map.charAt(e3) + Base64_map.charAt(e4); } return o$10; } function Base64_decode(input) { var o$10 = ""; var c1 = 0, c2 = 0, c3 = 0, e1 = 0, e2 = 0, e3 = 0, e4 = 0; if (input.slice(0, 5) == "data:") { var i$7 = input.slice(0, 1024).indexOf(";base64,"); if (i$7 > -1) input = input.slice(i$7 + 8); } input = input.replace(/[^\w\+\/\=]/g, ""); for (var i$7 = 0; i$7 < input.length;) { e1 = Base64_map.indexOf(input.charAt(i$7++)); e2 = Base64_map.indexOf(input.charAt(i$7++)); c1 = e1 << 2 | e2 >> 4; o$10 += String.fromCharCode(c1); e3 = Base64_map.indexOf(input.charAt(i$7++)); c2 = (e2 & 15) << 4 | e3 >> 2; if (e3 !== 64) { o$10 += String.fromCharCode(c2); } e4 = Base64_map.indexOf(input.charAt(i$7++)); c3 = (e3 & 3) << 6 | e4; if (e4 !== 64) { o$10 += String.fromCharCode(c3); } } return o$10; } function new_raw_buf(len) { if (has_buf) return Buffer.alloc ? Buffer.alloc(len) : new Buffer(len); return typeof Uint8Array != "undefined" ? new Uint8Array(len) : new Array(len); } function new_unsafe_buf(len) { if (has_buf) return Buffer.allocUnsafe ? Buffer.allocUnsafe(len) : new Buffer(len); return typeof Uint8Array != "undefined" ? new Uint8Array(len) : new Array(len); } function s2ab(s$5) { if (typeof ArrayBuffer === "undefined") return s2a(s$5); var buf = new ArrayBuffer(s$5.length), view = new Uint8Array(buf); for (var i$7 = 0; i$7 != s$5.length; ++i$7) view[i$7] = s$5.charCodeAt(i$7) & 255; return buf; } function a2s(data) { if (Array.isArray(data)) return data.map(function(c$7) { return String.fromCharCode(c$7); }).join(""); var o$10 = []; for (var i$7 = 0; i$7 < data.length; ++i$7) o$10[i$7] = String.fromCharCode(data[i$7]); return o$10.join(""); } function a2u(data) { if (typeof Uint8Array === "undefined") throw new Error("Unsupported"); return new Uint8Array(data); } function ab2a(data) { if (typeof ArrayBuffer == "undefined") throw new Error("Unsupported"); if (data instanceof ArrayBuffer) return ab2a(new Uint8Array(data)); var o$10 = new Array(data.length); for (var i$7 = 0; i$7 < data.length; ++i$7) o$10[i$7] = data[i$7]; return o$10; } function utf8decode(content) { var out = [], widx = 0, L$2 = content.length + 250; var o$10 = new_raw_buf(content.length + 255); for (var ridx = 0; ridx < content.length; ++ridx) { var c$7 = content.charCodeAt(ridx); if (c$7 < 128) o$10[widx++] = c$7; else if (c$7 < 2048) { o$10[widx++] = 192 | c$7 >> 6 & 31; o$10[widx++] = 128 | c$7 & 63; } else if (c$7 >= 55296 && c$7 < 57344) { c$7 = (c$7 & 1023) + 64; var d$5 = content.charCodeAt(++ridx) & 1023; o$10[widx++] = 240 | c$7 >> 8 & 7; o$10[widx++] = 128 | c$7 >> 2 & 63; o$10[widx++] = 128 | d$5 >> 6 & 15 | (c$7 & 3) << 4; o$10[widx++] = 128 | d$5 & 63; } else { o$10[widx++] = 224 | c$7 >> 12 & 15; o$10[widx++] = 128 | c$7 >> 6 & 63; o$10[widx++] = 128 | c$7 & 63; } if (widx > L$2) { out.push(o$10.slice(0, widx)); widx = 0; o$10 = new_raw_buf(65535); L$2 = 65530; } } out.push(o$10.slice(0, widx)); return bconcat(out); } function _strrev(x$2) { var o$10 = "", i$7 = x$2.length - 1; while (i$7 >= 0) o$10 += x$2.charAt(i$7--); return o$10; } function pad0(v$3, d$5) { var t$6 = "" + v$3; return t$6.length >= d$5 ? t$6 : fill("0", d$5 - t$6.length) + t$6; } function pad_(v$3, d$5) { var t$6 = "" + v$3; return t$6.length >= d$5 ? t$6 : fill(" ", d$5 - t$6.length) + t$6; } function rpad_(v$3, d$5) { var t$6 = "" + v$3; return t$6.length >= d$5 ? t$6 : t$6 + fill(" ", d$5 - t$6.length); } function pad0r1(v$3, d$5) { var t$6 = "" + Math.round(v$3); return t$6.length >= d$5 ? t$6 : fill("0", d$5 - t$6.length) + t$6; } function pad0r2(v$3, d$5) { var t$6 = "" + v$3; return t$6.length >= d$5 ? t$6 : fill("0", d$5 - t$6.length) + t$6; } function pad0r(v$3, d$5) { if (v$3 > p2_32 || v$3 < -p2_32) return pad0r1(v$3, d$5); var i$7 = Math.round(v$3); return pad0r2(i$7, d$5); } function SSF_isgeneral(s$5, i$7) { i$7 = i$7 || 0; return s$5.length >= 7 + i$7 && (s$5.charCodeAt(i$7) | 32) === 103 && (s$5.charCodeAt(i$7 + 1) | 32) === 101 && (s$5.charCodeAt(i$7 + 2) | 32) === 110 && (s$5.charCodeAt(i$7 + 3) | 32) === 101 && (s$5.charCodeAt(i$7 + 4) | 32) === 114 && (s$5.charCodeAt(i$7 + 5) | 32) === 97 && (s$5.charCodeAt(i$7 + 6) | 32) === 108; } function SSF_init_table(t$6) { if (!t$6) t$6 = {}; t$6[0] = "General"; t$6[1] = "0"; t$6[2] = "0.00"; t$6[3] = "#,##0"; t$6[4] = "#,##0.00"; t$6[9] = "0%"; t$6[10] = "0.00%"; t$6[11] = "0.00E+00"; t$6[12] = "# ?/?"; t$6[13] = "# ??/??"; t$6[14] = "m/d/yy"; t$6[15] = "d-mmm-yy"; t$6[16] = "d-mmm"; t$6[17] = "mmm-yy"; t$6[18] = "h:mm AM/PM"; t$6[19] = "h:mm:ss AM/PM"; t$6[20] = "h:mm"; t$6[21] = "h:mm:ss"; t$6[22] = "m/d/yy h:mm"; t$6[37] = "#,##0 ;(#,##0)"; t$6[38] = "#,##0 ;[Red](#,##0)"; t$6[39] = "#,##0.00;(#,##0.00)"; t$6[40] = "#,##0.00;[Red](#,##0.00)"; t$6[45] = "mm:ss"; t$6[46] = "[h]:mm:ss"; t$6[47] = "mmss.0"; t$6[48] = "##0.0E+0"; t$6[49] = "@"; t$6[56] = "\"上午/下午 \"hh\"時\"mm\"分\"ss\"秒 \""; return t$6; } function SSF_frac(x$2, D$2, mixed) { var sgn = x$2 < 0 ? -1 : 1; var B$2 = x$2 * sgn; var P_2 = 0, P_1 = 1, P$2 = 0; var Q_2 = 1, Q_1 = 0, Q$1 = 0; var A$1 = Math.floor(B$2); while (Q_1 < D$2) { A$1 = Math.floor(B$2); P$2 = A$1 * P_1 + P_2; Q$1 = A$1 * Q_1 + Q_2; if (B$2 - A$1 < 5e-8) break; B$2 = 1 / (B$2 - A$1); P_2 = P_1; P_1 = P$2; Q_2 = Q_1; Q_1 = Q$1; } if (Q$1 > D$2) { if (Q_1 > D$2) { Q$1 = Q_2; P$2 = P_2; } else { Q$1 = Q_1; P$2 = P_1; } } if (!mixed) return [ 0, sgn * P$2, Q$1 ]; var q$2 = Math.floor(sgn * P$2 / Q$1); return [ q$2, sgn * P$2 - q$2 * Q$1, Q$1 ]; } function SSF_normalize_xl_unsafe(v$3) { var s$5 = v$3.toPrecision(16); if (s$5.indexOf("e") > -1) { var m$3 = s$5.slice(0, s$5.indexOf("e")); m$3 = m$3.indexOf(".") > -1 ? m$3.slice(0, m$3.slice(0, 2) == "0." ? 17 : 16) : m$3.slice(0, 15) + fill("0", m$3.length - 15); return m$3 + s$5.slice(s$5.indexOf("e")); } var n$9 = s$5.indexOf(".") > -1 ? s$5.slice(0, s$5.slice(0, 2) == "0." ? 17 : 16) : s$5.slice(0, 15) + fill("0", s$5.length - 15); return Number(n$9); } function SSF_parse_date_code(v$3, opts, b2) { if (v$3 > 2958465 || v$3 < 0) return null; v$3 = SSF_normalize_xl_unsafe(v$3); var date = v$3 | 0, time = Math.floor(86400 * (v$3 - date)), dow = 0; var dout = []; var out = { D: date, T: time, u: 86400 * (v$3 - date) - time, y: 0, m: 0, d: 0, H: 0, M: 0, S: 0, q: 0 }; if (Math.abs(out.u) < 1e-6) out.u = 0; if (opts && opts.date1904) date += 1462; if (out.u > .9999) { out.u = 0; if (++time == 86400) { out.T = time = 0; ++date; ++out.D; } } if (date === 60) { dout = b2 ? [ 1317, 10, 29 ] : [ 1900, 2, 29 ]; dow = 3; } else if (date === 0) { dout = b2 ? [ 1317, 8, 29 ] : [ 1900, 1, 0 ]; dow = 6; } else { if (date > 60) --date; var d$5 = new Date(1900, 0, 1); d$5.setDate(d$5.getDate() + date - 1); dout = [ d$5.getFullYear(), d$5.getMonth() + 1, d$5.getDate() ]; dow = d$5.getDay(); if (date < 60) dow = (dow + 6) % 7; if (b2) dow = SSF_fix_hijri(d$5, dout); } out.y = dout[0]; out.m = dout[1]; out.d = dout[2]; out.S = time % 60; time = Math.floor(time / 60); out.M = time % 60; time = Math.floor(time / 60); out.H = time; out.q = dow; return out; } function SSF_strip_decimal(o$10) { return o$10.indexOf(".") == -1 ? o$10 : o$10.replace(/(?:\.0*|(\.\d*[1-9])0+)$/, "$1"); } function SSF_normalize_exp(o$10) { if (o$10.indexOf("E") == -1) return o$10; return o$10.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/, "$1E").replace(/(E[+-])(\d)$/, "$10$2"); } function SSF_small_exp(v$3) { var w$2 = v$3 < 0 ? 12 : 11; var o$10 = SSF_strip_decimal(v$3.toFixed(12)); if (o$10.length <= w$2) return o$10; o$10 = v$3.toPrecision(10); if (o$10.length <= w$2) return o$10; return v$3.toExponential(5); } function SSF_large_exp(v$3) { var o$10 = SSF_strip_decimal(v$3.toFixed(11)); return o$10.length > (v$3 < 0 ? 12 : 11) || o$10 === "0" || o$10 === "-0" ? v$3.toPrecision(6) : o$10; } function SSF_general_num(v$3) { if (!isFinite(v$3)) return isNaN(v$3) ? "#NUM!" : "#DIV/0!"; var V$2 = Math.floor(Math.log(Math.abs(v$3)) * Math.LOG10E), o$10; if (V$2 >= -4 && V$2 <= -1) o$10 = v$3.toPrecision(10 + V$2); else if (Math.abs(V$2) <= 9) o$10 = SSF_small_exp(v$3); else if (V$2 === 10) o$10 = v$3.toFixed(10).substr(0, 12); else o$10 = SSF_large_exp(v$3); return SSF_strip_decimal(SSF_normalize_exp(o$10.toUpperCase())); } function SSF_general(v$3, opts) { switch (typeof v$3) { case "string": return v$3; case "boolean": return v$3 ? "TRUE" : "FALSE"; case "number": return (v$3 | 0) === v$3 ? v$3.toString(10) : SSF_general_num(v$3); case "undefined": return ""; case "object": if (v$3 == null) return ""; if (v$3 instanceof Date) return SSF_format(14, datenum(v$3, opts && opts.date1904), opts); } throw new Error("unsupported value in General format: " + v$3); } function SSF_fix_hijri(date, o$10) { o$10[0] -= 581; var dow = date.getDay(); if (date < 60) dow = (dow + 6) % 7; return dow; } function SSF_write_date(type, fmt, val$1, ss0) { var o$10 = "", ss = 0, tt = 0, y$3 = val$1.y, out, outl = 0; switch (type) { case 98: y$3 = val$1.y + 543; case 121: switch (fmt.length) { case 1: case 2: out = y$3 % 100; outl = 2; break; default: out = y$3 % 1e4; outl = 4; break; } break; case 109: switch (fmt.length) { case 1: case 2: out = val$1.m; outl = fmt.length; break; case 3: return months[val$1.m - 1][1]; case 5: return months[val$1.m - 1][0]; default: return months[val$1.m - 1][2]; } break; case 100: switch (fmt.length) { case 1: case 2: out = val$1.d; outl = fmt.length; break; case 3: return days[val$1.q][0]; default: return days[val$1.q][1]; } break; case 104: switch (fmt.length) { case 1: case 2: out = 1 + (val$1.H + 11) % 12; outl = fmt.length; break; default: throw "bad hour format: " + fmt; } break; case 72: switch (fmt.length) { case 1: case 2: out = val$1.H; outl = fmt.length; break; default: throw "bad hour format: " + fmt; } break; case 77: switch (fmt.length) { case 1: case 2: out = val$1.M; outl = fmt.length; break; default: throw "bad minute format: " + fmt; } break; case 115: if (fmt != "s" && fmt != "ss" && fmt != ".0" && fmt != ".00" && fmt != ".000") throw "bad second format: " + fmt; if (val$1.u === 0 && (fmt == "s" || fmt == "ss")) return pad0(val$1.S, fmt.length); if (ss0 >= 2) tt = ss0 === 3 ? 1e3 : 100; else tt = ss0 === 1 ? 10 : 1; ss = Math.round(tt * (val$1.S + val$1.u)); if (ss >= 60 * tt) ss = 0; if (fmt === "s") return ss === 0 ? "0" : "" + ss / tt; o$10 = pad0(ss, 2 + ss0); if (fmt === "ss") return o$10.substr(0, 2); return "." + o$10.substr(2, fmt.length - 1); case 90: switch (fmt) { case "[h]": case "[hh]": out = val$1.D * 24 + val$1.H; break; case "[m]": case "[mm]": out = (val$1.D * 24 + val$1.H) * 60 + val$1.M; break; case "[s]": case "[ss]": out = ((val$1.D * 24 + val$1.H) * 60 + val$1.M) * 60 + (ss0 == 0 ? Math.round(val$1.S + val$1.u) : val$1.S); break; default: throw "bad abstime format: " + fmt; } outl = fmt.length === 3 ? 1 : 2; break; case 101: out = y$3; outl = 1; break; } var outstr = outl > 0 ? pad0(out, outl) : ""; return outstr; } function commaify(s$5) { var w$2 = 3; if (s$5.length <= w$2) return s$5; var j$2 = s$5.length % w$2, o$10 = s$5.substr(0, j$2); for (; j$2 != s$5.length; j$2 += w$2) o$10 += (o$10.length > 0 ? "," : "") + s$5.substr(j$2, w$2); return o$10; } function write_num_pct(type, fmt, val$1) { var sfmt = fmt.replace(pct1, ""), mul = fmt.length - sfmt.length; return write_num(type, sfmt, val$1 * Math.pow(10, 2 * mul)) + fill("%", mul); } function write_num_cm(type, fmt, val$1) { var idx = fmt.length - 1; while (fmt.charCodeAt(idx - 1) === 44) --idx; return write_num(type, fmt.substr(0, idx), val$1 / Math.pow(10, 3 * (fmt.length - idx))); } function write_num_exp(fmt, val$1) { var o$10; var idx = fmt.indexOf("E") - fmt.indexOf(".") - 1; if (fmt.match(/^#+0.0E\+0$/)) { if (val$1 == 0) return "0.0E+0"; else if (val$1 < 0) return "-" + write_num_exp(fmt, -val$1); var period = fmt.indexOf("."); if (period === -1) period = fmt.indexOf("E"); var ee = Math.floor(Math.log(val$1) * Math.LOG10E) % period; if (ee < 0) ee += period; o$10 = (val$1 / Math.pow(10, ee)).toPrecision(idx + 1 + (period + ee) % period); if (o$10.indexOf("e") === -1) { var fakee = Math.floor(Math.log(val$1) * Math.LOG10E); if (o$10.indexOf(".") === -1) o$10 = o$10.charAt(0) + "." + o$10.substr(1) + "E+" + (fakee - o$10.length + ee); else o$10 += "E+" + (fakee - ee); while (o$10.substr(0, 2) === "0.") { o$10 = o$10.charAt(0) + o$10.substr(2, period) + "." + o$10.substr(2 + period); o$10 = o$10.replace(/^0+([1-9])/, "$1").replace(/^0+\./, "0."); } o$10 = o$10.replace(/\+-/, "-"); } o$10 = o$10.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/, function($$, $1, $2, $3) { return $1 + $2 + $3.substr(0, (period + ee) % period) + "." + $3.substr(ee) + "E"; }); } else o$10 = val$1.toExponential(idx); if (fmt.match(/E\+00$/) && o$10.match(/e[+-]\d$/)) o$10 = o$10.substr(0, o$10.length - 1) + "0" + o$10.charAt(o$10.length - 1); if (fmt.match(/E\-/) && o$10.match(/e\+/)) o$10 = o$10.replace(/e\+/, "e"); return o$10.replace("e", "E"); } function write_num_f1(r$10, aval, sign) { var den = parseInt(r$10[4], 10), rr = Math.round(aval * den), base = Math.floor(rr / den); var myn = rr - base * den, myd = den; return sign + (base === 0 ? "" : "" + base) + " " + (myn === 0 ? fill(" ", r$10[1].length + 1 + r$10[4].length) : pad_(myn, r$10[1].length) + r$10[2] + "/" + r$10[3] + pad0(myd, r$10[4].length)); } function write_num_f2(r$10, aval, sign) { return sign + (aval === 0 ? "" : "" + aval) + fill(" ", r$10[1].length + 2 + r$10[4].length); } function hashq(str) { var o$10 = "", cc; for (var i$7 = 0; i$7 != str.length; ++i$7) switch (cc = str.charCodeAt(i$7)) { case 35: break; case 63: o$10 += " "; break; case 48: o$10 += "0"; break; default: o$10 += String.fromCharCode(cc); } return o$10; } function rnd(val$1, d$5) { var dd = Math.pow(10, d$5); return "" + Math.round(val$1 * dd) / dd; } function dec(val$1, d$5) { var _frac = val$1 - Math.floor(val$1), dd = Math.pow(10, d$5); if (d$5 < ("" + Math.round(_frac * dd)).length) return 0; return Math.round(_frac * dd); } function carry(val$1, d$5) { if (d$5 < ("" + Math.round((val$1 - Math.floor(val$1)) * Math.pow(10, d$5))).length) { return 1; } return 0; } function flr(val$1) { if (val$1 < 2147483647 && val$1 > -2147483648) return "" + (val$1 >= 0 ? val$1 | 0 : val$1 - 1 | 0); return "" + Math.floor(val$1); } function write_num_flt(type, fmt, val$1) { if (type.charCodeAt(0) === 40 && !fmt.match(closeparen)) { var ffmt = fmt.replace(/\( */, "").replace(/ \)/, "").replace(/\)/, ""); if (val$1 >= 0) return write_num_flt("n", ffmt, val$1); return "(" + write_num_flt("n", ffmt, -val$1) + ")"; } if (fmt.charCodeAt(fmt.length - 1) === 44) return write_num_cm(type, fmt, val$1); if (fmt.indexOf("%") !== -1) return write_num_pct(type, fmt, val$1); if (fmt.indexOf("E") !== -1) return write_num_exp(fmt, val$1); if (fmt.charCodeAt(0) === 36) return "$" + write_num_flt(type, fmt.substr(fmt.charAt(1) == " " ? 2 : 1), val$1); var o$10; var r$10, ri, ff, aval = Math.abs(val$1), sign = val$1 < 0 ? "-" : ""; if (fmt.match(/^00+$/)) return sign + pad0r(aval, fmt.length); if (fmt.match(/^[#?]+$/)) { o$10 = pad0r(val$1, 0); if (o$10 === "0") o$10 = ""; return o$10.length > fmt.length ? o$10 : hashq(fmt.substr(0, fmt.length - o$10.length)) + o$10; } if (r$10 = fmt.match(frac1)) return write_num_f1(r$10, aval, sign); if (fmt.match(/^#+0+$/)) return sign + pad0r(aval, fmt.length - fmt.indexOf("0")); if (r$10 = fmt.match(dec1)) { o$10 = rnd(val$1, r$10[1].length).replace(/^([^\.]+)$/, "$1." + hashq(r$10[1])).replace(/\.$/, "." + hashq(r$10[1])).replace(/\.(\d*)$/, function($$, $1) { return "." + $1 + fill("0", hashq(r$10[1]).length - $1.length); }); return fmt.indexOf("0.") !== -1 ? o$10 : o$10.replace(/^0\./, "."); } fmt = fmt.replace(/^#+([0.])/, "$1"); if (r$10 = fmt.match(/^(0*)\.(#*)$/)) { return sign + rnd(aval, r$10[2].length).replace(/\.(\d*[1-9])0*$/, ".$1").replace(/^(-?\d*)$/, "$1.").replace(/^0\./, r$10[1].length ? "0." : "."); } if (r$10 = fmt.match(/^#{1,3},##0(\.?)$/)) return sign + commaify(pad0r(aval, 0)); if (r$10 = fmt.match(/^#,##0\.([#0]*0)$/)) { return val$1 < 0 ? "-" + write_num_flt(type, fmt, -val$1) : commaify("" + (Math.floor(val$1) + carry(val$1, r$10[1].length))) + "." + pad0(dec(val$1, r$10[1].length), r$10[1].length); } if (r$10 = fmt.match(/^#,#*,#0/)) return write_num_flt(type, fmt.replace(/^#,#*,/, ""), val$1); if (r$10 = fmt.match(/^([0#]+)(\\?-([0#]+))+$/)) { o$10 = _strrev(write_num_flt(type, fmt.replace(/[\\-]/g, ""), val$1)); ri = 0; return _strrev(_strrev(fmt.replace(/\\/g, "")).replace(/[0#]/g, function(x$3) { return ri < o$10.length ? o$10.charAt(ri++) : x$3 === "0" ? "0" : ""; })); } if (fmt.match(phone)) { o$10 = write_num_flt(type, "##########", val$1); return "(" + o$10.substr(0, 3) + ") " + o$10.substr(3, 3) + "-" + o$10.substr(6); } var oa = ""; if (r$10 = fmt.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/)) { ri = Math.min(r$10[4].length, 7); ff = SSF_frac(aval, Math.pow(10, ri) - 1, false); o$10 = "" + sign; oa = write_num("n", r$10[1], ff[1]); if (oa.charAt(oa.length - 1) == " ") oa = oa.substr(0, oa.length - 1) + "0"; o$10 += oa + r$10[2] + "/" + r$10[3]; oa = rpad_(ff[2], ri); if (oa.length < r$10[4].length) oa = hashq(r$10[4].substr(r$10[4].length - oa.length)) + oa; o$10 += oa; return o$10; } if (r$10 = fmt.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/)) { ri = Math.min(Math.max(r$10[1].length, r$10[4].length), 7); ff = SSF_frac(aval, Math.pow(10, ri) - 1, true); return sign + (ff[0] || (ff[1] ? "" : "0")) + " " + (ff[1] ? pad_(ff[1], ri) + r$10[2] + "/" + r$10[3] + rpad_(ff[2], ri) : fill(" ", 2 * ri + 1 + r$10[2].length + r$10[3].length)); } if (r$10 = fmt.match(/^[#0?]+$/)) { o$10 = pad0r(val$1, 0); if (fmt.length <= o$10.length) return o$10; return hashq(fmt.substr(0, fmt.length - o$10.length)) + o$10; } if (r$10 = fmt.match(/^([#0?]+)\.([#0]+)$/)) { o$10 = "" + val$1.toFixed(Math.min(r$10[2].length, 10)).replace(/([^0])0+$/, "$1"); ri = o$10.indexOf("."); var lres = fmt.indexOf(".") - ri, rres = fmt.length - o$10.length - lres; return hashq(fmt.substr(0, lres) + o$10 + fmt.substr(fmt.length - rres)); } if (r$10 = fmt.match(/^00,000\.([#0]*0)$/)) { ri = dec(val$1, r$10[1].length); return val$1 < 0 ? "-" + write_num_flt(type, fmt, -val$1) : commaify(flr(val$1)).replace(/^\d,\d{3}$/, "0$&").replace(/^\d*$/, function($$) { return "00," + ($$.length < 3 ? pad0(0, 3 - $$.length) : "") + $$; }) + "." + pad0(ri, r$10[1].length); } switch (fmt) { case "###,##0.00": return write_num_flt(type, "#,##0.00", val$1); case "###,###": case "##,###": case "#,###": var x$2 = commaify(pad0r(aval, 0)); return x$2 !== "0" ? sign + x$2 : ""; case "###,###.00": return write_num_flt(type, "###,##0.00", val$1).replace(/^0\./, "."); case "#,###.00": return write_num_flt(type, "#,##0.00", val$1).replace(/^0\./, "."); default: } throw new Error("unsupported format |" + fmt + "|"); } function write_num_cm2(type, fmt, val$1) { var idx = fmt.length - 1; while (fmt.charCodeAt(idx - 1) === 44) --idx; return write_num(type, fmt.substr(0, idx), val$1 / Math.pow(10, 3 * (fmt.length - idx))); } function write_num_pct2(type, fmt, val$1) { var sfmt = fmt.replace(pct1, ""), mul = fmt.length - sfmt.length; return write_num(type, sfmt, val$1 * Math.pow(10, 2 * mul)) + fill("%", mul); } function write_num_exp2(fmt, val$1) { var o$10; var idx = fmt.indexOf("E") - fmt.indexOf(".") - 1; if (fmt.match(/^#+0.0E\+0$/)) { if (val$1 == 0) return "0.0E+0"; else if (val$1 < 0) return "-" + write_num_exp2(fmt, -val$1); var period = fmt.indexOf("."); if (period === -1) period = fmt.indexOf("E"); var ee = Math.floor(Math.log(val$1) * Math.LOG10E) % period; if (ee < 0) ee += period; o$10 = (val$1 / Math.pow(10, ee)).toPrecision(idx + 1 + (period + ee) % period); if (!o$10.match(/[Ee]/)) { var fakee = Math.floor(Math.log(val$1) * Math.LOG10E); if (o$10.indexOf(".") === -1) o$10 = o$10.charAt(0) + "." + o$10.substr(1) + "E+" + (fakee - o$10.length + ee); else o$10 += "E+" + (fakee - ee); o$10 = o$10.replace(/\+-/, "-"); } o$10 = o$10.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/, function($$, $1, $2, $3) { return $1 + $2 + $3.substr(0, (period + ee) % period) + "." + $3.substr(ee) + "E"; }); } else o$10 = val$1.toExponential(idx); if (fmt.match(/E\+00$/) && o$10.match(/e[+-]\d$/)) o$10 = o$10.substr(0, o$10.length - 1) + "0" + o$10.charAt(o$10.length - 1); if (fmt.match(/E\-/) && o$10.match(/e\+/)) o$10 = o$10.replace(/e\+/, "e"); return o$10.replace("e", "E"); } function write_num_int(type, fmt, val$1) { if (type.charCodeAt(0) === 40 && !fmt.match(closeparen)) { var ffmt = fmt.replace(/\( */, "").replace(/ \)/, "").replace(/\)/, ""); if (val$1 >= 0) return write_num_int("n", ffmt, val$1); return "(" + write_num_int("n", ffmt, -val$1) + ")"; } if (fmt.charCodeAt(fmt.length - 1) === 44) return write_num_cm2(type, fmt, val$1); if (fmt.indexOf("%") !== -1) return write_num_pct2(type, fmt, val$1); if (fmt.indexOf("E") !== -1) return write_num_exp2(fmt, val$1); if (fmt.charCodeAt(0) === 36) return "$" + write_num_int(type, fmt.substr(fmt.charAt(1) == " " ? 2 : 1), val$1); var o$10; var r$10, ri, ff, aval = Math.abs(val$1), sign = val$1 < 0 ? "-" : ""; if (fmt.match(/^00+$/)) return sign + pad0(aval, fmt.length); if (fmt.match(/^[#?]+$/)) { o$10 = "" + val$1; if (val$1 === 0) o$10 = ""; return o$10.length > fmt.length ? o$10 : hashq(fmt.substr(0, fmt.length - o$10.length)) + o$10; } if (r$10 = fmt.match(frac1)) return write_num_f2(r$10, aval, sign); if (fmt.match(/^#+0+$/)) return sign + pad0(aval, fmt.length - fmt.indexOf("0")); if (r$10 = fmt.match(dec1)) { o$10 = ("" + val$1).replace(/^([^\.]+)$/, "$1." + hashq(r$10[1])).replace(/\.$/, "." + hashq(r$10[1])); o$10 = o$10.replace(/\.(\d*)$/, function($$, $1) { return "." + $1 + fill("0", hashq(r$10[1]).length - $1.length); }); return fmt.indexOf("0.") !== -1 ? o$10 : o$10.replace(/^0\./, "."); } fmt = fmt.replace(/^#+([0.])/, "$1"); if (r$10 = fmt.match(/^(0*)\.(#*)$/)) { return sign + ("" + aval).replace(/\.(\d*[1-9])0*$/, ".$1").replace(/^(-?\d*)$/, "$1.").replace(/^0\./, r$10[1].length ? "0." : "."); } if (r$10 = fmt.match(/^#{1,3},##0(\.?)$/)) return sign + commaify("" + aval); if (r$10 = fmt.match(/^#,##0\.([#0]*0)$/)) { return val$1 < 0 ? "-" + write_num_int(type, fmt, -val$1) : commaify("" + val$1) + "." + fill("0", r$10[1].length); } if (r$10 = fmt.match(/^#,#*,#0/)) return write_num_int(type, fmt.replace(/^#,#*,/, ""), val$1); if (r$10 = fmt.match(/^([0#]+)(\\?-([0#]+))+$/)) { o$10 = _strrev(write_num_int(type, fmt.replace(/[\\-]/g, ""), val$1)); ri = 0; return _strrev(_strrev(fmt.replace(/\\/g, "")).replace(/[0#]/g, function(x$3) { return ri < o$10.length ? o$10.charAt(ri++) : x$3 === "0" ? "0" : ""; })); } if (fmt.match(phone)) { o$10 = write_num_int(type, "##########", val$1); return "(" + o$10.substr(0, 3) + ") " + o$10.substr(3, 3) + "-" + o$10.substr(6); } var oa = ""; if (r$10 = fmt.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/)) { ri = Math.min(r$10[4].length, 7); ff = SSF_frac(aval, Math.pow(10, ri) - 1, false); o$10 = "" + sign; oa = write_num("n", r$10[1], ff[1]); if (oa.charAt(oa.length - 1) == " ") oa = oa.substr(0, oa.length - 1) + "0"; o$10 += oa + r$10[2] + "/" + r$10[3]; oa = rpad_(ff[2], ri); if (oa.length < r$10[4].length) oa = hashq(r$10[4].substr(r$10[4].length - oa.length)) + oa; o$10 += oa; return o$10; } if (r$10 = fmt.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/)) { ri = Math.min(Math.max(r$10[1].length, r$10[4].length), 7); ff = SSF_frac(aval, Math.pow(10, ri) - 1, true); return sign + (ff[0] || (ff[1] ? "" : "0")) + " " + (ff[1] ? pad_(ff[1], ri) + r$10[2] + "/" + r$10[3] + rpad_(ff[2], ri) : fill(" ", 2 * ri + 1 + r$10[2].length + r$10[3].length)); } if (r$10 = fmt.match(/^[#0?]+$/)) { o$10 = "" + val$1; if (fmt.length <= o$10.length) return o$10; return hashq(fmt.substr(0, fmt.length - o$10.length)) + o$10; } if (r$10 = fmt.match(/^([#0]+)\.([#0]+)$/)) { o$10 = "" + val$1.toFixed(Math.min(r$10[2].length, 10)).replace(/([^0])0+$/, "$1"); ri = o$10.indexOf("."); var lres = fmt.indexOf(".") - ri, rres = fmt.length - o$10.length - lres; return hashq(fmt.substr(0, lres) + o$10 + fmt.substr(fmt.length - rres)); } if (r$10 = fmt.match(/^00,000\.([#0]*0)$/)) { return val$1 < 0 ? "-" + write_num_int(type, fmt, -val$1) : commaify("" + val$1).replace(/^\d,\d{3}$/, "0$&").replace(/^\d*$/, function($$) { return "00," + ($$.length < 3 ? pad0(0, 3 - $$.length) : "") + $$; }) + "." + pad0(0, r$10[1].length); } switch (fmt) { case "###,###": case "##,###": case "#,###": var x$2 = commaify("" + aval); return x$2 !== "0" ? sign + x$2 : ""; default: if (fmt.match(/\.[0#?]*$/)) return write_num_int(type, fmt.slice(0, fmt.lastIndexOf(".")), val$1) + hashq(fmt.slice(fmt.lastIndexOf("."))); } throw new Error("unsupported format |" + fmt + "|"); } function write_num(type, fmt, val$1) { return (val$1 | 0) === val$1 ? write_num_int(type, fmt, val$1) : write_num_flt(type, fmt, val$1); } function SSF_split_fmt(fmt) { var out = []; var in_str = false; for (var i$7 = 0, j$2 = 0; i$7 < fmt.length; ++i$7) switch (fmt.charCodeAt(i$7)) { case 34: in_str = !in_str; break; case 95: case 42: case 92: ++i$7; break; case 59: out[out.length] = fmt.substr(j$2, i$7 - j$2); j$2 = i$7 + 1; } out[out.length] = fmt.substr(j$2); if (in_str === true) throw new Error("Format |" + fmt + "| unterminated string "); return out; } function fmt_is_date(fmt) { var i$7 = 0, c$7 = "", o$10 = ""; while (i$7 < fmt.length) { switch (c$7 = fmt.charAt(i$7)) { case "G": if (SSF_isgeneral(fmt, i$7)) i$7 += 6; i$7++; break; case "\"": for (; fmt.charCodeAt(++i$7) !== 34 && i$7 < fmt.length;) {} ++i$7; break; case "\\": i$7 += 2; break; case "_": i$7 += 2; break; case "@": ++i$7; break; case "B": case "b": if (fmt.charAt(i$7 + 1) === "1" || fmt.charAt(i$7 + 1) === "2") return true; case "M": case "D": case "Y": case "H": case "S": case "E": case "m": case "d": case "y": case "h": case "s": case "e": case "g": return true; case "A": case "a": case "上": if (fmt.substr(i$7, 3).toUpperCase() === "A/P") return true; if (fmt.substr(i$7, 5).toUpperCase() === "AM/PM") return true; if (fmt.substr(i$7, 5).toUpperCase() === "上午/下午") return true; ++i$7; break; case "[": o$10 = c$7; while (fmt.charAt(i$7++) !== "]" && i$7 < fmt.length) o$10 += fmt.charAt(i$7); if (o$10.match(SSF_abstime)) return true; break; case ".": case "0": case "#": while (i$7 < fmt.length && ("0#?.,E+-%".indexOf(c$7 = fmt.charAt(++i$7)) > -1 || c$7 == "\\" && fmt.charAt(i$7 + 1) == "-" && "0#".indexOf(fmt.charAt(i$7 + 2)) > -1)) {} break; case "?": while (fmt.charAt(++i$7) === c$7) {} break; case "*": ++i$7; if (fmt.charAt(i$7) == " " || fmt.charAt(i$7) == "*") ++i$7; break; case "(": case ")": ++i$7; break; case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": while (i$7 < fmt.length && "0123456789".indexOf(fmt.charAt(++i$7)) > -1) {} break; case " ": ++i$7; break; default: ++i$7; break; } } return false; } function eval_fmt(fmt, v$3, opts, flen) { var out = [], o$10 = "", i$7 = 0, c$7 = "", lst = "t", dt, j$2, cc; var hr = "H"; while (i$7 < fmt.length) { switch (c$7 = fmt.charAt(i$7)) { case "G": if (!SSF_isgeneral(fmt, i$7)) throw new Error("unrecognized character " + c$7 + " in " + fmt); out[out.length] = { t: "G", v: "General" }; i$7 += 7; break; case "\"": for (o$10 = ""; (cc = fmt.charCodeAt(++i$7)) !== 34 && i$7 < fmt.length;) o$10 += String.fromCharCode(cc); out[out.length] = { t: "t", v: o$10 }; ++i$7; break; case "\\": var w$2 = fmt.charAt(++i$7), t$6 = w$2 === "(" || w$2 === ")" ? w$2 : "t"; out[out.length] = { t: t$6, v: w$2 }; ++i$7; break; case "_": out[out.length] = { t: "t", v: " " }; i$7 += 2; break; case "@": out[out.length] = { t: "T", v: v$3 }; ++i$7; break; case "B": case "b": if (fmt.charAt(i$7 + 1) === "1" || fmt.charAt(i$7 + 1) === "2") { if (dt == null) { dt = SSF_parse_date_code(v$3, opts, fmt.charAt(i$7 + 1) === "2"); if (dt == null) return ""; } out[out.length] = { t: "X", v: fmt.substr(i$7, 2) }; lst = c$7; i$7 += 2; break; } case "M": case "D": case "Y": case "H": case "S": case "E": c$7 = c$7.toLowerCase(); case "m": case "d": case "y": case "h": case "s": case "e": case "g": if (v$3 < 0) return ""; if (dt == null) { dt = SSF_parse_date_code(v$3, opts); if (dt == null) return ""; } o$10 = c$7; while (++i$7 < fmt.length && fmt.charAt(i$7).toLowerCase() === c$7) o$10 += c$7; if (c$7 === "m" && lst.toLowerCase() === "h") c$7 = "M"; if (c$7 === "h") c$7 = hr; out[out.length] = { t: c$7, v: o$10 }; lst = c$7; break; case "A": case "a": case "上": var q$2 = { t: c$7, v: c$7 }; if (dt == null) dt = SSF_parse_date_code(v$3, opts); if (fmt.substr(i$7, 3).toUpperCase() === "A/P") { if (dt != null) q$2.v = dt.H >= 12 ? fmt.charAt(i$7 + 2) : c$7; q$2.t = "T"; hr = "h"; i$7 += 3; } else if (fmt.substr(i$7, 5).toUpperCase() === "AM/PM") { if (dt != null) q$2.v = dt.H >= 12 ? "PM" : "AM"; q$2.t = "T"; i$7 += 5; hr = "h"; } else if (fmt.substr(i$7, 5).toUpperCase() === "上午/下午") { if (dt != null) q$2.v = dt.H >= 12 ? "下午" : "上午"; q$2.t = "T"; i$7 += 5; hr = "h"; } else { q$2.t = "t"; ++i$7; } if (dt == null && q$2.t === "T") return ""; out[out.length] = q$2; lst = c$7; break; case "[": o$10 = c$7; while (fmt.charAt(i$7++) !== "]" && i$7 < fmt.length) o$10 += fmt.charAt(i$7); if (o$10.slice(-1) !== "]") throw "unterminated \"[\" block: |" + o$10 + "|"; if (o$10.match(SSF_abstime)) { if (dt == null) { dt = SSF_parse_date_code(v$3, opts); if (dt == null) return ""; } out[out.length] = { t: "Z", v: o$10.toLowerCase() }; lst = o$10.charAt(1); } else if (o$10.indexOf("$") > -1) { o$10 = (o$10.match(/\$([^-\[\]]*)/) || [])[1] || "$"; if (!fmt_is_date(fmt)) out[out.length] = { t: "t", v: o$10 }; } break; case ".": if (dt != null) { o$10 = c$7; while (++i$7 < fmt.length && (c$7 = fmt.charAt(i$7)) === "0") o$10 += c$7; out[out.length] = { t: "s", v: o$10 }; break; } case "0": case "#": o$10 = c$7; while (++i$7 < fmt.length && "0#?.,E+-%".indexOf(c$7 = fmt.charAt(i$7)) > -1) o$10 += c$7; out[out.length] = { t: "n", v: o$10 }; break; case "?": o$10 = c$7; while (fmt.charAt(++i$7) === c$7) o$10 += c$7; out[out.length] = { t: c$7, v: o$10 }; lst = c$7; break; case "*": ++i$7; if (fmt.charAt(i$7) == " " || fmt.charAt(i$7) == "*") ++i$7; break; case "(": case ")": out[out.length] = { t: flen === 1 ? "t" : c$7, v: c$7 }; ++i$7; break; case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": o$10 = c$7; while (i$7 < fmt.length && "0123456789".indexOf(fmt.charAt(++i$7)) > -1) o$10 += fmt.charAt(i$7); out[out.length] = { t: "D", v: o$10 }; break; case " ": out[out.length] = { t: c$7, v: c$7 }; ++i$7; break; case "$": out[out.length] = { t: "t", v: "$" }; ++i$7; break; default: if (",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(c$7) === -1) throw new Error("unrecognized character " + c$7 + " in " + fmt); out[out.length] = { t: "t", v: c$7 }; ++i$7; break; } } var bt = 0, ss0 = 0, ssm; for (i$7 = out.length - 1, lst = "t"; i$7 >= 0; --i$7) { switch (out[i$7].t) { case "h": case "H": out[i$7].t = hr; lst = "h"; if (bt < 1) bt = 1; break; case "s": if (ssm = out[i$7].v.match(/\.0+$/)) { ss0 = Math.max(ss0, ssm[0].length - 1); bt = 4; } if (bt < 3) bt = 3; case "d": case "y": case "e": lst = out[i$7].t; break; case "M": lst = out[i$7].t; if (bt < 2) bt = 2; break; case "m": if (lst === "s") { out[i$7].t = "M"; if (bt < 2) bt = 2; } break; case "X": break; case "Z": if (bt < 1 && out[i$7].v.match(/[Hh]/)) bt = 1; if (bt < 2 && out[i$7].v.match(/[Mm]/)) bt = 2; if (bt < 3 && out[i$7].v.match(/[Ss]/)) bt = 3; } } var _dt; switch (bt) { case 0: break; case 1: case 2: case 3: if (dt.u >= .5) { dt.u = 0; ++dt.S; } if (dt.S >= 60) { dt.S = 0; ++dt.M; } if (dt.M >= 60) { dt.M = 0; ++dt.H; } if (dt.H >= 24) { dt.H = 0; ++dt.D; _dt = SSF_parse_date_code(dt.D); _dt.u = dt.u; _dt.S = dt.S; _dt.M = dt.M; _dt.H = dt.H; dt = _dt; } break; case 4: switch (ss0) { case 1: dt.u = Math.round(dt.u * 10) / 10; break; case 2: dt.u = Math.round(dt.u * 100) / 100; break; case 3: dt.u = Math.round(dt.u * 1e3) / 1e3; break; } if (dt.u >= 1) { dt.u = 0; ++dt.S; } if (dt.S >= 60) { dt.S = 0; ++dt.M; } if (dt.M >= 60) { dt.M = 0; ++dt.H; } if (dt.H >= 24) { dt.H = 0; ++dt.D; _dt = SSF_parse_date_code(dt.D); _dt.u = dt.u; _dt.S = dt.S; _dt.M = dt.M; _dt.H = dt.H; dt = _dt; } break; } var nstr = "", jj; for (i$7 = 0; i$7 < out.length; ++i$7) { switch (out[i$7].t) { case "t": case "T": case " ": case "D": break; case "X": out[i$7].v = ""; out[i$7].t = ";"; break; case "d": case "m": case "y": case "h": case "H": case "M": case "s": case "e": case "b": case "Z": out[i$7].v = SSF_write_date(out[i$7].t.charCodeAt(0), out[i$7].v, dt, ss0); out[i$7].t = "t"; break; case "n": case "?": jj = i$7 + 1; while (out[jj] != null && ((c$7 = out[jj].t) === "?" || c$7 === "D" || (c$7 === " " || c$7 === "t") && out[jj + 1] != null && (out[jj + 1].t === "?" || out[jj + 1].t === "t" && out[jj + 1].v === "/") || out[i$7].t === "(" && (c$7 === " " || c$7 === "n" || c$7 === ")") || c$7 === "t" && (out[jj].v === "/" || out[jj].v === " " && out[jj + 1] != null && out[jj + 1].t == "?"))) { out[i$7].v += out[jj].v; out[jj] = { v: "", t: ";" }; ++jj; } nstr += out[i$7].v; i$7 = jj - 1; break; case "G": out[i$7].t = "t"; out[i$7].v = SSF_general(v$3, opts); break; } } var vv = "", myv, ostr; if (nstr.length > 0) { if (nstr.charCodeAt(0) == 40) { myv = v$3 < 0 && nstr.charCodeAt(0) === 45 ? -v$3 : v$3; ostr = write_num("n", nstr, myv); } else { myv = v$3 < 0 && flen > 1 ? -v$3 : v$3; ostr = write_num("n", nstr, myv); if (myv < 0 && out[0] && out[0].t == "t") { ostr = ostr.substr(1); out[0].v = "-" + out[0].v; } } jj = ostr.length - 1; var decpt = out.length; for (i$7 = 0; i$7 < out.length; ++i$7) if (out[i$7] != null && out[i$7].t != "t" && out[i$7].v.indexOf(".") > -1) { decpt = i$7; break; } var lasti = out.length; if (decpt === out.length && ostr.indexOf("E") === -1) { for (i$7 = out.length - 1; i$7 >= 0; --i$7) { if (out[i$7] == null || "n?".indexOf(out[i$7].t) === -1) continue; if (jj >= out[i$7].v.length - 1) { jj -= out[i$7].v.length; out[i$7].v = ostr.substr(jj + 1, out[i$7].v.length); } else if (jj < 0) out[i$7].v = ""; else { out[i$7].v = ostr.substr(0, jj + 1); jj = -1; } out[i$7].t = "t"; lasti = i$7; } if (jj >= 0 && lasti < out.length) out[lasti].v = ostr.substr(0, jj + 1) + out[lasti].v; } else if (decpt !== out.length && ostr.indexOf("E") === -1) { jj = ostr.indexOf(".") - 1; for (i$7 = decpt; i$7 >= 0; --i$7) { if (out[i$7] == null || "n?".indexOf(out[i$7].t) === -1) continue; j$2 = out[i$7].v.indexOf(".") > -1 && i$7 === decpt ? out[i$7].v.indexOf(".") - 1 : out[i$7].v.length - 1; vv = out[i$7].v.substr(j$2 + 1); for (; j$2 >= 0; --j$2) { if (jj >= 0 && (out[i$7].v.charAt(j$2) === "0" || out[i$7].v.charAt(j$2) === "#")) vv = ostr.charAt(jj--) + vv; } out[i$7].v = vv; out[i$7].t = "t"; lasti = i$7; } if (jj >= 0 && lasti < out.length) out[lasti].v = ostr.substr(0, jj + 1) + out[lasti].v; jj = ostr.indexOf(".") + 1; for (i$7 = decpt; i$7 < out.length; ++i$7) { if (out[i$7] == null || "n?(".indexOf(out[i$7].t) === -1 && i$7 !== decpt) continue; j$2 = out[i$7].v.indexOf(".") > -1 && i$7 === decpt ? out[i$7].v.indexOf(".") + 1 : 0; vv = out[i$7].v.substr(0, j$2); for (; j$2 < out[i$7].v.length; ++j$2) { if (jj < ostr.length) vv += ostr.charAt(jj++); } out[i$7].v = vv; out[i$7].t = "t"; lasti = i$7; } } } for (i$7 = 0; i$7 < out.length; ++i$7) if (out[i$7] != null && "n?".indexOf(out[i$7].t) > -1) { myv = flen > 1 && v$3 < 0 && i$7 > 0 && out[i$7 - 1].v === "-" ? -v$3 : v$3; out[i$7].v = write_num(out[i$7].t, out[i$7].v, myv); out[i$7].t = "t"; } var retval = ""; for (i$7 = 0; i$7 !== out.length; ++i$7) if (out[i$7] != null) retval += out[i$7].v; return retval; } function chkcond(v$3, rr) { if (rr == null) return false; var thresh = parseFloat(rr[2]); switch (rr[1]) { case "=": if (v$3 == thresh) return true; break; case ">": if (v$3 > thresh) return true; break; case "<": if (v$3 < thresh) return true; break; case "<>": if (v$3 != thresh) return true; break; case ">=": if (v$3 >= thresh) return true; break; case "<=": if (v$3 <= thresh) return true; break; } return false; } function choose_fmt(f$4, v$3) { var fmt = SSF_split_fmt(f$4); var l$3 = fmt.length, lat = fmt[l$3 - 1].indexOf("@"); if (l$3 < 4 && lat > -1) --l$3; if (fmt.length > 4) throw new Error("cannot find right format for |" + fmt.join("|") + "|"); if (typeof v$3 !== "number") return [4, fmt.length === 4 || lat > -1 ? fmt[fmt.length - 1] : "@"]; if (typeof v$3 === "number" && !isFinite(v$3)) v$3 = 0; switch (fmt.length) { case 1: fmt = lat > -1 ? [ "General", "General", "General", fmt[0] ] : [ fmt[0], fmt[0], fmt[0], "@" ]; break; case 2: fmt = lat > -1 ? [ fmt[0], fmt[0], fmt[0], fmt[1] ] : [ fmt[0], fmt[1], fmt[0], "@" ]; break; case 3: fmt = lat > -1 ? [ fmt[0], fmt[1], fmt[0], fmt[2] ] : [ fmt[0], fmt[1], fmt[2], "@" ]; break; case 4: break; } var ff = v$3 > 0 ? fmt[0] : v$3 < 0 ? fmt[1] : fmt[2]; if (fmt[0].indexOf("[") === -1 && fmt[1].indexOf("[") === -1) return [l$3, ff]; if (fmt[0].match(/\[[=<>]/) != null || fmt[1].match(/\[[=<>]/) != null) { var m1 = fmt[0].match(cfregex2); var m2 = fmt[1].match(cfregex2); return chkcond(v$3, m1) ? [l$3, fmt[0]] : chkcond(v$3, m2) ? [l$3, fmt[1]] : [l$3, fmt[m1 != null && m2 != null ? 2 : 1]]; } return [l$3, ff]; } function SSF_format(fmt, v$3, o$10) { if (o$10 == null) o$10 = {}; var sfmt = ""; switch (typeof fmt) { case "string": if (fmt == "m/d/yy" && o$10.dateNF) sfmt = o$10.dateNF; else sfmt = fmt; break; case "number": if (fmt == 14 && o$10.dateNF) sfmt = o$10.dateNF; else sfmt = (o$10.table != null ? o$10.table : table_fmt)[fmt]; if (sfmt == null) sfmt = o$10.table && o$10.table[SSF_default_map[fmt]] || table_fmt[SSF_default_map[fmt]]; if (sfmt == null) sfmt = SSF_default_str[fmt] || "General"; break; } if (SSF_isgeneral(sfmt, 0)) return SSF_general(v$3, o$10); if (v$3 instanceof Date) v$3 = datenum(v$3, o$10.date1904); var f$4 = choose_fmt(sfmt, v$3); if (SSF_isgeneral(f$4[1])) return SSF_general(v$3, o$10); if (v$3 === true) v$3 = "TRUE"; else if (v$3 === false) v$3 = "FALSE"; else if (v$3 === "" || v$3 == null) return ""; else if (isNaN(v$3) && f$4[1].indexOf("0") > -1) return "#NUM!"; else if (!isFinite(v$3) && f$4[1].indexOf("0") > -1) return "#DIV/0!"; return eval_fmt(f$4[1], v$3, o$10, f$4[0]); } function SSF_load(fmt, idx) { if (typeof idx != "number") { idx = +idx || -1; for (var i$7 = 0; i$7 < 392; ++i$7) { if (table_fmt[i$7] == undefined) { if (idx < 0) idx = i$7; continue; } if (table_fmt[i$7] == fmt) { idx = i$7; break; } } if (idx < 0) idx = 391; } table_fmt[idx] = fmt; return idx; } function SSF_load_table(tbl) { for (var i$7 = 0; i$7 != 392; ++i$7) if (tbl[i$7] !== undefined) SSF_load(tbl[i$7], i$7); } function make_ssf() { table_fmt = SSF_init_table(); } function dateNF_regex(dateNF) { var fmt = typeof dateNF == "number" ? table_fmt[dateNF] : dateNF; fmt = fmt.replace(dateNFregex, "(\\d+)"); dateNFregex.lastIndex = 0; return new RegExp("^" + fmt + "$"); } function dateNF_fix(str, dateNF, match) { var Y = -1, m$3 = -1, d$5 = -1, H$1 = -1, M$3 = -1, S$4 = -1; (dateNF.match(dateNFregex) || []).forEach(function(n$9, i$7) { var v$3 = parseInt(match[i$7 + 1], 10); switch (n$9.toLowerCase().charAt(0)) { case "y": Y = v$3; break; case "d": d$5 = v$3; break; case "h": H$1 = v$3; break; case "s": S$4 = v$3; break; case "m": if (H$1 >= 0) M$3 = v$3; else m$3 = v$3; break; } }); dateNFregex.lastIndex = 0; if (S$4 >= 0 && M$3 == -1 && m$3 >= 0) { M$3 = m$3; m$3 = -1; } var datestr = ("" + (Y >= 0 ? Y : new Date().getFullYear())).slice(-4) + "-" + ("00" + (m$3 >= 1 ? m$3 : 1)).slice(-2) + "-" + ("00" + (d$5 >= 1 ? d$5 : 1)).slice(-2); if (datestr.length == 7) datestr = "0" + datestr; if (datestr.length == 8) datestr = "20" + datestr; var timestr = ("00" + (H$1 >= 0 ? H$1 : 0)).slice(-2) + ":" + ("00" + (M$3 >= 0 ? M$3 : 0)).slice(-2) + ":" + ("00" + (S$4 >= 0 ? S$4 : 0)).slice(-2); if (H$1 == -1 && M$3 == -1 && S$4 == -1) return datestr; if (Y == -1 && m$3 == -1 && d$5 == -1) return timestr; return datestr + "T" + timestr; } function SSF__load(fmt, idx) { return SSF_load(bad_formats[fmt] || fmt, idx); } function set_fs(fs) { _fs = fs; } function blobify(data) { if (typeof data === "string") return s2ab(data); if (Array.isArray(data)) return a2u(data); return data; } function write_dl(fname, payload, enc) { if (typeof _fs !== "undefined" && _fs.writeFileSync) return enc ? _fs.writeFileSync(fname, payload, enc) : _fs.writeFileSync(fname, payload); if (typeof Deno !== "undefined") { if (enc && typeof payload == "string") switch (enc) { case "utf8": payload = new TextEncoder(enc).encode(payload); break; case "binary": payload = s2ab(payload); break; default: throw new Error("Unsupported encoding " + enc); } return Deno.writeFileSync(fname, payload); } var data = enc == "utf8" ? utf8write(payload) : payload; if (typeof IE_SaveFile !== "undefined") return IE_SaveFile(data, fname); if (typeof Blob !== "undefined") { var blob = new Blob([blobify(data)], { type: "application/octet-stream" }); if (typeof navigator !== "undefined" && navigator.msSaveBlob) return navigator.msSaveBlob(blob, fname); if (typeof saveAs !== "undefined") return saveAs(blob, fname); if (typeof URL !== "undefined" && typeof document !== "undefined" && document.createElement && URL.createObjectURL) { var url = URL.createObjectURL(blob); if (typeof chrome === "object" && typeof (chrome.downloads || {}).download == "function") { if (URL.revokeObjectURL && typeof setTimeout !== "undefined") setTimeout(function() { URL.revokeObjectURL(url); }, 6e4); return chrome.downloads.download({ url, filename: fname, saveAs: true }); } var a$2 = document.createElement("a"); if (a$2.download != null) { a$2.download = fname; a$2.href = url; document.body.appendChild(a$2); a$2.click(); document.body.removeChild(a$2); if (URL.revokeObjectURL && typeof setTimeout !== "undefined") setTimeout(function() { URL.revokeObjectURL(url); }, 6e4); return url; } } else if (typeof URL !== "undefined" && !URL.createObjectURL && typeof chrome === "object") { var b64 = "data:application/octet-stream;base64," + Base64_encode_arr(new Uint8Array(blobify(data))); return chrome.downloads.download({ url: b64, filename: fname, saveAs: true }); } } if (typeof $ !== "undefined" && typeof File !== "undefined" && typeof Folder !== "undefined") try { var out = File(fname); out.open("w"); out.encoding = "binary"; if (Array.isArray(payload)) payload = a2s(payload); out.write(payload); out.close(); return payload; } catch (e$10) { if (!e$10.message || e$10.message.indexOf("onstruct") == -1) throw e$10; } throw new Error("cannot save file " + fname); } function read_binary(path$1) { if (typeof _fs !== "undefined") return _fs.readFileSync(path$1); if (typeof Deno !== "undefined") return Deno.readFileSync(path$1); if (typeof $ !== "undefined" && typeof File !== "undefined" && typeof Folder !== "undefined") try { var infile = File(path$1); infile.open("r"); infile.encoding = "binary"; var data = infile.read(); infile.close(); return data; } catch (e$10) { if (!e$10.message || e$10.message.indexOf("onstruct") == -1) throw e$10; } throw new Error("Cannot access file " + path$1); } function keys(o$10) { var ks = Object.keys(o$10), o2 = []; for (var i$7 = 0; i$7 < ks.length; ++i$7) if (Object.prototype.hasOwnProperty.call(o$10, ks[i$7])) o2.push(ks[i$7]); return o2; } function evert_key(obj, key) { var o$10 = [], K$1 = keys(obj); for (var i$7 = 0; i$7 !== K$1.length; ++i$7) if (o$10[obj[K$1[i$7]][key]] == null) o$10[obj[K$1[i$7]][key]] = K$1[i$7]; return o$10; } function evert(obj) { var o$10 = [], K$1 = keys(obj); for (var i$7 = 0; i$7 !== K$1.length; ++i$7) o$10[obj[K$1[i$7]]] = K$1[i$7]; return o$10; } function evert_num(obj) { var o$10 = [], K$1 = keys(obj); for (var i$7 = 0; i$7 !== K$1.length; ++i$7) o$10[obj[K$1[i$7]]] = parseInt(K$1[i$7], 10); return o$10; } function evert_arr(obj) { var o$10 = [], K$1 = keys(obj); for (var i$7 = 0; i$7 !== K$1.length; ++i$7) { if (o$10[obj[K$1[i$7]]] == null) o$10[obj[K$1[i$7]]] = []; o$10[obj[K$1[i$7]]].push(K$1[i$7]); } return o$10; } function datenum(v$3, date1904) { var epoch = /* @__PURE__ */ v$3.getTime(); var res = (epoch - dnthresh) / (24 * 60 * 60 * 1e3); if (date1904) { res -= 1462; return res < -1402 ? res - 1 : res; } return res < 60 ? res - 1 : res; } function numdate(v$3) { if (v$3 >= 60 && v$3 < 61) return v$3; var out = new Date(); out.setTime((v$3 > 60 ? v$3 : v$3 + 1) * 24 * 60 * 60 * 1e3 + dnthresh); return out; } function parse_isodur(s$5) { var sec = 0, mt = 0, time = false; var m$3 = s$5.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/); if (!m$3) throw new Error("|" + s$5 + "| is not an ISO8601 Duration"); for (var i$7 = 1; i$7 != m$3.length; ++i$7) { if (!m$3[i$7]) continue; mt = 1; if (i$7 > 3) time = true; switch (m$3[i$7].slice(m$3[i$7].length - 1)) { case "Y": throw new Error("Unsupported ISO Duration Field: " + m$3[i$7].slice(m$3[i$7].length - 1)); case "D": mt *= 24; case "H": mt *= 60; case "M": if (!time) throw new Error("Unsupported ISO Duration Field: M"); else mt *= 60; case "S": break; } sec += mt * parseInt(m$3[i$7], 10); } return sec; } function parseDate(str, date1904) { if (str instanceof Date) return str; var m$3 = str.match(pdre1); if (m$3) return new Date((date1904 ? dnthresh2 : dnthresh1) + ((parseInt(m$3[1], 10) * 60 + parseInt(m$3[2], 10)) * 60 + (m$3[3] ? parseInt(m$3[3].slice(1), 10) : 0)) * 1e3 + (m$3[4] ? parseInt((m$3[4] + "000").slice(1, 4), 10) : 0)); m$3 = str.match(pdre2); if (m$3) return new Date(Date.UTC(+m$3[1], +m$3[2] - 1, +m$3[3], 0, 0, 0, 0)); m$3 = str.match(pdre3); if (m$3) return new Date(Date.UTC(+m$3[1], +m$3[2] - 1, +m$3[3], +m$3[4], +m$3[5], m$3[6] && parseInt(m$3[6].slice(1), 10) || 0, m$3[7] && parseInt((m$3[7] + "0000").slice(1, 4), 10) || 0)); var d$5 = new Date(str); return d$5; } function cc2str(arr, debomit) { if (has_buf && Buffer.isBuffer(arr)) { if (debomit && buf_utf16le) { if (arr[0] == 255 && arr[1] == 254) return utf8write(arr.slice(2).toString("utf16le")); if (arr[1] == 254 && arr[2] == 255) return utf8write(utf16beread(arr.slice(2).toString("binary"))); } return arr.toString("binary"); } if (typeof TextDecoder !== "undefined") try { if (debomit) { if (arr[0] == 255 && arr[1] == 254) return utf8write(new TextDecoder("utf-16le").decode(arr.slice(2))); if (arr[0] == 254 && arr[1] == 255) return utf8write(new TextDecoder("utf-16be").decode(arr.slice(2))); } var rev = { "€": "€", "‚": "‚", "ƒ": "ƒ", "„": "„", "…": "…", "†": "†", "‡": "‡", "ˆ": "ˆ", "‰": "‰", "Š": "Š", "‹": "‹", "Œ": "Œ", "Ž": "Ž", "‘": "‘", "’": "’", "“": "“", "”": "”", "•": "•", "–": "–", "—": "—", "˜": "˜", "™": "™", "š": "š", "›": "›", "œ": "œ", "ž": "ž", "Ÿ": "Ÿ" }; if (Array.isArray(arr)) arr = new Uint8Array(arr); return new TextDecoder("latin1").decode(arr).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g, function(c$7) { return rev[c$7] || c$7; }); } catch (e$10) {} var o$10 = [], i$7 = 0; try { for (i$7 = 0; i$7 < arr.length - 65536; i$7 += 65536) o$10.push(String.fromCharCode.apply(0, arr.slice(i$7, i$7 + 65536))); o$10.push(String.fromCharCode.apply(0, arr.slice(i$7))); } catch (e$10) { try { for (; i$7 < arr.length - 16384; i$7 += 16384) o$10.push(String.fromCharCode.apply(0, arr.slice(i$7, i$7 + 16384))); o$10.push(String.fromCharCode.apply(0, arr.slice(i$7))); } catch (e$11) { for (; i$7 != arr.length; ++i$7) o$10.push(String.fromCharCode(arr[i$7])); } } return o$10.join(""); } function dup(o$10) { if (typeof JSON != "undefined" && !Array.isArray(o$10)) return JSON.parse(JSON.stringify(o$10)); if (typeof o$10 != "object" || o$10 == null) return o$10; if (o$10 instanceof Date) return new Date(o$10.getTime()); var out = {}; for (var k$2 in o$10) if (Object.prototype.hasOwnProperty.call(o$10, k$2)) out[k$2] = dup(o$10[k$2]); return out; } function fill(c$7, l$3) { var o$10 = ""; while (o$10.length < l$3) o$10 += c$7; return o$10; } function fuzzynum(s$5) { var v$3 = Number(s$5); if (!isNaN(v$3)) return isFinite(v$3) ? v$3 : NaN; if (!/\d/.test(s$5)) return v$3; var wt = 1; var ss = s$5.replace(/([\d]),([\d])/g, "$1$2").replace(/[$]/g, "").replace(/[%]/g, function() { wt *= 100; return ""; }); if (!isNaN(v$3 = Number(ss))) return v$3 / wt; ss = ss.replace(/[(]([^()]*)[)]/, function($$, $1) { wt = -wt; return $1; }); if (!isNaN(v$3 = Number(ss))) return v$3 / wt; return v$3; } function fuzzytime1(M$3) { if (!M$3[2]) return new Date(Date.UTC(1899, 11, 31, +M$3[1] % 12 + (M$3[7] == "p" ? 12 : 0), 0, 0, 0)); if (M$3[3]) { if (M$3[4]) return new Date(Date.UTC(1899, 11, 31, +M$3[1] % 12 + (M$3[7] == "p" ? 12 : 0), +M$3[2], +M$3[4], parseFloat(M$3[3]) * 1e3)); else return new Date(Date.UTC(1899, 11, 31, M$3[7] == "p" ? 12 : 0, +M$3[1], +M$3[2], parseFloat(M$3[3]) * 1e3)); } else if (M$3[5]) return new Date(Date.UTC(1899, 11, 31, +M$3[1] % 12 + (M$3[7] == "p" ? 12 : 0), +M$3[2], +M$3[5], M$3[6] ? parseFloat(M$3[6]) * 1e3 : 0)); else return new Date(Date.UTC(1899, 11, 31, +M$3[1] % 12 + (M$3[7] == "p" ? 12 : 0), +M$3[2], 0, 0)); } function fuzzytime2(M$3) { if (!M$3[2]) return new Date(Date.UTC(1899, 11, 31, +M$3[1], 0, 0, 0)); if (M$3[3]) { if (M$3[4]) return new Date(Date.UTC(1899, 11, 31, +M$3[1], +M$3[2], +M$3[4], parseFloat(M$3[3]) * 1e3)); else return new Date(Date.UTC(1899, 11, 31, 0, +M$3[1], +M$3[2], parseFloat(M$3[3]) * 1e3)); } else if (M$3[5]) return new Date(Date.UTC(1899, 11, 31, +M$3[1], +M$3[2], +M$3[5], M$3[6] ? parseFloat(M$3[6]) * 1e3 : 0)); else return new Date(Date.UTC(1899, 11, 31, +M$3[1], +M$3[2], 0, 0)); } function fuzzydate(s$5) { if (FDISO.test(s$5)) return s$5.indexOf("Z") == -1 ? local_to_utc(new Date(s$5)) : new Date(s$5); var lower = s$5.toLowerCase(); var lnos = lower.replace(/\s+/g, " ").trim(); var M$3 = lnos.match(FDRE1); if (M$3) return fuzzytime1(M$3); M$3 = lnos.match(FDRE2); if (M$3) return fuzzytime2(M$3); M$3 = lnos.match(pdre3); if (M$3) return new Date(Date.UTC(+M$3[1], +M$3[2] - 1, +M$3[3], +M$3[4], +M$3[5], M$3[6] && parseInt(M$3[6].slice(1), 10) || 0, M$3[7] && parseInt((M$3[7] + "0000").slice(1, 4), 10) || 0)); var o$10 = new Date(utc_append_works && s$5.indexOf("UTC") == -1 ? s$5 + " UTC" : s$5), n$9 = new Date(NaN); var y$3 = o$10.getYear(), m$3 = o$10.getMonth(), d$5 = o$10.getDate(); if (isNaN(d$5)) return n$9; if (lower.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)) { lower = lower.replace(/[^a-z]/g, "").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/, ""); if (lower.length > 3 && lower_months.indexOf(lower) == -1) return n$9; } else if (lower.replace(/[ap]m?/, "").match(/[a-z]/)) return n$9; if (y$3 < 0 || y$3 > 8099 || s$5.match(/[^-0-9:,\/\\\ ]/)) return n$9; return o$10; } function utc_to_local(utc) { return new Date(utc.getUTCFullYear(), utc.getUTCMonth(), utc.getUTCDate(), utc.getUTCHours(), utc.getUTCMinutes(), utc.getUTCSeconds(), utc.getUTCMilliseconds()); } function local_to_utc(local) { return new Date(Date.UTC(local.getFullYear(), local.getMonth(), local.getDate(), local.getHours(), local.getMinutes(), local.getSeconds(), local.getMilliseconds())); } function remove_doctype(str) { var preamble = str.slice(0, 1024); var si = preamble.indexOf(" -1) { var ei = str.indexOf(e$10, si + s$5.length); if (ei == -1) break; out.push(str.slice(si, ei + e$10.length)); si = str.indexOf(s$5, ei + e$10.length); } return out.length > 0 ? out : null; } function str_remove_ng(str, s$5, e$10) { var out = [], last = 0; var si = str.indexOf(s$5); if (si == -1) return str; while (si > -1) { out.push(str.slice(last, si)); var ei = str.indexOf(e$10, si + s$5.length); if (ei == -1) break; if ((si = str.indexOf(s$5, last = ei + e$10.length)) == -1) out.push(str.slice(last)); } return out.join(""); } function str_match_xml(str, tag) { var si = str.indexOf("<" + tag), w$2 = tag.length + 1, L$2 = str.length; while (si >= 0 && si <= L$2 - w$2 && !xml_boundary[str.charAt(si + w$2)]) si = str.indexOf("<" + tag, si + 1); if (si === -1) return null; var sf = str.indexOf(">", si + tag.length); if (sf === -1) return null; var et = ""; var ei = str.indexOf(et, sf); if (ei == -1) return null; return [str.slice(si, ei + et.length), str.slice(sf + 1, ei)]; } function getdatastr(data) { if (!data) return null; if (data.content && data.type) return cc2str(data.content, true); if (data.data) return debom(data.data); if (data.asNodeBuffer && has_buf) return debom(data.asNodeBuffer().toString("binary")); if (data.asBinary) return debom(data.asBinary()); if (data._data && data._data.getContent) return debom(cc2str(Array.prototype.slice.call(data._data.getContent(), 0))); return null; } function getdatabin(data) { if (!data) return null; if (data.data) return char_codes(data.data); if (data.asNodeBuffer && has_buf) return data.asNodeBuffer(); if (data._data && data._data.getContent) { var o$10 = data._data.getContent(); if (typeof o$10 == "string") return char_codes(o$10); return Array.prototype.slice.call(o$10); } if (data.content && data.type) return data.content; return null; } function getdata(data) { return data && data.name.slice(-4) === ".bin" ? getdatabin(data) : getdatastr(data); } function safegetzipfile(zip, file) { var k$2 = zip.FullPaths || keys(zip.files); var f$4 = file.toLowerCase().replace(/[\/]/g, "\\"), g$1 = f$4.replace(/\\/g, "/"); for (var i$7 = 0; i$7 < k$2.length; ++i$7) { var n$9 = k$2[i$7].replace(/^Root Entry[\/]/, "").toLowerCase(); if (f$4 == n$9 || g$1 == n$9) return zip.files ? zip.files[k$2[i$7]] : zip.FileIndex[i$7]; } return null; } function getzipfile(zip, file) { var o$10 = safegetzipfile(zip, file); if (o$10 == null) throw new Error("Cannot find file " + file + " in zip"); return o$10; } function getzipdata(zip, file, safe) { if (!safe) return getdata(getzipfile(zip, file)); if (!file) return null; try { return getzipdata(zip, file); } catch (e$10) { return null; } } function getzipstr(zip, file, safe) { if (!safe) return getdatastr(getzipfile(zip, file)); if (!file) return null; try { return getzipstr(zip, file); } catch (e$10) { return null; } } function getzipbin(zip, file, safe) { if (!safe) return getdatabin(getzipfile(zip, file)); if (!file) return null; try { return getzipbin(zip, file); } catch (e$10) { return null; } } function zipentries(zip) { var k$2 = zip.FullPaths || keys(zip.files), o$10 = []; for (var i$7 = 0; i$7 < k$2.length; ++i$7) if (k$2[i$7].slice(-1) != "/") o$10.push(k$2[i$7].replace(/^Root Entry[\/]/, "")); return o$10.sort(); } function zip_add_file(zip, path$1, content) { if (zip.FullPaths) { if (Array.isArray(content) && typeof content[0] == "string") { content = content.join(""); } if (typeof content == "string") { var res; if (has_buf) res = Buffer_from(content); else res = utf8decode(content); return CFB.utils.cfb_add(zip, path$1, res); } CFB.utils.cfb_add(zip, path$1, content); } else zip.file(path$1, content); } function zip_new() { return CFB.utils.cfb_new(); } function zip_read(d$5, o$10) { switch (o$10.type) { case "base64": return CFB.read(d$5, { type: "base64" }); case "binary": return CFB.read(d$5, { type: "binary" }); case "buffer": case "array": return CFB.read(d$5, { type: "buffer" }); } throw new Error("Unrecognized type " + o$10.type); } function resolve_path(path$1, base) { if (path$1.charAt(0) == "/") return path$1.slice(1); var result = base.split("/"); if (base.slice(-1) != "/") result.pop(); var target = path$1.split("/"); while (target.length !== 0) { var step = target.shift(); if (step === "..") result.pop(); else if (step !== ".") result.push(step); } return result.join("/"); } function parsexmltag(tag, skip_root, skip_LC) { var z$2 = {}; var eq = 0, c$7 = 0; for (; eq !== tag.length; ++eq) if ((c$7 = tag.charCodeAt(eq)) === 32 || c$7 === 10 || c$7 === 13) break; if (!skip_root) z$2[0] = tag.slice(0, eq); if (eq === tag.length) return z$2; var m$3 = tag.match(attregexg), j$2 = 0, v$3 = "", i$7 = 0, q$2 = "", cc = "", quot = 1; if (m$3) for (i$7 = 0; i$7 != m$3.length; ++i$7) { cc = m$3[i$7].slice(1); for (c$7 = 0; c$7 != cc.length; ++c$7) if (cc.charCodeAt(c$7) === 61) break; q$2 = cc.slice(0, c$7).trim(); while (cc.charCodeAt(c$7 + 1) == 32) ++c$7; quot = (eq = cc.charCodeAt(c$7 + 1)) == 34 || eq == 39 ? 1 : 0; v$3 = cc.slice(c$7 + 1 + quot, cc.length - quot); for (j$2 = 0; j$2 != q$2.length; ++j$2) if (q$2.charCodeAt(j$2) === 58) break; if (j$2 === q$2.length) { if (q$2.indexOf("_") > 0) q$2 = q$2.slice(0, q$2.indexOf("_")); z$2[q$2] = v$3; if (!skip_LC) z$2[q$2.toLowerCase()] = v$3; } else { var k$2 = (j$2 === 5 && q$2.slice(0, 5) === "xmlns" ? "xmlns" : "") + q$2.slice(j$2 + 1); if (z$2[k$2] && q$2.slice(j$2 - 3, j$2) == "ext") continue; z$2[k$2] = v$3; if (!skip_LC) z$2[k$2.toLowerCase()] = v$3; } } return z$2; } function parsexmltagraw(tag, skip_root, skip_LC) { var z$2 = {}; var eq = 0, c$7 = 0; for (; eq !== tag.length; ++eq) if ((c$7 = tag.charCodeAt(eq)) === 32 || c$7 === 10 || c$7 === 13) break; if (!skip_root) z$2[0] = tag.slice(0, eq); if (eq === tag.length) return z$2; var m$3 = tag.match(attregexg), j$2 = 0, v$3 = "", i$7 = 0, q$2 = "", cc = "", quot = 1; if (m$3) for (i$7 = 0; i$7 != m$3.length; ++i$7) { cc = m$3[i$7].slice(1); for (c$7 = 0; c$7 != cc.length; ++c$7) if (cc.charCodeAt(c$7) === 61) break; q$2 = cc.slice(0, c$7).trim(); while (cc.charCodeAt(c$7 + 1) == 32) ++c$7; quot = (eq = cc.charCodeAt(c$7 + 1)) == 34 || eq == 39 ? 1 : 0; v$3 = cc.slice(c$7 + 1 + quot, cc.length - quot); if (q$2.indexOf("_") > 0) q$2 = q$2.slice(0, q$2.indexOf("_")); z$2[q$2] = v$3; if (!skip_LC) z$2[q$2.toLowerCase()] = v$3; } return z$2; } function strip_ns(x$2) { return x$2.replace(nsregex2, "<$1"); } function escapexml(text$2) { var s$5 = text$2 + ""; return s$5.replace(decregex, function(y$3) { return rencoding[y$3]; }).replace(charegex, function(s$6) { return "_x" + ("000" + s$6.charCodeAt(0).toString(16)).slice(-4) + "_"; }); } function escapexmltag(text$2) { return escapexml(text$2).replace(/ /g, "_x0020_"); } function escapehtml(text$2) { var s$5 = text$2 + ""; return s$5.replace(decregex, function(y$3) { return rencoding[y$3]; }).replace(/\n/g, "
").replace(htmlcharegex, function(s$6) { return "&#x" + ("000" + s$6.charCodeAt(0).toString(16)).slice(-4) + ";"; }); } function escapexlml(text$2) { var s$5 = text$2 + ""; return s$5.replace(decregex, function(y$3) { return rencoding[y$3]; }).replace(htmlcharegex, function(s$6) { return "&#x" + s$6.charCodeAt(0).toString(16).toUpperCase() + ";"; }); } function xlml_unfixstr(str) { return str.replace(/(\r\n|[\r\n])/g, " "); } function parsexmlbool(value) { switch (value) { case 1: case true: case "1": case "true": return true; case 0: case false: case "0": case "false": return false; } return false; } function utf8reada(orig) { var out = "", i$7 = 0, c$7 = 0, d$5 = 0, e$10 = 0, f$4 = 0, w$2 = 0; while (i$7 < orig.length) { c$7 = orig.charCodeAt(i$7++); if (c$7 < 128) { out += String.fromCharCode(c$7); continue; } d$5 = orig.charCodeAt(i$7++); if (c$7 > 191 && c$7 < 224) { f$4 = (c$7 & 31) << 6; f$4 |= d$5 & 63; out += String.fromCharCode(f$4); continue; } e$10 = orig.charCodeAt(i$7++); if (c$7 < 240) { out += String.fromCharCode((c$7 & 15) << 12 | (d$5 & 63) << 6 | e$10 & 63); continue; } f$4 = orig.charCodeAt(i$7++); w$2 = ((c$7 & 7) << 18 | (d$5 & 63) << 12 | (e$10 & 63) << 6 | f$4 & 63) - 65536; out += String.fromCharCode(55296 + (w$2 >>> 10 & 1023)); out += String.fromCharCode(56320 + (w$2 & 1023)); } return out; } function utf8readb(data) { var out = new_raw_buf(2 * data.length), w$2, i$7, j$2 = 1, k$2 = 0, ww = 0, c$7; for (i$7 = 0; i$7 < data.length; i$7 += j$2) { j$2 = 1; if ((c$7 = data.charCodeAt(i$7)) < 128) w$2 = c$7; else if (c$7 < 224) { w$2 = (c$7 & 31) * 64 + (data.charCodeAt(i$7 + 1) & 63); j$2 = 2; } else if (c$7 < 240) { w$2 = (c$7 & 15) * 4096 + (data.charCodeAt(i$7 + 1) & 63) * 64 + (data.charCodeAt(i$7 + 2) & 63); j$2 = 3; } else { j$2 = 4; w$2 = (c$7 & 7) * 262144 + (data.charCodeAt(i$7 + 1) & 63) * 4096 + (data.charCodeAt(i$7 + 2) & 63) * 64 + (data.charCodeAt(i$7 + 3) & 63); w$2 -= 65536; ww = 55296 + (w$2 >>> 10 & 1023); w$2 = 56320 + (w$2 & 1023); } if (ww !== 0) { out[k$2++] = ww & 255; out[k$2++] = ww >>> 8; ww = 0; } out[k$2++] = w$2 % 256; out[k$2++] = w$2 >>> 8; } return out.slice(0, k$2).toString("ucs2"); } function utf8readc(data) { return Buffer_from(data, "binary").toString("utf8"); } function parseVector(data, opts) { var h$5 = parsexmltag(data); var matches = str_match_xml_ns_g(data, h$5.baseType) || []; var res = []; if (matches.length != h$5.size) { if (opts.WTF) throw new Error("unexpected vector length " + matches.length + " != " + h$5.size); return res; } matches.forEach(function(x$2) { var v$3 = x$2.replace(vtvregex, "").match(vtmregex); if (v$3) res.push({ v: utf8read(v$3[2]), t: v$3[1] }); }); return res; } function writetag(f$4, g$1) { return "<" + f$4 + (g$1.match(wtregex) ? " xml:space=\"preserve\"" : "") + ">" + g$1 + ""; } function wxt_helper(h$5) { return keys(h$5).map(function(k$2) { return " " + k$2 + "=\"" + h$5[k$2] + "\""; }).join(""); } function writextag(f$4, g$1, h$5) { return "<" + f$4 + (h$5 != null ? wxt_helper(h$5) : "") + (g$1 != null ? (g$1.match(wtregex) ? " xml:space=\"preserve\"" : "") + ">" + g$1 + ""; } function write_w3cdtf(d$5, t$6) { try { return d$5.toISOString().replace(/\.\d*/, ""); } catch (e$10) { if (t$6) throw e$10; } return ""; } function write_vt(s$5, xlsx) { switch (typeof s$5) { case "string": var o$10 = writextag("vt:lpwstr", escapexml(s$5)); if (xlsx) o$10 = o$10.replace(/"/g, "_x0022_"); return o$10; case "number": return writextag((s$5 | 0) == s$5 ? "vt:i4" : "vt:r8", escapexml(String(s$5))); case "boolean": return writextag("vt:bool", s$5 ? "true" : "false"); } if (s$5 instanceof Date) return writextag("vt:filetime", write_w3cdtf(s$5)); throw new Error("Unable to serialize " + s$5); } function xlml_normalize(d$5) { if (has_buf && Buffer.isBuffer(d$5)) return d$5.toString("utf8"); if (typeof d$5 === "string") return d$5; if (typeof Uint8Array !== "undefined" && d$5 instanceof Uint8Array) return utf8read(a2s(ab2a(d$5))); throw new Error("Bad input format: expected Buffer or string"); } function read_double_le(b$3, idx) { var s$5 = 1 - 2 * (b$3[idx + 7] >>> 7); var e$10 = ((b$3[idx + 7] & 127) << 4) + (b$3[idx + 6] >>> 4 & 15); var m$3 = b$3[idx + 6] & 15; for (var i$7 = 5; i$7 >= 0; --i$7) m$3 = m$3 * 256 + b$3[idx + i$7]; if (e$10 == 2047) return m$3 == 0 ? s$5 * Infinity : NaN; if (e$10 == 0) e$10 = -1022; else { e$10 -= 1023; m$3 += Math.pow(2, 52); } return s$5 * Math.pow(2, e$10 - 52) * m$3; } function write_double_le(b$3, v$3, idx) { var bs = (v$3 < 0 || 1 / v$3 == -Infinity ? 1 : 0) << 7, e$10 = 0, m$3 = 0; var av = bs ? -v$3 : v$3; if (!isFinite(av)) { e$10 = 2047; m$3 = isNaN(v$3) ? 26985 : 0; } else if (av == 0) e$10 = m$3 = 0; else { e$10 = Math.floor(Math.log(av) / Math.LN2); m$3 = av * Math.pow(2, 52 - e$10); if (e$10 <= -1023 && (!isFinite(m$3) || m$3 < Math.pow(2, 52))) { e$10 = -1022; } else { m$3 -= Math.pow(2, 52); e$10 += 1023; } } for (var i$7 = 0; i$7 <= 5; ++i$7, m$3 /= 256) b$3[idx + i$7] = m$3 & 255; b$3[idx + 6] = (e$10 & 15) << 4 | m$3 & 15; b$3[idx + 7] = e$10 >> 4 | bs; } function cpdoit() { __utf16le = function(b$3, s$5, e$10) { return $cptable.utils.decode(1200, b$3.slice(s$5, e$10)).replace(chr0, ""); }; __utf8 = function(b$3, s$5, e$10) { return $cptable.utils.decode(65001, b$3.slice(s$5, e$10)); }; __lpstr = function(b$3, i$7) { var len = __readUInt32LE(b$3, i$7); return len > 0 ? $cptable.utils.decode(current_ansi, b$3.slice(i$7 + 4, i$7 + 4 + len - 1)) : ""; }; __cpstr = function(b$3, i$7) { var len = __readUInt32LE(b$3, i$7); return len > 0 ? $cptable.utils.decode(current_codepage, b$3.slice(i$7 + 4, i$7 + 4 + len - 1)) : ""; }; __lpwstr = function(b$3, i$7) { var len = 2 * __readUInt32LE(b$3, i$7); return len > 0 ? $cptable.utils.decode(1200, b$3.slice(i$7 + 4, i$7 + 4 + len - 1)) : ""; }; __lpp4 = function(b$3, i$7) { var len = __readUInt32LE(b$3, i$7); return len > 0 ? $cptable.utils.decode(1200, b$3.slice(i$7 + 4, i$7 + 4 + len)) : ""; }; __8lpp4 = function(b$3, i$7) { var len = __readUInt32LE(b$3, i$7); return len > 0 ? $cptable.utils.decode(65001, b$3.slice(i$7 + 4, i$7 + 4 + len)) : ""; }; } function ReadShift(size, t$6) { var o$10 = "", oI, oR, oo = [], w$2, vv, i$7, loc; switch (t$6) { case "dbcs": loc = this.l; if (has_buf && Buffer.isBuffer(this) && buf_utf16le) o$10 = this.slice(this.l, this.l + 2 * size).toString("utf16le"); else for (i$7 = 0; i$7 < size; ++i$7) { o$10 += String.fromCharCode(__readUInt16LE(this, loc)); loc += 2; } size *= 2; break; case "utf8": o$10 = __utf8(this, this.l, this.l + size); break; case "utf16le": size *= 2; o$10 = __utf16le(this, this.l, this.l + size); break; case "wstr": if (typeof $cptable !== "undefined") o$10 = $cptable.utils.decode(current_codepage, this.slice(this.l, this.l + 2 * size)); else return ReadShift.call(this, size, "dbcs"); size = 2 * size; break; case "lpstr-ansi": o$10 = __lpstr(this, this.l); size = 4 + __readUInt32LE(this, this.l); break; case "lpstr-cp": o$10 = __cpstr(this, this.l); size = 4 + __readUInt32LE(this, this.l); break; case "lpwstr": o$10 = __lpwstr(this, this.l); size = 4 + 2 * __readUInt32LE(this, this.l); break; case "lpp4": size = 4 + __readUInt32LE(this, this.l); o$10 = __lpp4(this, this.l); if (size & 2) size += 2; break; case "8lpp4": size = 4 + __readUInt32LE(this, this.l); o$10 = __8lpp4(this, this.l); if (size & 3) size += 4 - (size & 3); break; case "cstr": size = 0; o$10 = ""; while ((w$2 = __readUInt8(this, this.l + size++)) !== 0) oo.push(_getchar(w$2)); o$10 = oo.join(""); break; case "_wstr": size = 0; o$10 = ""; while ((w$2 = __readUInt16LE(this, this.l + size)) !== 0) { oo.push(_getchar(w$2)); size += 2; } size += 2; o$10 = oo.join(""); break; case "dbcs-cont": o$10 = ""; loc = this.l; for (i$7 = 0; i$7 < size; ++i$7) { if (this.lens && this.lens.indexOf(loc) !== -1) { w$2 = __readUInt8(this, loc); this.l = loc + 1; vv = ReadShift.call(this, size - i$7, w$2 ? "dbcs-cont" : "sbcs-cont"); return oo.join("") + vv; } oo.push(_getchar(__readUInt16LE(this, loc))); loc += 2; } o$10 = oo.join(""); size *= 2; break; case "cpstr": if (typeof $cptable !== "undefined") { o$10 = $cptable.utils.decode(current_codepage, this.slice(this.l, this.l + size)); break; } case "sbcs-cont": o$10 = ""; loc = this.l; for (i$7 = 0; i$7 != size; ++i$7) { if (this.lens && this.lens.indexOf(loc) !== -1) { w$2 = __readUInt8(this, loc); this.l = loc + 1; vv = ReadShift.call(this, size - i$7, w$2 ? "dbcs-cont" : "sbcs-cont"); return oo.join("") + vv; } oo.push(_getchar(__readUInt8(this, loc))); loc += 1; } o$10 = oo.join(""); break; default: switch (size) { case 1: oI = __readUInt8(this, this.l); this.l++; return oI; case 2: oI = (t$6 === "i" ? __readInt16LE : __readUInt16LE)(this, this.l); this.l += 2; return oI; case 4: case -4: if (t$6 === "i" || (this[this.l + 3] & 128) === 0) { oI = (size > 0 ? __readInt32LE : __readInt32BE)(this, this.l); this.l += 4; return oI; } else { oR = __readUInt32LE(this, this.l); this.l += 4; } return oR; case 8: case -8: if (t$6 === "f") { if (size == 8) oR = __double(this, this.l); else oR = __double([ this[this.l + 7], this[this.l + 6], this[this.l + 5], this[this.l + 4], this[this.l + 3], this[this.l + 2], this[this.l + 1], this[this.l + 0] ], 0); this.l += 8; return oR; } else size = 8; case 16: o$10 = __hexlify(this, this.l, size); break; } } this.l += size; return o$10; } function WriteShift(t$6, val$1, f$4) { var size = 0, i$7 = 0; if (f$4 === "dbcs") { for (i$7 = 0; i$7 != val$1.length; ++i$7) __writeUInt16LE(this, val$1.charCodeAt(i$7), this.l + 2 * i$7); size = 2 * val$1.length; } else if (f$4 === "sbcs" || f$4 == "cpstr") { if (typeof $cptable !== "undefined" && current_ansi == 874) { for (i$7 = 0; i$7 != val$1.length; ++i$7) { var cpp$1 = $cptable.utils.encode(current_ansi, val$1.charAt(i$7)); this[this.l + i$7] = cpp$1[0]; } size = val$1.length; } else if (typeof $cptable !== "undefined" && f$4 == "cpstr") { cpp$1 = $cptable.utils.encode(current_codepage, val$1); if (cpp$1.length == val$1.length) { for (i$7 = 0; i$7 < val$1.length; ++i$7) if (cpp$1[i$7] == 0 && val$1.charCodeAt(i$7) != 0) cpp$1[i$7] = 95; } if (cpp$1.length == 2 * val$1.length) { for (i$7 = 0; i$7 < val$1.length; ++i$7) if (cpp$1[2 * i$7] == 0 && cpp$1[2 * i$7 + 1] == 0 && val$1.charCodeAt(i$7) != 0) cpp$1[2 * i$7] = 95; } for (i$7 = 0; i$7 < cpp$1.length; ++i$7) this[this.l + i$7] = cpp$1[i$7]; size = cpp$1.length; } else { val$1 = val$1.replace(/[^\x00-\x7F]/g, "_"); for (i$7 = 0; i$7 != val$1.length; ++i$7) this[this.l + i$7] = val$1.charCodeAt(i$7) & 255; size = val$1.length; } } else if (f$4 === "hex") { for (; i$7 < t$6; ++i$7) { this[this.l++] = parseInt(val$1.slice(2 * i$7, 2 * i$7 + 2), 16) || 0; } return this; } else if (f$4 === "utf16le") { var end = Math.min(this.l + t$6, this.length); for (i$7 = 0; i$7 < Math.min(val$1.length, t$6); ++i$7) { var cc = val$1.charCodeAt(i$7); this[this.l++] = cc & 255; this[this.l++] = cc >> 8; } while (this.l < end) this[this.l++] = 0; return this; } else switch (t$6) { case 1: size = 1; this[this.l] = val$1 & 255; break; case 2: size = 2; this[this.l] = val$1 & 255; val$1 >>>= 8; this[this.l + 1] = val$1 & 255; break; case 3: size = 3; this[this.l] = val$1 & 255; val$1 >>>= 8; this[this.l + 1] = val$1 & 255; val$1 >>>= 8; this[this.l + 2] = val$1 & 255; break; case 4: size = 4; __writeUInt32LE(this, val$1, this.l); break; case 8: size = 8; if (f$4 === "f") { write_double_le(this, val$1, this.l); break; } case 16: break; case -4: size = 4; __writeInt32LE(this, val$1, this.l); break; } this.l += size; return this; } function CheckField(hexstr, fld) { var m$3 = __hexlify(this, this.l, hexstr.length >> 1); if (m$3 !== hexstr) throw new Error(fld + "Expected " + hexstr + " saw " + m$3); this.l += hexstr.length >> 1; } function prep_blob(blob, pos) { blob.l = pos; blob.read_shift = ReadShift; blob.chk = CheckField; blob.write_shift = WriteShift; } function parsenoop(blob, length) { blob.l += length; } function new_buf(sz) { var o$10 = new_raw_buf(sz); prep_blob(o$10, 0); return o$10; } function recordhopper(data, cb, opts) { if (!data) return; var tmpbyte, cntbyte, length; prep_blob(data, data.l || 0); var L$2 = data.length, RT = 0, tgt = 0; while (data.l < L$2) { RT = data.read_shift(1); if (RT & 128) RT = (RT & 127) + ((data.read_shift(1) & 127) << 7); var R$1 = XLSBRecordEnum[RT] || XLSBRecordEnum[65535]; tmpbyte = data.read_shift(1); length = tmpbyte & 127; for (cntbyte = 1; cntbyte < 4 && tmpbyte & 128; ++cntbyte) length += ((tmpbyte = data.read_shift(1)) & 127) << 7 * cntbyte; tgt = data.l + length; var d$5 = R$1.f && R$1.f(data, length, opts); data.l = tgt; if (cb(d$5, R$1, RT)) return; } } function buf_array() { var bufs = [], blksz = has_buf ? 16384 : 2048; var has_buf_copy = has_buf && typeof new_buf(blksz).copy == "function"; var newblk = function ba_newblk(sz) { var o$10 = new_buf(sz); prep_blob(o$10, 0); return o$10; }; var curbuf = newblk(blksz); var endbuf = function ba_endbuf() { if (!curbuf) return; if (curbuf.l) { if (curbuf.length > curbuf.l) { curbuf = curbuf.slice(0, curbuf.l); curbuf.l = curbuf.length; } if (curbuf.length > 0) bufs.push(curbuf); } curbuf = null; }; var next = function ba_next(sz) { if (curbuf && sz < curbuf.length - curbuf.l) return curbuf; endbuf(); return curbuf = newblk(Math.max(sz + 1, blksz)); }; var end = function ba_end() { endbuf(); return bconcat(bufs); }; var end2 = function() { endbuf(); return bufs; }; var push = function ba_push(buf) { endbuf(); curbuf = buf; if (curbuf.l == null) curbuf.l = curbuf.length; next(blksz); }; return { next, push, end, _bufs: bufs, end2 }; } function write_record(ba, type, payload, length) { var t$6 = +type, l$3; if (isNaN(t$6)) return; if (!length) length = XLSBRecordEnum[t$6].p || (payload || []).length || 0; l$3 = 1 + (t$6 >= 128 ? 1 : 0) + 1; if (length >= 128) ++l$3; if (length >= 16384) ++l$3; if (length >= 2097152) ++l$3; var o$10 = ba.next(l$3); if (t$6 <= 127) o$10.write_shift(1, t$6); else { o$10.write_shift(1, (t$6 & 127) + 128); o$10.write_shift(1, t$6 >> 7); } for (var i$7 = 0; i$7 != 4; ++i$7) { if (length >= 128) { o$10.write_shift(1, (length & 127) + 128); length >>= 7; } else { o$10.write_shift(1, length); break; } } if (length > 0 && is_buf(payload)) ba.push(payload); } function shift_cell_xls(cell, tgt, opts) { var out = dup(cell); if (tgt.s) { if (out.cRel) out.c += tgt.s.c; if (out.rRel) out.r += tgt.s.r; } else { if (out.cRel) out.c += tgt.c; if (out.rRel) out.r += tgt.r; } if (!opts || opts.biff < 12) { while (out.c >= 256) out.c -= 256; while (out.r >= 65536) out.r -= 65536; } return out; } function shift_range_xls(cell, range, opts) { var out = dup(cell); out.s = shift_cell_xls(out.s, range.s, opts); out.e = shift_cell_xls(out.e, range.s, opts); return out; } function encode_cell_xls(c$7, biff) { if (c$7.cRel && c$7.c < 0) { c$7 = dup(c$7); while (c$7.c < 0) c$7.c += biff > 8 ? 16384 : 256; } if (c$7.rRel && c$7.r < 0) { c$7 = dup(c$7); while (c$7.r < 0) c$7.r += biff > 8 ? 1048576 : biff > 5 ? 65536 : 16384; } var s$5 = encode_cell(c$7); if (!c$7.cRel && c$7.cRel != null) s$5 = fix_col(s$5); if (!c$7.rRel && c$7.rRel != null) s$5 = fix_row(s$5); return s$5; } function encode_range_xls(r$10, opts) { if (r$10.s.r == 0 && !r$10.s.rRel) { if (r$10.e.r == (opts.biff >= 12 ? 1048575 : opts.biff >= 8 ? 65536 : 16384) && !r$10.e.rRel) { return (r$10.s.cRel ? "" : "$") + encode_col(r$10.s.c) + ":" + (r$10.e.cRel ? "" : "$") + encode_col(r$10.e.c); } } if (r$10.s.c == 0 && !r$10.s.cRel) { if (r$10.e.c == (opts.biff >= 12 ? 16383 : 255) && !r$10.e.cRel) { return (r$10.s.rRel ? "" : "$") + encode_row(r$10.s.r) + ":" + (r$10.e.rRel ? "" : "$") + encode_row(r$10.e.r); } } return encode_cell_xls(r$10.s, opts.biff) + ":" + encode_cell_xls(r$10.e, opts.biff); } function decode_row(rowstr) { return parseInt(unfix_row(rowstr), 10) - 1; } function encode_row(row) { return "" + (row + 1); } function fix_row(cstr) { return cstr.replace(/([A-Z]|^)(\d+)$/, "$1$$$2"); } function unfix_row(cstr) { return cstr.replace(/\$(\d+)$/, "$1"); } function decode_col(colstr) { var c$7 = unfix_col(colstr), d$5 = 0, i$7 = 0; for (; i$7 !== c$7.length; ++i$7) d$5 = 26 * d$5 + c$7.charCodeAt(i$7) - 64; return d$5 - 1; } function encode_col(col) { if (col < 0) throw new Error("invalid column " + col); var s$5 = ""; for (++col; col; col = Math.floor((col - 1) / 26)) s$5 = String.fromCharCode((col - 1) % 26 + 65) + s$5; return s$5; } function fix_col(cstr) { return cstr.replace(/^([A-Z])/, "$$$1"); } function unfix_col(cstr) { return cstr.replace(/^\$([A-Z])/, "$1"); } function split_cell(cstr) { return cstr.replace(/(\$?[A-Z]*)(\$?\d*)/, "$1,$2").split(","); } function decode_cell(cstr) { var R$1 = 0, C$2 = 0; for (var i$7 = 0; i$7 < cstr.length; ++i$7) { var cc = cstr.charCodeAt(i$7); if (cc >= 48 && cc <= 57) R$1 = 10 * R$1 + (cc - 48); else if (cc >= 65 && cc <= 90) C$2 = 26 * C$2 + (cc - 64); } return { c: C$2 - 1, r: R$1 - 1 }; } function encode_cell(cell) { var col = cell.c + 1; var s$5 = ""; for (; col; col = (col - 1) / 26 | 0) s$5 = String.fromCharCode((col - 1) % 26 + 65) + s$5; return s$5 + (cell.r + 1); } function decode_range(range) { var idx = range.indexOf(":"); if (idx == -1) return { s: decode_cell(range), e: decode_cell(range) }; return { s: decode_cell(range.slice(0, idx)), e: decode_cell(range.slice(idx + 1)) }; } function encode_range(cs, ce$1) { if (typeof ce$1 === "undefined" || typeof ce$1 === "number") { return encode_range(cs.s, cs.e); } if (typeof cs !== "string") cs = encode_cell(cs); if (typeof ce$1 !== "string") ce$1 = encode_cell(ce$1); return cs == ce$1 ? cs : cs + ":" + ce$1; } function fix_range(a1) { var s$5 = decode_range(a1); return "$" + encode_col(s$5.s.c) + "$" + encode_row(s$5.s.r) + ":$" + encode_col(s$5.e.c) + "$" + encode_row(s$5.e.r); } function formula_quote_sheet_name(sname, opts) { if (!sname && !(opts && opts.biff <= 5 && opts.biff >= 2)) throw new Error("empty sheet name"); if (/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(sname)) return "'" + sname.replace(/'/g, "''") + "'"; return sname; } function safe_decode_range(range) { var o$10 = { s: { c: 0, r: 0 }, e: { c: 0, r: 0 } }; var idx = 0, i$7 = 0, cc = 0; var len = range.length; for (idx = 0; i$7 < len; ++i$7) { if ((cc = range.charCodeAt(i$7) - 64) < 1 || cc > 26) break; idx = 26 * idx + cc; } o$10.s.c = --idx; for (idx = 0; i$7 < len; ++i$7) { if ((cc = range.charCodeAt(i$7) - 48) < 0 || cc > 9) break; idx = 10 * idx + cc; } o$10.s.r = --idx; if (i$7 === len || cc != 10) { o$10.e.c = o$10.s.c; o$10.e.r = o$10.s.r; return o$10; } ++i$7; for (idx = 0; i$7 != len; ++i$7) { if ((cc = range.charCodeAt(i$7) - 64) < 1 || cc > 26) break; idx = 26 * idx + cc; } o$10.e.c = --idx; for (idx = 0; i$7 != len; ++i$7) { if ((cc = range.charCodeAt(i$7) - 48) < 0 || cc > 9) break; idx = 10 * idx + cc; } o$10.e.r = --idx; return o$10; } function safe_format_cell(cell, v$3) { var q$2 = cell.t == "d" && v$3 instanceof Date; if (cell.z != null) try { return cell.w = SSF_format(cell.z, q$2 ? datenum(v$3) : v$3); } catch (e$10) {} try { return cell.w = SSF_format((cell.XF || {}).numFmtId || (q$2 ? 14 : 0), q$2 ? datenum(v$3) : v$3); } catch (e$10) { return "" + v$3; } } function format_cell(cell, v$3, o$10) { if (cell == null || cell.t == null || cell.t == "z") return ""; if (cell.w !== undefined) return cell.w; if (cell.t == "d" && !cell.z && o$10 && o$10.dateNF) cell.z = o$10.dateNF; if (cell.t == "e") return BErr[cell.v] || cell.v; if (v$3 == undefined) return safe_format_cell(cell, cell.v); return safe_format_cell(cell, v$3); } function sheet_to_workbook(sheet, opts) { var n$9 = opts && opts.sheet ? opts.sheet : "Sheet1"; var sheets = {}; sheets[n$9] = sheet; return { SheetNames: [n$9], Sheets: sheets }; } function sheet_new(opts) { var out = {}; var o$10 = opts || {}; if (o$10.dense) out["!data"] = []; return out; } function sheet_add_aoa(_ws, data, opts) { var o$10 = opts || {}; var dense = _ws ? _ws["!data"] != null : o$10.dense; if (DENSE != null && dense == null) dense = DENSE; var ws = _ws || (dense ? { "!data": [] } : {}); if (dense && !ws["!data"]) ws["!data"] = []; var _R = 0, _C = 0; if (ws && o$10.origin != null) { if (typeof o$10.origin == "number") _R = o$10.origin; else { var _origin = typeof o$10.origin == "string" ? decode_cell(o$10.origin) : o$10.origin; _R = _origin.r; _C = _origin.c; } } var range = { s: { c: 1e7, r: 1e7 }, e: { c: 0, r: 0 } }; if (ws["!ref"]) { var _range = safe_decode_range(ws["!ref"]); range.s.c = _range.s.c; range.s.r = _range.s.r; range.e.c = Math.max(range.e.c, _range.e.c); range.e.r = Math.max(range.e.r, _range.e.r); if (_R == -1) range.e.r = _R = ws["!ref"] ? _range.e.r + 1 : 0; } else { range.s.c = range.e.c = range.s.r = range.e.r = 0; } var row = [], seen = false; for (var R$1 = 0; R$1 != data.length; ++R$1) { if (!data[R$1]) continue; if (!Array.isArray(data[R$1])) throw new Error("aoa_to_sheet expects an array of arrays"); var __R = _R + R$1; if (dense) { if (!ws["!data"][__R]) ws["!data"][__R] = []; row = ws["!data"][__R]; } var data_R = data[R$1]; for (var C$2 = 0; C$2 != data_R.length; ++C$2) { if (typeof data_R[C$2] === "undefined") continue; var cell = { v: data_R[C$2], t: "" }; var __C = _C + C$2; if (range.s.r > __R) range.s.r = __R; if (range.s.c > __C) range.s.c = __C; if (range.e.r < __R) range.e.r = __R; if (range.e.c < __C) range.e.c = __C; seen = true; if (data_R[C$2] && typeof data_R[C$2] === "object" && !Array.isArray(data_R[C$2]) && !(data_R[C$2] instanceof Date)) cell = data_R[C$2]; else { if (Array.isArray(cell.v)) { cell.f = data_R[C$2][1]; cell.v = cell.v[0]; } if (cell.v === null) { if (cell.f) cell.t = "n"; else if (o$10.nullError) { cell.t = "e"; cell.v = 0; } else if (!o$10.sheetStubs) continue; else cell.t = "z"; } else if (typeof cell.v === "number") { if (isFinite(cell.v)) cell.t = "n"; else if (isNaN(cell.v)) { cell.t = "e"; cell.v = 15; } else { cell.t = "e"; cell.v = 7; } } else if (typeof cell.v === "boolean") cell.t = "b"; else if (cell.v instanceof Date) { cell.z = o$10.dateNF || table_fmt[14]; if (!o$10.UTC) cell.v = local_to_utc(cell.v); if (o$10.cellDates) { cell.t = "d"; cell.w = SSF_format(cell.z, datenum(cell.v, o$10.date1904)); } else { cell.t = "n"; cell.v = datenum(cell.v, o$10.date1904); cell.w = SSF_format(cell.z, cell.v); } } else cell.t = "s"; } if (dense) { if (row[__C] && row[__C].z) cell.z = row[__C].z; row[__C] = cell; } else { var cell_ref = encode_col(__C) + (__R + 1); if (ws[cell_ref] && ws[cell_ref].z) cell.z = ws[cell_ref].z; ws[cell_ref] = cell; } } } if (seen && range.s.c < 104e5) ws["!ref"] = encode_range(range); return ws; } function aoa_to_sheet(data, opts) { return sheet_add_aoa(null, data, opts); } function parse_Int32LE(data) { return data.read_shift(4, "i"); } function write_UInt32LE(x$2, o$10) { if (!o$10) o$10 = new_buf(4); o$10.write_shift(4, x$2); return o$10; } function parse_XLWideString(data) { var cchCharacters = data.read_shift(4); return cchCharacters === 0 ? "" : data.read_shift(cchCharacters, "dbcs"); } function write_XLWideString(data, o$10) { var _null = false; if (o$10 == null) { _null = true; o$10 = new_buf(4 + 2 * data.length); } o$10.write_shift(4, data.length); if (data.length > 0) o$10.write_shift(0, data, "dbcs"); return _null ? o$10.slice(0, o$10.l) : o$10; } function parse_StrRun(data) { return { ich: data.read_shift(2), ifnt: data.read_shift(2) }; } function write_StrRun(run, o$10) { if (!o$10) o$10 = new_buf(4); o$10.write_shift(2, run.ich || 0); o$10.write_shift(2, run.ifnt || 0); return o$10; } function parse_RichStr(data, length) { var start = data.l; var flags = data.read_shift(1); var str = parse_XLWideString(data); var rgsStrRun = []; var z$2 = { t: str, h: str }; if ((flags & 1) !== 0) { var dwSizeStrRun = data.read_shift(4); for (var i$7 = 0; i$7 != dwSizeStrRun; ++i$7) rgsStrRun.push(parse_StrRun(data)); z$2.r = rgsStrRun; } else z$2.r = [{ ich: 0, ifnt: 0 }]; data.l = start + length; return z$2; } function write_RichStr(str, o$10) { var _null = false; if (o$10 == null) { _null = true; o$10 = new_buf(15 + 4 * str.t.length); } o$10.write_shift(1, 0); write_XLWideString(str.t, o$10); return _null ? o$10.slice(0, o$10.l) : o$10; } function write_BrtCommentText(str, o$10) { var _null = false; if (o$10 == null) { _null = true; o$10 = new_buf(23 + 4 * str.t.length); } o$10.write_shift(1, 1); write_XLWideString(str.t, o$10); o$10.write_shift(4, 1); write_StrRun({ ich: 0, ifnt: 0 }, o$10); return _null ? o$10.slice(0, o$10.l) : o$10; } function parse_XLSBCell(data) { var col = data.read_shift(4); var iStyleRef = data.read_shift(2); iStyleRef += data.read_shift(1) << 16; data.l++; return { c: col, iStyleRef }; } function write_XLSBCell(cell, o$10) { if (o$10 == null) o$10 = new_buf(8); o$10.write_shift(-4, cell.c); o$10.write_shift(3, cell.iStyleRef || cell.s); o$10.write_shift(1, 0); return o$10; } function parse_XLSBShortCell(data) { var iStyleRef = data.read_shift(2); iStyleRef += data.read_shift(1) << 16; data.l++; return { c: -1, iStyleRef }; } function write_XLSBShortCell(cell, o$10) { if (o$10 == null) o$10 = new_buf(4); o$10.write_shift(3, cell.iStyleRef || cell.s); o$10.write_shift(1, 0); return o$10; } function parse_XLNullableWideString(data) { var cchCharacters = data.read_shift(4); return cchCharacters === 0 || cchCharacters === 4294967295 ? "" : data.read_shift(cchCharacters, "dbcs"); } function write_XLNullableWideString(data, o$10) { var _null = false; if (o$10 == null) { _null = true; o$10 = new_buf(127); } o$10.write_shift(4, data.length > 0 ? data.length : 4294967295); if (data.length > 0) o$10.write_shift(0, data, "dbcs"); return _null ? o$10.slice(0, o$10.l) : o$10; } function parse_RkNumber(data) { var b$3 = data.slice(data.l, data.l + 4); var fX100 = b$3[0] & 1, fInt = b$3[0] & 2; data.l += 4; var RK = fInt === 0 ? __double([ 0, 0, 0, 0, b$3[0] & 252, b$3[1], b$3[2], b$3[3] ], 0) : __readInt32LE(b$3, 0) >> 2; return fX100 ? RK / 100 : RK; } function write_RkNumber(data, o$10) { if (o$10 == null) o$10 = new_buf(4); var fX100 = 0, fInt = 0, d100 = data * 100; if (data == (data | 0) && data >= -(1 << 29) && data < 1 << 29) { fInt = 1; } else if (d100 == (d100 | 0) && d100 >= -(1 << 29) && d100 < 1 << 29) { fInt = 1; fX100 = 1; } if (fInt) o$10.write_shift(-4, ((fX100 ? d100 : data) << 2) + (fX100 + 2)); else throw new Error("unsupported RkNumber " + data); } function parse_RfX(data) { var cell = { s: {}, e: {} }; cell.s.r = data.read_shift(4); cell.e.r = data.read_shift(4); cell.s.c = data.read_shift(4); cell.e.c = data.read_shift(4); return cell; } function write_RfX(r$10, o$10) { if (!o$10) o$10 = new_buf(16); o$10.write_shift(4, r$10.s.r); o$10.write_shift(4, r$10.e.r); o$10.write_shift(4, r$10.s.c); o$10.write_shift(4, r$10.e.c); return o$10; } function parse_Xnum(data) { if (data.length - data.l < 8) throw "XLS Xnum Buffer underflow"; return data.read_shift(8, "f"); } function write_Xnum(data, o$10) { return (o$10 || new_buf(8)).write_shift(8, data, "f"); } function parse_BrtColor(data) { var out = {}; var d$5 = data.read_shift(1); var xColorType = d$5 >>> 1; var index = data.read_shift(1); var nTS = data.read_shift(2, "i"); var bR = data.read_shift(1); var bG = data.read_shift(1); var bB = data.read_shift(1); data.l++; switch (xColorType) { case 0: out.auto = 1; break; case 1: out.index = index; var icv = XLSIcv[index]; if (icv) out.rgb = rgb2Hex(icv); break; case 2: out.rgb = rgb2Hex([ bR, bG, bB ]); break; case 3: out.theme = index; break; } if (nTS != 0) out.tint = nTS > 0 ? nTS / 32767 : nTS / 32768; return out; } function write_BrtColor(color, o$10) { if (!o$10) o$10 = new_buf(8); if (!color || color.auto) { o$10.write_shift(4, 0); o$10.write_shift(4, 0); return o$10; } if (color.index != null) { o$10.write_shift(1, 2); o$10.write_shift(1, color.index); } else if (color.theme != null) { o$10.write_shift(1, 6); o$10.write_shift(1, color.theme); } else { o$10.write_shift(1, 5); o$10.write_shift(1, 0); } var nTS = color.tint || 0; if (nTS > 0) nTS *= 32767; else if (nTS < 0) nTS *= 32768; o$10.write_shift(2, nTS); if (!color.rgb || color.theme != null) { o$10.write_shift(2, 0); o$10.write_shift(1, 0); o$10.write_shift(1, 0); } else { var rgb = color.rgb || "FFFFFF"; if (typeof rgb == "number") rgb = ("000000" + rgb.toString(16)).slice(-6); o$10.write_shift(1, parseInt(rgb.slice(0, 2), 16)); o$10.write_shift(1, parseInt(rgb.slice(2, 4), 16)); o$10.write_shift(1, parseInt(rgb.slice(4, 6), 16)); o$10.write_shift(1, 255); } return o$10; } function parse_FontFlags(data) { var d$5 = data.read_shift(1); data.l++; var out = { fBold: d$5 & 1, fItalic: d$5 & 2, fUnderline: d$5 & 4, fStrikeout: d$5 & 8, fOutline: d$5 & 16, fShadow: d$5 & 32, fCondense: d$5 & 64, fExtend: d$5 & 128 }; return out; } function write_FontFlags(font, o$10) { if (!o$10) o$10 = new_buf(2); var grbit = (font.italic ? 2 : 0) | (font.strike ? 8 : 0) | (font.outline ? 16 : 0) | (font.shadow ? 32 : 0) | (font.condense ? 64 : 0) | (font.extend ? 128 : 0); o$10.write_shift(1, grbit); o$10.write_shift(1, 0); return o$10; } function parse_ClipboardFormatOrString(o$10, w$2) { var ClipFmt = { 2: "BITMAP", 3: "METAFILEPICT", 8: "DIB", 14: "ENHMETAFILE" }; var m$3 = o$10.read_shift(4); switch (m$3) { case 0: return ""; case 4294967295: case 4294967294: return ClipFmt[o$10.read_shift(4)] || ""; } if (m$3 > 400) throw new Error("Unsupported Clipboard: " + m$3.toString(16)); o$10.l -= 4; return o$10.read_shift(0, w$2 == 1 ? "lpstr" : "lpwstr"); } function parse_ClipboardFormatOrAnsiString(o$10) { return parse_ClipboardFormatOrString(o$10, 1); } function parse_ClipboardFormatOrUnicodeString(o$10) { return parse_ClipboardFormatOrString(o$10, 2); } function rgbify(arr) { return arr.map(function(x$2) { return [ x$2 >> 16 & 255, x$2 >> 8 & 255, x$2 & 255 ]; }); } function new_ct() { return { workbooks: [], sheets: [], charts: [], dialogs: [], macros: [], rels: [], strs: [], comments: [], threadedcomments: [], links: [], coreprops: [], extprops: [], custprops: [], themes: [], styles: [], calcchains: [], vba: [], drawings: [], metadata: [], people: [], TODO: [], xmlns: "" }; } function parse_ct(data) { var ct = new_ct(); if (!data || !data.match) return ct; var ctext = {}; (data.match(tagregex) || []).forEach(function(x$2) { var y$3 = parsexmltag(x$2); switch (y$3[0].replace(nsregex, "<")) { case " 0 ? ct.calcchains[0] : ""; ct.sst = ct.strs.length > 0 ? ct.strs[0] : ""; ct.style = ct.styles.length > 0 ? ct.styles[0] : ""; ct.defaults = ctext; delete ct.calcchains; return ct; } function write_ct(ct, opts, raw) { var type2ct = evert_arr(ct2type); var o$10 = [], v$3; if (!raw) { o$10[o$10.length] = XML_HEADER; o$10[o$10.length] = writextag("Types", null, { "xmlns": XMLNS.CT, "xmlns:xsd": XMLNS.xsd, "xmlns:xsi": XMLNS.xsi }); o$10 = o$10.concat([ ["xml", "application/xml"], ["bin", "application/vnd.ms-excel.sheet.binary.macroEnabled.main"], ["vml", "application/vnd.openxmlformats-officedocument.vmlDrawing"], ["data", "application/vnd.openxmlformats-officedocument.model+data"], ["bmp", "image/bmp"], ["png", "image/png"], ["gif", "image/gif"], ["emf", "image/x-emf"], ["wmf", "image/x-wmf"], ["jpg", "image/jpeg"], ["jpeg", "image/jpeg"], ["tif", "image/tiff"], ["tiff", "image/tiff"], ["pdf", "application/pdf"], ["rels", "application/vnd.openxmlformats-package.relationships+xml"] ].map(function(x$2) { return writextag("Default", null, { "Extension": x$2[0], "ContentType": x$2[1] }); })); } var f1 = function(w$2) { if (ct[w$2] && ct[w$2].length > 0) { v$3 = ct[w$2][0]; o$10[o$10.length] = writextag("Override", null, { "PartName": (v$3[0] == "/" ? "" : "/") + v$3, "ContentType": CT_LIST[w$2][opts.bookType] || CT_LIST[w$2]["xlsx"] }); } }; var f2 = function(w$2) { (ct[w$2] || []).forEach(function(v$4) { o$10[o$10.length] = writextag("Override", null, { "PartName": (v$4[0] == "/" ? "" : "/") + v$4, "ContentType": CT_LIST[w$2][opts.bookType] || CT_LIST[w$2]["xlsx"] }); }); }; var f3 = function(t$6) { (ct[t$6] || []).forEach(function(v$4) { o$10[o$10.length] = writextag("Override", null, { "PartName": (v$4[0] == "/" ? "" : "/") + v$4, "ContentType": type2ct[t$6][0] }); }); }; f1("workbooks"); f2("sheets"); f2("charts"); f3("themes"); ["strs", "styles"].forEach(f1); [ "coreprops", "extprops", "custprops" ].forEach(f3); f3("vba"); f3("comments"); f3("threadedcomments"); f3("drawings"); f2("metadata"); f3("people"); if (!raw && o$10.length > 2) { o$10[o$10.length] = ""; o$10[1] = o$10[1].replace("/>", ">"); } return o$10.join(""); } function get_rels_path(file) { var n$9 = file.lastIndexOf("/"); return file.slice(0, n$9 + 1) + "_rels/" + file.slice(n$9 + 1) + ".rels"; } function parse_rels(data, currentFilePath) { var rels = { "!id": {} }; if (!data) return rels; if (currentFilePath.charAt(0) !== "/") { currentFilePath = "/" + currentFilePath; } var hash = {}; (data.match(tagregex) || []).forEach(function(x$2) { var y$3 = parsexmltag(x$2); if (y$3[0] === " 2) { o$10[o$10.length] = ""; o$10[1] = o$10[1].replace("/>", ">"); } return o$10.join(""); } function add_rels(rels, rId, f$4, type, relobj, targetmode) { if (!relobj) relobj = {}; if (!rels["!id"]) rels["!id"] = {}; if (!rels["!idx"]) rels["!idx"] = 1; if (rId < 0) for (rId = rels["!idx"]; rels["!id"]["rId" + rId]; ++rId) {} rels["!idx"] = rId + 1; relobj.Id = "rId" + rId; relobj.Type = type; relobj.Target = f$4; if (targetmode) relobj.TargetMode = targetmode; else if ([ RELS.HLINK, RELS.XPATH, RELS.XMISS ].indexOf(relobj.Type) > -1) relobj.TargetMode = "External"; if (rels["!id"][relobj.Id]) throw new Error("Cannot rewrite rId " + rId); rels["!id"][relobj.Id] = relobj; rels[("/" + relobj.Target).replace("//", "/")] = relobj; return rId; } function parse_manifest(d$5, opts) { var str = xlml_normalize(d$5); var Rn; var FEtag; while (Rn = xlmlregex.exec(str)) switch (Rn[3]) { case "manifest": break; case "file-entry": FEtag = parsexmltag(Rn[0], false); if (FEtag.path == "/" && FEtag.type !== CT_ODS) throw new Error("This OpenDocument is not a spreadsheet"); break; case "encryption-data": case "algorithm": case "start-key-generation": case "key-derivation": throw new Error("Unsupported ODS Encryption"); default: if (opts && opts.WTF) throw Rn; } } function write_manifest(manifest) { var o$10 = [XML_HEADER]; o$10.push("\n"); o$10.push(" \n"); for (var i$7 = 0; i$7 < manifest.length; ++i$7) o$10.push(" \n"); o$10.push(""); return o$10.join(""); } function write_rdf_type(file, res, tag) { return [ " \n", " \n", " \n" ].join(""); } function write_rdf_has(base, file) { return [ " \n", " \n", " \n" ].join(""); } function write_rdf(rdf) { var o$10 = [XML_HEADER]; o$10.push("\n"); for (var i$7 = 0; i$7 != rdf.length; ++i$7) { o$10.push(write_rdf_type(rdf[i$7][0], rdf[i$7][1])); o$10.push(write_rdf_has("", rdf[i$7][0])); } o$10.push(write_rdf_type("", "Document", "pkg")); o$10.push(""); return o$10.join(""); } function write_meta_ods(wb, opts) { return "SheetJS " + XLSX.version + ""; } function parse_core_props(data) { var p$3 = {}; data = utf8read(data); for (var i$7 = 0; i$7 < CORE_PROPS.length; ++i$7) { var f$4 = CORE_PROPS[i$7], cur = str_match_xml(data, f$4[0]); if (cur != null && cur.length > 0) p$3[f$4[1]] = unescapexml(cur[1]); if (f$4[2] === "date" && p$3[f$4[1]]) p$3[f$4[1]] = parseDate(p$3[f$4[1]]); } return p$3; } function cp_doit(f$4, g$1, h$5, o$10, p$3) { if (p$3[f$4] != null || g$1 == null || g$1 === "") return; p$3[f$4] = g$1; g$1 = escapexml(g$1); o$10[o$10.length] = h$5 ? writextag(f$4, g$1, h$5) : writetag(f$4, g$1); } function write_core_props(cp, _opts) { var opts = _opts || {}; var o$10 = [XML_HEADER, writextag("cp:coreProperties", null, { "xmlns:cp": XMLNS.CORE_PROPS, "xmlns:dc": XMLNS.dc, "xmlns:dcterms": XMLNS.dcterms, "xmlns:dcmitype": XMLNS.dcmitype, "xmlns:xsi": XMLNS.xsi })], p$3 = {}; if (!cp && !opts.Props) return o$10.join(""); if (cp) { if (cp.CreatedDate != null) cp_doit("dcterms:created", typeof cp.CreatedDate === "string" ? cp.CreatedDate : write_w3cdtf(cp.CreatedDate, opts.WTF), { "xsi:type": "dcterms:W3CDTF" }, o$10, p$3); if (cp.ModifiedDate != null) cp_doit("dcterms:modified", typeof cp.ModifiedDate === "string" ? cp.ModifiedDate : write_w3cdtf(cp.ModifiedDate, opts.WTF), { "xsi:type": "dcterms:W3CDTF" }, o$10, p$3); } for (var i$7 = 0; i$7 != CORE_PROPS.length; ++i$7) { var f$4 = CORE_PROPS[i$7]; var v$3 = opts.Props && opts.Props[f$4[1]] != null ? opts.Props[f$4[1]] : cp ? cp[f$4[1]] : null; if (v$3 === true) v$3 = "1"; else if (v$3 === false) v$3 = "0"; else if (typeof v$3 == "number") v$3 = String(v$3); if (v$3 != null) cp_doit(f$4[0], v$3, null, o$10, p$3); } if (o$10.length > 2) { o$10[o$10.length] = ""; o$10[1] = o$10[1].replace("/>", ">"); } return o$10.join(""); } function load_props_pairs(HP, TOP, props, opts) { var v$3 = []; if (typeof HP == "string") v$3 = parseVector(HP, opts); else for (var j$2 = 0; j$2 < HP.length; ++j$2) v$3 = v$3.concat(HP[j$2].map(function(hp) { return { v: hp }; })); var parts = typeof TOP == "string" ? parseVector(TOP, opts).map(function(x$2) { return x$2.v; }) : TOP; var idx = 0, len = 0; if (parts.length > 0) for (var i$7 = 0; i$7 !== v$3.length; i$7 += 2) { len = +v$3[i$7 + 1].v; switch (v$3[i$7].v) { case "Worksheets": case "工作表": case "Листы": case "أوراق العمل": case "ワークシート": case "גליונות עבודה": case "Arbeitsblätter": case "Çalışma Sayfaları": case "Feuilles de calcul": case "Fogli di lavoro": case "Folhas de cálculo": case "Planilhas": case "Regneark": case "Hojas de cálculo": case "Werkbladen": props.Worksheets = len; props.SheetNames = parts.slice(idx, idx + len); break; case "Named Ranges": case "Rangos con nombre": case "名前付き一覧": case "Benannte Bereiche": case "Navngivne områder": props.NamedRanges = len; props.DefinedNames = parts.slice(idx, idx + len); break; case "Charts": case "Diagramme": props.Chartsheets = len; props.ChartNames = parts.slice(idx, idx + len); break; } idx += len; } } function parse_ext_props(data, p$3, opts) { var q$2 = {}; if (!p$3) p$3 = {}; data = utf8read(data); EXT_PROPS.forEach(function(f$4) { var xml$2 = (str_match_xml_ns(data, f$4[0]) || [])[1]; switch (f$4[2]) { case "string": if (xml$2) p$3[f$4[1]] = unescapexml(xml$2); break; case "bool": p$3[f$4[1]] = xml$2 === "true"; break; case "raw": var cur = str_match_xml(data, f$4[0]); if (cur && cur.length > 0) q$2[f$4[1]] = cur[1]; break; } }); if (q$2.HeadingPairs && q$2.TitlesOfParts) load_props_pairs(q$2.HeadingPairs, q$2.TitlesOfParts, p$3, opts); return p$3; } function write_ext_props(cp) { var o$10 = [], W$1 = writextag; if (!cp) cp = {}; cp.Application = "SheetJS"; o$10[o$10.length] = XML_HEADER; o$10[o$10.length] = writextag("Properties", null, { "xmlns": XMLNS.EXT_PROPS, "xmlns:vt": XMLNS.vt }); EXT_PROPS.forEach(function(f$4) { if (cp[f$4[1]] === undefined) return; var v$3; switch (f$4[2]) { case "string": v$3 = escapexml(String(cp[f$4[1]])); break; case "bool": v$3 = cp[f$4[1]] ? "true" : "false"; break; } if (v$3 !== undefined) o$10[o$10.length] = W$1(f$4[0], v$3); }); o$10[o$10.length] = W$1("HeadingPairs", W$1("vt:vector", W$1("vt:variant", "Worksheets") + W$1("vt:variant", W$1("vt:i4", String(cp.Worksheets))), { size: 2, baseType: "variant" })); o$10[o$10.length] = W$1("TitlesOfParts", W$1("vt:vector", cp.SheetNames.map(function(s$5) { return "" + escapexml(s$5) + ""; }).join(""), { size: cp.Worksheets, baseType: "lpstr" })); if (o$10.length > 2) { o$10[o$10.length] = ""; o$10[1] = o$10[1].replace("/>", ">"); } return o$10.join(""); } function parse_cust_props(data, opts) { var p$3 = {}, name = ""; var m$3 = data.match(custregex); if (m$3) for (var i$7 = 0; i$7 != m$3.length; ++i$7) { var x$2 = m$3[i$7], y$3 = parsexmltag(x$2); switch (strip_ns(y$3[0])) { case "": name = null; break; default: if (x$2.indexOf(""); var type = toks[0].slice(4), text$2 = toks[1]; switch (type) { case "lpstr": case "bstr": case "lpwstr": p$3[name] = unescapexml(text$2); break; case "bool": p$3[name] = parsexmlbool(text$2); break; case "i1": case "i2": case "i4": case "i8": case "int": case "uint": p$3[name] = parseInt(text$2, 10); break; case "r4": case "r8": case "decimal": p$3[name] = parseFloat(text$2); break; case "filetime": case "date": p$3[name] = parseDate(text$2); break; case "cy": case "error": p$3[name] = unescapexml(text$2); break; default: if (type.slice(-1) == "/") break; if (opts.WTF && typeof console !== "undefined") console.warn("Unexpected", x$2, type, toks); } } else if (x$2.slice(0, 2) === " 2) { o$10[o$10.length] = ""; o$10[1] = o$10[1].replace("/>", ">"); } return o$10.join(""); } function xlml_set_prop(Props, tag, val$1) { if (!evert_XLMLDPM) evert_XLMLDPM = evert(XLMLDocPropsMap); tag = evert_XLMLDPM[tag] || tag; Props[tag] = val$1; } function xlml_write_docprops(Props, opts) { var o$10 = []; keys(XLMLDocPropsMap).map(function(m$3) { for (var i$7 = 0; i$7 < CORE_PROPS.length; ++i$7) if (CORE_PROPS[i$7][1] == m$3) return CORE_PROPS[i$7]; for (i$7 = 0; i$7 < EXT_PROPS.length; ++i$7) if (EXT_PROPS[i$7][1] == m$3) return EXT_PROPS[i$7]; throw m$3; }).forEach(function(p$3) { if (Props[p$3[1]] == null) return; var m$3 = opts && opts.Props && opts.Props[p$3[1]] != null ? opts.Props[p$3[1]] : Props[p$3[1]]; switch (p$3[2]) { case "date": m$3 = new Date(m$3).toISOString().replace(/\.\d*Z/, "Z"); break; } if (typeof m$3 == "number") m$3 = String(m$3); else if (m$3 === true || m$3 === false) { m$3 = m$3 ? "1" : "0"; } else if (m$3 instanceof Date) m$3 = new Date(m$3).toISOString().replace(/\.\d*Z/, ""); o$10.push(writetag(XLMLDocPropsMap[p$3[1]] || p$3[1], m$3)); }); return writextag("DocumentProperties", o$10.join(""), { xmlns: XLMLNS.o }); } function xlml_write_custprops(Props, Custprops) { var BLACKLIST = ["Worksheets", "SheetNames"]; var T$3 = "CustomDocumentProperties"; var o$10 = []; if (Props) keys(Props).forEach(function(k$2) { if (!Object.prototype.hasOwnProperty.call(Props, k$2)) return; for (var i$7 = 0; i$7 < CORE_PROPS.length; ++i$7) if (k$2 == CORE_PROPS[i$7][1]) return; for (i$7 = 0; i$7 < EXT_PROPS.length; ++i$7) if (k$2 == EXT_PROPS[i$7][1]) return; for (i$7 = 0; i$7 < BLACKLIST.length; ++i$7) if (k$2 == BLACKLIST[i$7]) return; var m$3 = Props[k$2]; var t$6 = "string"; if (typeof m$3 == "number") { t$6 = "float"; m$3 = String(m$3); } else if (m$3 === true || m$3 === false) { t$6 = "boolean"; m$3 = m$3 ? "1" : "0"; } else m$3 = String(m$3); o$10.push(writextag(escapexmltag(k$2), m$3, { "dt:dt": t$6 })); }); if (Custprops) keys(Custprops).forEach(function(k$2) { if (!Object.prototype.hasOwnProperty.call(Custprops, k$2)) return; if (Props && Object.prototype.hasOwnProperty.call(Props, k$2)) return; var m$3 = Custprops[k$2]; var t$6 = "string"; if (typeof m$3 == "number") { t$6 = "float"; m$3 = String(m$3); } else if (m$3 === true || m$3 === false) { t$6 = "boolean"; m$3 = m$3 ? "1" : "0"; } else if (m$3 instanceof Date) { t$6 = "dateTime.tz"; m$3 = m$3.toISOString(); } else m$3 = String(m$3); o$10.push(writextag(escapexmltag(k$2), m$3, { "dt:dt": t$6 })); }); return "<" + T$3 + " xmlns=\"" + XLMLNS.o + "\">" + o$10.join("") + ""; } function parse_FILETIME(blob) { var dwLowDateTime = blob.read_shift(4), dwHighDateTime = blob.read_shift(4); return new Date((dwHighDateTime / 1e7 * Math.pow(2, 32) + dwLowDateTime / 1e7 - 11644473600) * 1e3).toISOString().replace(/\.000/, ""); } function write_FILETIME(time) { var date = typeof time == "string" ? new Date(Date.parse(time)) : time; var t$6 = date.getTime() / 1e3 + 11644473600; var l$3 = t$6 % Math.pow(2, 32), h$5 = (t$6 - l$3) / Math.pow(2, 32); l$3 *= 1e7; h$5 *= 1e7; var w$2 = l$3 / Math.pow(2, 32) | 0; if (w$2 > 0) { l$3 = l$3 % Math.pow(2, 32); h$5 += w$2; } var o$10 = new_buf(8); o$10.write_shift(4, l$3); o$10.write_shift(4, h$5); return o$10; } function parse_lpstr(blob, type, pad$1) { var start = blob.l; var str = blob.read_shift(0, "lpstr-cp"); if (pad$1) while (blob.l - start & 3) ++blob.l; return str; } function parse_lpwstr(blob, type, pad$1) { var str = blob.read_shift(0, "lpwstr"); if (pad$1) blob.l += 4 - (str.length + 1 & 3) & 3; return str; } function parse_VtStringBase(blob, stringType, pad$1) { if (stringType === 31) return parse_lpwstr(blob); return parse_lpstr(blob, stringType, pad$1); } function parse_VtString(blob, t$6, pad$1) { return parse_VtStringBase(blob, t$6, pad$1 === false ? 0 : 4); } function parse_VtUnalignedString(blob, t$6) { if (!t$6) throw new Error("VtUnalignedString must have positive length"); return parse_VtStringBase(blob, t$6, 0); } function parse_VtVecLpwstrValue(blob) { var length = blob.read_shift(4); var ret = []; for (var i$7 = 0; i$7 != length; ++i$7) { var start = blob.l; ret[i$7] = blob.read_shift(0, "lpwstr").replace(chr0, ""); if (blob.l - start & 2) blob.l += 2; } return ret; } function parse_VtVecUnalignedLpstrValue(blob) { var length = blob.read_shift(4); var ret = []; for (var i$7 = 0; i$7 != length; ++i$7) ret[i$7] = blob.read_shift(0, "lpstr-cp").replace(chr0, ""); return ret; } function parse_VtHeadingPair(blob) { var start = blob.l; var headingString = parse_TypedPropertyValue(blob, VT_USTR); if (blob[blob.l] == 0 && blob[blob.l + 1] == 0 && blob.l - start & 2) blob.l += 2; var headerParts = parse_TypedPropertyValue(blob, VT_I4); return [headingString, headerParts]; } function parse_VtVecHeadingPairValue(blob) { var cElements = blob.read_shift(4); var out = []; for (var i$7 = 0; i$7 < cElements / 2; ++i$7) out.push(parse_VtHeadingPair(blob)); return out; } function parse_dictionary(blob, CodePage) { var cnt = blob.read_shift(4); var dict = {}; for (var j$2 = 0; j$2 != cnt; ++j$2) { var pid = blob.read_shift(4); var len = blob.read_shift(4); dict[pid] = blob.read_shift(len, CodePage === 1200 ? "utf16le" : "utf8").replace(chr0, "").replace(chr1, "!"); if (CodePage === 1200 && len % 2) blob.l += 2; } if (blob.l & 3) blob.l = blob.l >> 2 + 1 << 2; return dict; } function parse_BLOB(blob) { var size = blob.read_shift(4); var bytes = blob.slice(blob.l, blob.l + size); blob.l += size; if ((size & 3) > 0) blob.l += 4 - (size & 3) & 3; return bytes; } function parse_ClipboardData(blob) { var o$10 = {}; o$10.Size = blob.read_shift(4); blob.l += o$10.Size + 3 - (o$10.Size - 1) % 4; return o$10; } function parse_TypedPropertyValue(blob, type, _opts) { var t$6 = blob.read_shift(2), ret, opts = _opts || {}; blob.l += 2; if (type !== VT_VARIANT) { if (t$6 !== type && VT_CUSTOM.indexOf(type) === -1 && !((type & 65534) == 4126 && (t$6 & 65534) == 4126)) throw new Error("Expected type " + type + " saw " + t$6); } switch (type === VT_VARIANT ? t$6 : type) { case 2: ret = blob.read_shift(2, "i"); if (!opts.raw) blob.l += 2; return ret; case 3: ret = blob.read_shift(4, "i"); return ret; case 11: return blob.read_shift(4) !== 0; case 19: ret = blob.read_shift(4); return ret; case 30: blob.l += 4; val = parse_VtString(blob, blob[blob.l - 4]).replace(/(^|[^\u0000])\u0000+$/, "$1"); break; case 31: blob.l += 4; val = parse_VtString(blob, blob[blob.l - 4]).replace(/(^|[^\u0000])\u0000+$/, "$1"); break; case 64: return parse_FILETIME(blob); case 65: return parse_BLOB(blob); case 71: return parse_ClipboardData(blob); case 80: return parse_VtString(blob, t$6, !opts.raw).replace(chr0, ""); case 81: return parse_VtUnalignedString(blob, t$6).replace(chr0, ""); case 4108: return parse_VtVecHeadingPairValue(blob); case 4126: case 4127: return t$6 == 4127 ? parse_VtVecLpwstrValue(blob) : parse_VtVecUnalignedLpstrValue(blob); default: throw new Error("TypedPropertyValue unrecognized type " + type + " " + t$6); } } function write_TypedPropertyValue(type, value) { var o$10 = new_buf(4), p$3 = new_buf(4); o$10.write_shift(4, type == 80 ? 31 : type); switch (type) { case 3: p$3.write_shift(-4, value); break; case 5: p$3 = new_buf(8); p$3.write_shift(8, value, "f"); break; case 11: p$3.write_shift(4, value ? 1 : 0); break; case 64: p$3 = write_FILETIME(value); break; case 31: case 80: p$3 = new_buf(4 + 2 * (value.length + 1) + (value.length % 2 ? 0 : 2)); p$3.write_shift(4, value.length + 1); p$3.write_shift(0, value, "dbcs"); while (p$3.l != p$3.length) p$3.write_shift(1, 0); break; default: throw new Error("TypedPropertyValue unrecognized type " + type + " " + value); } return bconcat([o$10, p$3]); } function parse_PropertySet(blob, PIDSI) { var start_addr = blob.l; var size = blob.read_shift(4); var NumProps = blob.read_shift(4); var Props = [], i$7 = 0; var CodePage = 0; var Dictionary = -1, DictObj = {}; for (i$7 = 0; i$7 != NumProps; ++i$7) { var PropID = blob.read_shift(4); var Offset = blob.read_shift(4); Props[i$7] = [PropID, Offset + start_addr]; } Props.sort(function(x$2, y$3) { return x$2[1] - y$3[1]; }); var PropH = {}; for (i$7 = 0; i$7 != NumProps; ++i$7) { if (blob.l !== Props[i$7][1]) { var fail = true; if (i$7 > 0 && PIDSI) switch (PIDSI[Props[i$7 - 1][0]].t) { case 2: if (blob.l + 2 === Props[i$7][1]) { blob.l += 2; fail = false; } break; case 80: if (blob.l <= Props[i$7][1]) { blob.l = Props[i$7][1]; fail = false; } break; case 4108: if (blob.l <= Props[i$7][1]) { blob.l = Props[i$7][1]; fail = false; } break; } if ((!PIDSI || i$7 == 0) && blob.l <= Props[i$7][1]) { fail = false; blob.l = Props[i$7][1]; } if (fail) throw new Error("Read Error: Expected address " + Props[i$7][1] + " at " + blob.l + " :" + i$7); } if (PIDSI) { if (Props[i$7][0] == 0 && Props.length > i$7 + 1 && Props[i$7][1] == Props[i$7 + 1][1]) continue; var piddsi = PIDSI[Props[i$7][0]]; PropH[piddsi.n] = parse_TypedPropertyValue(blob, piddsi.t, { raw: true }); if (piddsi.p === "version") PropH[piddsi.n] = String(PropH[piddsi.n] >> 16) + "." + ("0000" + String(PropH[piddsi.n] & 65535)).slice(-4); if (piddsi.n == "CodePage") switch (PropH[piddsi.n]) { case 0: PropH[piddsi.n] = 1252; case 874: case 932: case 936: case 949: case 950: case 1250: case 1251: case 1253: case 1254: case 1255: case 1256: case 1257: case 1258: case 1e4: case 1200: case 1201: case 1252: case 65e3: case -536: case 65001: case -535: set_cp(CodePage = PropH[piddsi.n] >>> 0 & 65535); break; default: throw new Error("Unsupported CodePage: " + PropH[piddsi.n]); } } else { if (Props[i$7][0] === 1) { CodePage = PropH.CodePage = parse_TypedPropertyValue(blob, VT_I2); set_cp(CodePage); if (Dictionary !== -1) { var oldpos = blob.l; blob.l = Props[Dictionary][1]; DictObj = parse_dictionary(blob, CodePage); blob.l = oldpos; } } else if (Props[i$7][0] === 0) { if (CodePage === 0) { Dictionary = i$7; blob.l = Props[i$7 + 1][1]; continue; } DictObj = parse_dictionary(blob, CodePage); } else { var name = DictObj[Props[i$7][0]]; var val$1; switch (blob[blob.l]) { case 65: blob.l += 4; val$1 = parse_BLOB(blob); break; case 30: blob.l += 4; val$1 = parse_VtString(blob, blob[blob.l - 4]).replace(/(^|[^\u0000])\u0000+$/, "$1"); break; case 31: blob.l += 4; val$1 = parse_VtString(blob, blob[blob.l - 4]).replace(/(^|[^\u0000])\u0000+$/, "$1"); break; case 3: blob.l += 4; val$1 = blob.read_shift(4, "i"); break; case 19: blob.l += 4; val$1 = blob.read_shift(4); break; case 5: blob.l += 4; val$1 = blob.read_shift(8, "f"); break; case 11: blob.l += 4; val$1 = parsebool(blob, 4); break; case 64: blob.l += 4; val$1 = parseDate(parse_FILETIME(blob)); break; default: throw new Error("unparsed value: " + blob[blob.l]); } PropH[name] = val$1; } } } blob.l = start_addr + size; return PropH; } function guess_property_type(val$1) { switch (typeof val$1) { case "boolean": return 11; case "number": return (val$1 | 0) == val$1 ? 3 : 5; case "string": return 31; case "object": if (val$1 instanceof Date) return 64; break; } return -1; } function write_PropertySet(entries, RE, PIDSI) { var hdr = new_buf(8), piao = [], prop = []; var sz = 8, i$7 = 0; var pr = new_buf(8), pio = new_buf(8); pr.write_shift(4, 2); pr.write_shift(4, 1200); pio.write_shift(4, 1); prop.push(pr); piao.push(pio); sz += 8 + pr.length; if (!RE) { pio = new_buf(8); pio.write_shift(4, 0); piao.unshift(pio); var bufs = [new_buf(4)]; bufs[0].write_shift(4, entries.length); for (i$7 = 0; i$7 < entries.length; ++i$7) { var value = entries[i$7][0]; pr = new_buf(4 + 4 + 2 * (value.length + 1) + (value.length % 2 ? 0 : 2)); pr.write_shift(4, i$7 + 2); pr.write_shift(4, value.length + 1); pr.write_shift(0, value, "dbcs"); while (pr.l != pr.length) pr.write_shift(1, 0); bufs.push(pr); } pr = bconcat(bufs); prop.unshift(pr); sz += 8 + pr.length; } for (i$7 = 0; i$7 < entries.length; ++i$7) { if (RE && !RE[entries[i$7][0]]) continue; if (XLSPSSkip.indexOf(entries[i$7][0]) > -1 || PseudoPropsPairs.indexOf(entries[i$7][0]) > -1) continue; if (entries[i$7][1] == null) continue; var val$1 = entries[i$7][1], idx = 0; if (RE) { idx = +RE[entries[i$7][0]]; var pinfo = PIDSI[idx]; if (pinfo.p == "version" && typeof val$1 == "string") { var arr = val$1.split("."); val$1 = (+arr[0] << 16) + (+arr[1] || 0); } pr = write_TypedPropertyValue(pinfo.t, val$1); } else { var T$3 = guess_property_type(val$1); if (T$3 == -1) { T$3 = 31; val$1 = String(val$1); } pr = write_TypedPropertyValue(T$3, val$1); } prop.push(pr); pio = new_buf(8); pio.write_shift(4, !RE ? 2 + i$7 : idx); piao.push(pio); sz += 8 + pr.length; } var w$2 = 8 * (prop.length + 1); for (i$7 = 0; i$7 < prop.length; ++i$7) { piao[i$7].write_shift(4, w$2); w$2 += prop[i$7].length; } hdr.write_shift(4, sz); hdr.write_shift(4, prop.length); return bconcat([hdr].concat(piao).concat(prop)); } function parse_PropertySetStream(file, PIDSI, clsid) { var blob = file.content; if (!blob) return {}; prep_blob(blob, 0); var NumSets, FMTID0, FMTID1, Offset0, Offset1 = 0; blob.chk("feff", "Byte Order: "); blob.read_shift(2); var SystemIdentifier = blob.read_shift(4); var CLSID = blob.read_shift(16); if (CLSID !== CFB.utils.consts.HEADER_CLSID && CLSID !== clsid) throw new Error("Bad PropertySet CLSID " + CLSID); NumSets = blob.read_shift(4); if (NumSets !== 1 && NumSets !== 2) throw new Error("Unrecognized #Sets: " + NumSets); FMTID0 = blob.read_shift(16); Offset0 = blob.read_shift(4); if (NumSets === 1 && Offset0 !== blob.l) throw new Error("Length mismatch: " + Offset0 + " !== " + blob.l); else if (NumSets === 2) { FMTID1 = blob.read_shift(16); Offset1 = blob.read_shift(4); } var PSet0 = parse_PropertySet(blob, PIDSI); var rval = { SystemIdentifier }; for (var y$3 in PSet0) rval[y$3] = PSet0[y$3]; rval.FMTID = FMTID0; if (NumSets === 1) return rval; if (Offset1 - blob.l == 2) blob.l += 2; if (blob.l !== Offset1) throw new Error("Length mismatch 2: " + blob.l + " !== " + Offset1); var PSet1; try { PSet1 = parse_PropertySet(blob, null); } catch (e$10) {} for (y$3 in PSet1) rval[y$3] = PSet1[y$3]; rval.FMTID = [FMTID0, FMTID1]; return rval; } function write_PropertySetStream(entries, clsid, RE, PIDSI, entries2, clsid2) { var hdr = new_buf(entries2 ? 68 : 48); var bufs = [hdr]; hdr.write_shift(2, 65534); hdr.write_shift(2, 0); hdr.write_shift(4, 842412599); hdr.write_shift(16, CFB.utils.consts.HEADER_CLSID, "hex"); hdr.write_shift(4, entries2 ? 2 : 1); hdr.write_shift(16, clsid, "hex"); hdr.write_shift(4, entries2 ? 68 : 48); var ps0 = write_PropertySet(entries, RE, PIDSI); bufs.push(ps0); if (entries2) { var ps1 = write_PropertySet(entries2, null, null); hdr.write_shift(16, clsid2, "hex"); hdr.write_shift(4, 68 + ps0.length); bufs.push(ps1); } return bconcat(bufs); } function parsenoop2(blob, length) { blob.read_shift(length); return null; } function writezeroes(n$9, o$10) { if (!o$10) o$10 = new_buf(n$9); for (var j$2 = 0; j$2 < n$9; ++j$2) o$10.write_shift(1, 0); return o$10; } function parslurp(blob, length, cb) { var arr = [], target = blob.l + length; while (blob.l < target) arr.push(cb(blob, target - blob.l)); if (target !== blob.l) throw new Error("Slurp error"); return arr; } function parsebool(blob, length) { return blob.read_shift(length) === 1; } function writebool(v$3, o$10) { if (!o$10) o$10 = new_buf(2); o$10.write_shift(2, +!!v$3); return o$10; } function parseuint16(blob) { return blob.read_shift(2, "u"); } function writeuint16(v$3, o$10) { if (!o$10) o$10 = new_buf(2); o$10.write_shift(2, v$3); return o$10; } function parseuint16a(blob, length) { return parslurp(blob, length, parseuint16); } function parse_Bes(blob) { var v$3 = blob.read_shift(1), t$6 = blob.read_shift(1); return t$6 === 1 ? v$3 : v$3 === 1; } function write_Bes(v$3, t$6, o$10) { if (!o$10) o$10 = new_buf(2); o$10.write_shift(1, t$6 == "e" ? +v$3 : +!!v$3); o$10.write_shift(1, t$6 == "e" ? 1 : 0); return o$10; } function parse_ShortXLUnicodeString(blob, length, opts) { var cch = blob.read_shift(opts && opts.biff >= 12 ? 2 : 1); var encoding = "sbcs-cont"; var cp = current_codepage; if (opts && opts.biff >= 8) current_codepage = 1200; if (!opts || opts.biff == 8) { var fHighByte = blob.read_shift(1); if (fHighByte) { encoding = "dbcs-cont"; } } else if (opts.biff == 12) { encoding = "wstr"; } if (opts.biff >= 2 && opts.biff <= 5) encoding = "cpstr"; var o$10 = cch ? blob.read_shift(cch, encoding) : ""; current_codepage = cp; return o$10; } function parse_XLUnicodeRichExtendedString(blob) { var cp = current_codepage; current_codepage = 1200; var cch = blob.read_shift(2), flags = blob.read_shift(1); var fExtSt = flags & 4, fRichSt = flags & 8; var width = 1 + (flags & 1); var cRun = 0, cbExtRst; var z$2 = {}; if (fRichSt) cRun = blob.read_shift(2); if (fExtSt) cbExtRst = blob.read_shift(4); var encoding = width == 2 ? "dbcs-cont" : "sbcs-cont"; var msg = cch === 0 ? "" : blob.read_shift(cch, encoding); if (fRichSt) blob.l += 4 * cRun; if (fExtSt) blob.l += cbExtRst; z$2.t = msg; if (!fRichSt) { z$2.raw = "" + z$2.t + ""; z$2.r = z$2.t; } current_codepage = cp; return z$2; } function write_XLUnicodeRichExtendedString(xlstr) { var str = xlstr.t || "", nfmts = 1; var hdr = new_buf(3 + (nfmts > 1 ? 2 : 0)); hdr.write_shift(2, str.length); hdr.write_shift(1, (nfmts > 1 ? 8 : 0) | 1); if (nfmts > 1) hdr.write_shift(2, nfmts); var otext = new_buf(2 * str.length); otext.write_shift(2 * str.length, str, "utf16le"); var out = [hdr, otext]; return bconcat(out); } function parse_XLUnicodeStringNoCch(blob, cch, opts) { var retval; if (opts) { if (opts.biff >= 2 && opts.biff <= 5) return blob.read_shift(cch, "cpstr"); if (opts.biff >= 12) return blob.read_shift(cch, "dbcs-cont"); } var fHighByte = blob.read_shift(1); if (fHighByte === 0) { retval = blob.read_shift(cch, "sbcs-cont"); } else { retval = blob.read_shift(cch, "dbcs-cont"); } return retval; } function parse_XLUnicodeString(blob, length, opts) { var cch = blob.read_shift(opts && opts.biff == 2 ? 1 : 2); if (cch === 0) { blob.l++; return ""; } return parse_XLUnicodeStringNoCch(blob, cch, opts); } function parse_XLUnicodeString2(blob, length, opts) { if (opts.biff > 5) return parse_XLUnicodeString(blob, length, opts); var cch = blob.read_shift(1); if (cch === 0) { blob.l++; return ""; } return blob.read_shift(cch, opts.biff <= 4 || !blob.lens ? "cpstr" : "sbcs-cont"); } function write_XLUnicodeString(str, opts, o$10) { if (!o$10) o$10 = new_buf(3 + 2 * str.length); o$10.write_shift(2, str.length); o$10.write_shift(1, 1); o$10.write_shift(31, str, "utf16le"); return o$10; } function parse_ControlInfo(blob) { var flags = blob.read_shift(1); blob.l++; var accel = blob.read_shift(2); blob.l += 2; return [flags, accel]; } function parse_URLMoniker(blob) { var len = blob.read_shift(4), start = blob.l; var extra = false; if (len > 24) { blob.l += len - 24; if (blob.read_shift(16) === "795881f43b1d7f48af2c825dc4852763") extra = true; blob.l = start; } var url = blob.read_shift((extra ? len - 24 : len) >> 1, "utf16le").replace(chr0, ""); if (extra) blob.l += 24; return url; } function parse_FileMoniker(blob) { var cAnti = blob.read_shift(2); var preamble = ""; while (cAnti-- > 0) preamble += "../"; var ansiPath = blob.read_shift(0, "lpstr-ansi"); blob.l += 2; if (blob.read_shift(2) != 57005) throw new Error("Bad FileMoniker"); var sz = blob.read_shift(4); if (sz === 0) return preamble + ansiPath.replace(/\\/g, "/"); var bytes = blob.read_shift(4); if (blob.read_shift(2) != 3) throw new Error("Bad FileMoniker"); var unicodePath = blob.read_shift(bytes >> 1, "utf16le").replace(chr0, ""); return preamble + unicodePath; } function parse_HyperlinkMoniker(blob, length) { var clsid = blob.read_shift(16); length -= 16; switch (clsid) { case "e0c9ea79f9bace118c8200aa004ba90b": return parse_URLMoniker(blob, length); case "0303000000000000c000000000000046": return parse_FileMoniker(blob, length); default: throw new Error("Unsupported Moniker " + clsid); } } function parse_HyperlinkString(blob) { var len = blob.read_shift(4); var o$10 = len > 0 ? blob.read_shift(len, "utf16le").replace(chr0, "") : ""; return o$10; } function write_HyperlinkString(str, o$10) { if (!o$10) o$10 = new_buf(6 + str.length * 2); o$10.write_shift(4, 1 + str.length); for (var i$7 = 0; i$7 < str.length; ++i$7) o$10.write_shift(2, str.charCodeAt(i$7)); o$10.write_shift(2, 0); return o$10; } function parse_Hyperlink(blob, length) { var end = blob.l + length; var sVer = blob.read_shift(4); if (sVer !== 2) throw new Error("Unrecognized streamVersion: " + sVer); var flags = blob.read_shift(2); blob.l += 2; var displayName, targetFrameName, moniker, oleMoniker, Loc = "", guid, fileTime; if (flags & 16) displayName = parse_HyperlinkString(blob, end - blob.l); if (flags & 128) targetFrameName = parse_HyperlinkString(blob, end - blob.l); if ((flags & 257) === 257) moniker = parse_HyperlinkString(blob, end - blob.l); if ((flags & 257) === 1) oleMoniker = parse_HyperlinkMoniker(blob, end - blob.l); if (flags & 8) Loc = parse_HyperlinkString(blob, end - blob.l); if (flags & 32) guid = blob.read_shift(16); if (flags & 64) fileTime = parse_FILETIME(blob); blob.l = end; var target = targetFrameName || moniker || oleMoniker || ""; if (target && Loc) target += "#" + Loc; if (!target) target = "#" + Loc; if (flags & 2 && target.charAt(0) == "/" && target.charAt(1) != "/") target = "file://" + target; var out = { Target: target }; if (guid) out.guid = guid; if (fileTime) out.time = fileTime; if (displayName) out.Tooltip = displayName; return out; } function write_Hyperlink(hl) { var out = new_buf(512), i$7 = 0; var Target$1 = hl.Target; if (Target$1.slice(0, 7) == "file://") Target$1 = Target$1.slice(7); var hashidx = Target$1.indexOf("#"); var F$1 = hashidx > -1 ? 31 : 23; switch (Target$1.charAt(0)) { case "#": F$1 = 28; break; case ".": F$1 &= ~2; break; } out.write_shift(4, 2); out.write_shift(4, F$1); var data = [ 8, 6815827, 6619237, 4849780, 83 ]; for (i$7 = 0; i$7 < data.length; ++i$7) out.write_shift(4, data[i$7]); if (F$1 == 28) { Target$1 = Target$1.slice(1); write_HyperlinkString(Target$1, out); } else if (F$1 & 2) { data = "e0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "); for (i$7 = 0; i$7 < data.length; ++i$7) out.write_shift(1, parseInt(data[i$7], 16)); var Pretarget = hashidx > -1 ? Target$1.slice(0, hashidx) : Target$1; out.write_shift(4, 2 * (Pretarget.length + 1)); for (i$7 = 0; i$7 < Pretarget.length; ++i$7) out.write_shift(2, Pretarget.charCodeAt(i$7)); out.write_shift(2, 0); if (F$1 & 8) write_HyperlinkString(hashidx > -1 ? Target$1.slice(hashidx + 1) : "", out); } else { data = "03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46".split(" "); for (i$7 = 0; i$7 < data.length; ++i$7) out.write_shift(1, parseInt(data[i$7], 16)); var P$2 = 0; while (Target$1.slice(P$2 * 3, P$2 * 3 + 3) == "../" || Target$1.slice(P$2 * 3, P$2 * 3 + 3) == "..\\") ++P$2; out.write_shift(2, P$2); out.write_shift(4, Target$1.length - 3 * P$2 + 1); for (i$7 = 0; i$7 < Target$1.length - 3 * P$2; ++i$7) out.write_shift(1, Target$1.charCodeAt(i$7 + 3 * P$2) & 255); out.write_shift(1, 0); out.write_shift(2, 65535); out.write_shift(2, 57005); for (i$7 = 0; i$7 < 6; ++i$7) out.write_shift(4, 0); } return out.slice(0, out.l); } function parse_LongRGBA(blob) { var r$10 = blob.read_shift(1), g$1 = blob.read_shift(1), b$3 = blob.read_shift(1), a$2 = blob.read_shift(1); return [ r$10, g$1, b$3, a$2 ]; } function parse_LongRGB(blob, length) { var x$2 = parse_LongRGBA(blob, length); x$2[3] = 0; return x$2; } function parse_XLSCell(blob, length, opts) { var rw = blob.read_shift(2); var col = blob.read_shift(2); var ret = { r: rw, c: col, ixfe: 0 }; if (opts && opts.biff == 2 || length == 7) { var flags = blob.read_shift(1); ret.ixfe = flags & 63; blob.l += 2; } else ret.ixfe = blob.read_shift(2); return ret; } function write_XLSCell(R$1, C$2, ixfe, o$10) { if (!o$10) o$10 = new_buf(6); o$10.write_shift(2, R$1); o$10.write_shift(2, C$2); o$10.write_shift(2, ixfe || 0); return o$10; } function parse_frtHeader(blob) { var rt = blob.read_shift(2); var flags = blob.read_shift(2); blob.l += 8; return { type: rt, flags }; } function parse_OptXLUnicodeString(blob, length, opts) { return length === 0 ? "" : parse_XLUnicodeString2(blob, length, opts); } function parse_XTI(blob, length, opts) { var w$2 = opts.biff > 8 ? 4 : 2; var iSupBook = blob.read_shift(w$2), itabFirst = blob.read_shift(w$2, "i"), itabLast = blob.read_shift(w$2, "i"); return [ iSupBook, itabFirst, itabLast ]; } function parse_RkRec(blob) { var ixfe = blob.read_shift(2); var RK = parse_RkNumber(blob); return [ixfe, RK]; } function parse_AddinUdf(blob, length, opts) { blob.l += 4; length -= 4; var l$3 = blob.l + length; var udfName = parse_ShortXLUnicodeString(blob, length, opts); var cb = blob.read_shift(2); l$3 -= blob.l; if (cb !== l$3) throw new Error("Malformed AddinUdf: padding = " + l$3 + " != " + cb); blob.l += cb; return udfName; } function parse_Ref8U(blob) { var rwFirst = blob.read_shift(2); var rwLast = blob.read_shift(2); var colFirst = blob.read_shift(2); var colLast = blob.read_shift(2); return { s: { c: colFirst, r: rwFirst }, e: { c: colLast, r: rwLast } }; } function write_Ref8U(r$10, o$10) { if (!o$10) o$10 = new_buf(8); o$10.write_shift(2, r$10.s.r); o$10.write_shift(2, r$10.e.r); o$10.write_shift(2, r$10.s.c); o$10.write_shift(2, r$10.e.c); return o$10; } function parse_RefU(blob) { var rwFirst = blob.read_shift(2); var rwLast = blob.read_shift(2); var colFirst = blob.read_shift(1); var colLast = blob.read_shift(1); return { s: { c: colFirst, r: rwFirst }, e: { c: colLast, r: rwLast } }; } function parse_FtCmo(blob) { blob.l += 4; var ot = blob.read_shift(2); var id = blob.read_shift(2); var flags = blob.read_shift(2); blob.l += 12; return [ id, ot, flags ]; } function parse_FtNts(blob) { var out = {}; blob.l += 4; blob.l += 16; out.fSharedNote = blob.read_shift(2); blob.l += 4; return out; } function parse_FtCf(blob) { var out = {}; blob.l += 4; blob.cf = blob.read_shift(2); return out; } function parse_FtSkip(blob) { blob.l += 2; blob.l += blob.read_shift(2); } function parse_FtArray(blob, length) { var tgt = blob.l + length; var fts = []; while (blob.l < tgt) { var ft = blob.read_shift(2); blob.l -= 2; try { fts[ft] = FtTab[ft](blob, tgt - blob.l); } catch (e$10) { blob.l = tgt; return fts; } } if (blob.l != tgt) blob.l = tgt; return fts; } function parse_BOF(blob, length) { var o$10 = { BIFFVer: 0, dt: 0 }; o$10.BIFFVer = blob.read_shift(2); length -= 2; if (length >= 2) { o$10.dt = blob.read_shift(2); blob.l -= 2; } switch (o$10.BIFFVer) { case 1536: case 1280: case 1024: case 768: case 512: case 2: case 7: break; default: if (length > 6) throw new Error("Unexpected BIFF Ver " + o$10.BIFFVer); } blob.read_shift(length); return o$10; } function write_BOF(wb, t$6, o$10) { var h$5 = 1536, w$2 = 16; switch (o$10.bookType) { case "biff8": break; case "biff5": h$5 = 1280; w$2 = 8; break; case "biff4": h$5 = 4; w$2 = 6; break; case "biff3": h$5 = 3; w$2 = 6; break; case "biff2": h$5 = 2; w$2 = 4; break; case "xla": break; default: throw new Error("unsupported BIFF version"); } var out = new_buf(w$2); out.write_shift(2, h$5); out.write_shift(2, t$6); if (w$2 > 4) out.write_shift(2, 29282); if (w$2 > 6) out.write_shift(2, 1997); if (w$2 > 8) { out.write_shift(2, 49161); out.write_shift(2, 1); out.write_shift(2, 1798); out.write_shift(2, 0); } return out; } function parse_InterfaceHdr(blob, length) { if (length === 0) return 1200; if (blob.read_shift(2) !== 1200) {} return 1200; } function parse_WriteAccess(blob, length, opts) { if (opts.enc) { blob.l += length; return ""; } var l$3 = blob.l; var UserName = parse_XLUnicodeString2(blob, 0, opts); blob.read_shift(length + l$3 - blob.l); return UserName; } function write_WriteAccess(s$5, opts) { var b8 = !opts || opts.biff == 8; var o$10 = new_buf(b8 ? 112 : 54); o$10.write_shift(opts.biff == 8 ? 2 : 1, 7); if (b8) o$10.write_shift(1, 0); o$10.write_shift(4, 859007059); o$10.write_shift(4, 5458548 | (b8 ? 0 : 536870912)); while (o$10.l < o$10.length) o$10.write_shift(1, b8 ? 0 : 32); return o$10; } function parse_WsBool(blob, length, opts) { var flags = opts && opts.biff == 8 || length == 2 ? blob.read_shift(2) : (blob.l += length, 0); return { fDialog: flags & 16, fBelow: flags & 64, fRight: flags & 128 }; } function parse_BoundSheet8(blob, length, opts) { var name = ""; if (opts.biff == 4) { name = parse_ShortXLUnicodeString(blob, 0, opts); if (name.length === 0) name = "Sheet1"; return { name }; } var pos = blob.read_shift(4); var hidden = blob.read_shift(1) & 3; var dt = blob.read_shift(1); switch (dt) { case 0: dt = "Worksheet"; break; case 1: dt = "Macrosheet"; break; case 2: dt = "Chartsheet"; break; case 6: dt = "VBAModule"; break; } name = parse_ShortXLUnicodeString(blob, 0, opts); if (name.length === 0) name = "Sheet1"; return { pos, hs: hidden, dt, name }; } function write_BoundSheet8(data, opts) { var w$2 = !opts || opts.biff >= 8 ? 2 : 1; var o$10 = new_buf(8 + w$2 * data.name.length); o$10.write_shift(4, data.pos); o$10.write_shift(1, data.hs || 0); o$10.write_shift(1, data.dt); o$10.write_shift(1, data.name.length); if (opts.biff >= 8) o$10.write_shift(1, 1); o$10.write_shift(w$2 * data.name.length, data.name, opts.biff < 8 ? "sbcs" : "utf16le"); var out = o$10.slice(0, o$10.l); out.l = o$10.l; return out; } function parse_SST(blob, length) { var end = blob.l + length; var cnt = blob.read_shift(4); var ucnt = blob.read_shift(4); var strs$1 = []; for (var i$7 = 0; i$7 != ucnt && blob.l < end; ++i$7) { strs$1.push(parse_XLUnicodeRichExtendedString(blob)); } strs$1.Count = cnt; strs$1.Unique = ucnt; return strs$1; } function write_SST(sst, opts) { var header = new_buf(8); header.write_shift(4, sst.Count); header.write_shift(4, sst.Unique); var strs$1 = []; for (var j$2 = 0; j$2 < sst.length; ++j$2) strs$1[j$2] = write_XLUnicodeRichExtendedString(sst[j$2], opts); var o$10 = bconcat([header].concat(strs$1)); o$10.parts = [header.length].concat(strs$1.map(function(str) { return str.length; })); return o$10; } function parse_ExtSST(blob, length) { var extsst = {}; extsst.dsst = blob.read_shift(2); blob.l += length - 2; return extsst; } function parse_Row(blob) { var z$2 = {}; z$2.r = blob.read_shift(2); z$2.c = blob.read_shift(2); z$2.cnt = blob.read_shift(2) - z$2.c; var miyRw = blob.read_shift(2); blob.l += 4; var flags = blob.read_shift(1); blob.l += 3; if (flags & 7) z$2.level = flags & 7; if (flags & 32) z$2.hidden = true; if (flags & 64) z$2.hpt = miyRw / 20; return z$2; } function parse_ForceFullCalculation(blob) { var header = parse_frtHeader(blob); if (header.type != 2211) throw new Error("Invalid Future Record " + header.type); var fullcalc = blob.read_shift(4); return fullcalc !== 0; } function parse_RecalcId(blob) { blob.read_shift(2); return blob.read_shift(4); } function parse_DefaultRowHeight(blob, length, opts) { var f$4 = 0; if (!(opts && opts.biff == 2)) { f$4 = blob.read_shift(2); } var miyRw = blob.read_shift(2); if (opts && opts.biff == 2) { f$4 = 1 - (miyRw >> 15); miyRw &= 32767; } var fl = { Unsynced: f$4 & 1, DyZero: (f$4 & 2) >> 1, ExAsc: (f$4 & 4) >> 2, ExDsc: (f$4 & 8) >> 3 }; return [fl, miyRw]; } function parse_Window1(blob) { var xWn = blob.read_shift(2), yWn = blob.read_shift(2), dxWn = blob.read_shift(2), dyWn = blob.read_shift(2); var flags = blob.read_shift(2), iTabCur = blob.read_shift(2), iTabFirst = blob.read_shift(2); var ctabSel = blob.read_shift(2), wTabRatio = blob.read_shift(2); return { Pos: [xWn, yWn], Dim: [dxWn, dyWn], Flags: flags, CurTab: iTabCur, FirstTab: iTabFirst, Selected: ctabSel, TabRatio: wTabRatio }; } function write_Window1() { var o$10 = new_buf(18); o$10.write_shift(2, 0); o$10.write_shift(2, 0); o$10.write_shift(2, 29280); o$10.write_shift(2, 17600); o$10.write_shift(2, 56); o$10.write_shift(2, 0); o$10.write_shift(2, 0); o$10.write_shift(2, 1); o$10.write_shift(2, 500); return o$10; } function parse_Window2(blob, length, opts) { if (opts && opts.biff >= 2 && opts.biff < 5) return {}; var f$4 = blob.read_shift(2); return { RTL: f$4 & 64 }; } function write_Window2(view) { var o$10 = new_buf(18), f$4 = 1718; if (view && view.RTL) f$4 |= 64; o$10.write_shift(2, f$4); o$10.write_shift(4, 0); o$10.write_shift(4, 64); o$10.write_shift(4, 0); o$10.write_shift(4, 0); return o$10; } function parse_Pane() {} function parse_Font(blob, length, opts) { var o$10 = { dyHeight: blob.read_shift(2), fl: blob.read_shift(2) }; switch (opts && opts.biff || 8) { case 2: break; case 3: case 4: blob.l += 2; break; default: blob.l += 10; break; } o$10.name = parse_ShortXLUnicodeString(blob, 0, opts); return o$10; } function write_Font(data, opts) { var name = data.name || "Arial"; var b5 = opts && opts.biff == 5, w$2 = b5 ? 15 + name.length : 16 + 2 * name.length; var o$10 = new_buf(w$2); o$10.write_shift(2, (data.sz || 12) * 20); o$10.write_shift(4, 0); o$10.write_shift(2, 400); o$10.write_shift(4, 0); o$10.write_shift(2, 0); o$10.write_shift(1, name.length); if (!b5) o$10.write_shift(1, 1); o$10.write_shift((b5 ? 1 : 2) * name.length, name, b5 ? "sbcs" : "utf16le"); return o$10; } function parse_LabelSst(blob, length, opts) { var cell = parse_XLSCell(blob, length, opts); cell.isst = blob.read_shift(4); return cell; } function write_LabelSst(R$1, C$2, v$3, os) { var o$10 = new_buf(10); write_XLSCell(R$1, C$2, os, o$10); o$10.write_shift(4, v$3); return o$10; } function parse_Label(blob, length, opts) { if (opts.biffguess && opts.biff == 2) opts.biff = 5; var target = blob.l + length; var cell = parse_XLSCell(blob, length, opts); var str = parse_XLUnicodeString(blob, target - blob.l, opts); cell.val = str; return cell; } function write_Label(R$1, C$2, v$3, os, opts) { var b8 = !opts || opts.biff == 8; var o$10 = new_buf(6 + 2 + +b8 + (1 + b8) * v$3.length); write_XLSCell(R$1, C$2, os, o$10); o$10.write_shift(2, v$3.length); if (b8) o$10.write_shift(1, 1); o$10.write_shift((1 + b8) * v$3.length, v$3, b8 ? "utf16le" : "sbcs"); return o$10; } function parse_Format(blob, length, opts) { var numFmtId = blob.read_shift(2); var fmtstr = parse_XLUnicodeString2(blob, 0, opts); return [numFmtId, fmtstr]; } function write_Format(i$7, f$4, opts, o$10) { var b5 = opts && opts.biff == 5; if (!o$10) o$10 = new_buf(b5 ? 3 + f$4.length : 5 + 2 * f$4.length); o$10.write_shift(2, i$7); o$10.write_shift(b5 ? 1 : 2, f$4.length); if (!b5) o$10.write_shift(1, 1); o$10.write_shift((b5 ? 1 : 2) * f$4.length, f$4, b5 ? "sbcs" : "utf16le"); var out = o$10.length > o$10.l ? o$10.slice(0, o$10.l) : o$10; if (out.l == null) out.l = out.length; return out; } function write_BIFF2Format(f$4) { var o$10 = new_buf(1 + f$4.length); o$10.write_shift(1, f$4.length); o$10.write_shift(f$4.length, f$4, "sbcs"); return o$10; } function write_BIFF4Format(f$4) { var o$10 = new_buf(3 + f$4.length); o$10.l += 2; o$10.write_shift(1, f$4.length); o$10.write_shift(f$4.length, f$4, "sbcs"); return o$10; } function parse_Dimensions(blob, length, opts) { var end = blob.l + length; var w$2 = opts.biff == 8 || !opts.biff ? 4 : 2; var r$10 = blob.read_shift(w$2), R$1 = blob.read_shift(w$2); var c$7 = blob.read_shift(2), C$2 = blob.read_shift(2); blob.l = end; return { s: { r: r$10, c: c$7 }, e: { r: R$1, c: C$2 } }; } function write_Dimensions(range, opts) { var w$2 = opts.biff == 8 || !opts.biff ? 4 : 2; var o$10 = new_buf(2 * w$2 + 6); o$10.write_shift(w$2, range.s.r); o$10.write_shift(w$2, range.e.r + 1); o$10.write_shift(2, range.s.c); o$10.write_shift(2, range.e.c + 1); o$10.write_shift(2, 0); return o$10; } function parse_RK(blob) { var rw = blob.read_shift(2), col = blob.read_shift(2); var rkrec = parse_RkRec(blob); return { r: rw, c: col, ixfe: rkrec[0], rknum: rkrec[1] }; } function parse_MulRk(blob, length) { var target = blob.l + length - 2; var rw = blob.read_shift(2), col = blob.read_shift(2); var rkrecs = []; while (blob.l < target) rkrecs.push(parse_RkRec(blob)); if (blob.l !== target) throw new Error("MulRK read error"); var lastcol = blob.read_shift(2); if (rkrecs.length != lastcol - col + 1) throw new Error("MulRK length mismatch"); return { r: rw, c: col, C: lastcol, rkrec: rkrecs }; } function parse_MulBlank(blob, length) { var target = blob.l + length - 2; var rw = blob.read_shift(2), col = blob.read_shift(2); var ixfes = []; while (blob.l < target) ixfes.push(blob.read_shift(2)); if (blob.l !== target) throw new Error("MulBlank read error"); var lastcol = blob.read_shift(2); if (ixfes.length != lastcol - col + 1) throw new Error("MulBlank length mismatch"); return { r: rw, c: col, C: lastcol, ixfe: ixfes }; } function parse_CellStyleXF(blob, length, style, opts) { var o$10 = {}; var a$2 = blob.read_shift(4), b$3 = blob.read_shift(4); var c$7 = blob.read_shift(4), d$5 = blob.read_shift(2); o$10.patternType = XLSFillPattern[c$7 >> 26]; if (!opts.cellStyles) return o$10; o$10.alc = a$2 & 7; o$10.fWrap = a$2 >> 3 & 1; o$10.alcV = a$2 >> 4 & 7; o$10.fJustLast = a$2 >> 7 & 1; o$10.trot = a$2 >> 8 & 255; o$10.cIndent = a$2 >> 16 & 15; o$10.fShrinkToFit = a$2 >> 20 & 1; o$10.iReadOrder = a$2 >> 22 & 2; o$10.fAtrNum = a$2 >> 26 & 1; o$10.fAtrFnt = a$2 >> 27 & 1; o$10.fAtrAlc = a$2 >> 28 & 1; o$10.fAtrBdr = a$2 >> 29 & 1; o$10.fAtrPat = a$2 >> 30 & 1; o$10.fAtrProt = a$2 >> 31 & 1; o$10.dgLeft = b$3 & 15; o$10.dgRight = b$3 >> 4 & 15; o$10.dgTop = b$3 >> 8 & 15; o$10.dgBottom = b$3 >> 12 & 15; o$10.icvLeft = b$3 >> 16 & 127; o$10.icvRight = b$3 >> 23 & 127; o$10.grbitDiag = b$3 >> 30 & 3; o$10.icvTop = c$7 & 127; o$10.icvBottom = c$7 >> 7 & 127; o$10.icvDiag = c$7 >> 14 & 127; o$10.dgDiag = c$7 >> 21 & 15; o$10.icvFore = d$5 & 127; o$10.icvBack = d$5 >> 7 & 127; o$10.fsxButton = d$5 >> 14 & 1; return o$10; } function parse_XF(blob, length, opts) { var o$10 = {}; o$10.ifnt = blob.read_shift(2); o$10.numFmtId = blob.read_shift(2); o$10.flags = blob.read_shift(2); o$10.fStyle = o$10.flags >> 2 & 1; length -= 6; o$10.data = parse_CellStyleXF(blob, length, o$10.fStyle, opts); return o$10; } function write_XF(data, ixfeP, opts, o$10) { var b5 = opts && opts.biff == 5; if (!o$10) o$10 = new_buf(b5 ? 16 : 20); o$10.write_shift(2, 0); if (data.style) { o$10.write_shift(2, data.numFmtId || 0); o$10.write_shift(2, 65524); } else { o$10.write_shift(2, data.numFmtId || 0); o$10.write_shift(2, ixfeP << 4); } var f$4 = 0; if (data.numFmtId > 0 && b5) f$4 |= 1024; o$10.write_shift(4, f$4); o$10.write_shift(4, 0); if (!b5) o$10.write_shift(4, 0); o$10.write_shift(2, 0); return o$10; } function parse_BIFF2XF(blob) { var o$10 = {}; o$10.ifnt = blob.read_shift(1); blob.l++; o$10.flags = blob.read_shift(1); o$10.numFmtId = o$10.flags & 63; o$10.flags >>= 6; o$10.fStyle = 0; o$10.data = {}; return o$10; } function write_BIFF2XF(xf) { var o$10 = new_buf(4); o$10.l += 2; o$10.write_shift(1, xf.numFmtId); o$10.l++; return o$10; } function write_BIFF3XF(xf) { var o$10 = new_buf(12); o$10.l++; o$10.write_shift(1, xf.numFmtId); o$10.l += 10; return o$10; } function parse_BIFF3XF(blob) { var o$10 = {}; o$10.ifnt = blob.read_shift(1); o$10.numFmtId = blob.read_shift(1); o$10.flags = blob.read_shift(2); o$10.fStyle = o$10.flags >> 2 & 1; o$10.data = {}; return o$10; } function parse_BIFF4XF(blob) { var o$10 = {}; o$10.ifnt = blob.read_shift(1); o$10.numFmtId = blob.read_shift(1); o$10.flags = blob.read_shift(2); o$10.fStyle = o$10.flags >> 2 & 1; o$10.data = {}; return o$10; } function parse_Guts(blob) { blob.l += 4; var out = [blob.read_shift(2), blob.read_shift(2)]; if (out[0] !== 0) out[0]--; if (out[1] !== 0) out[1]--; if (out[0] > 7 || out[1] > 7) throw new Error("Bad Gutters: " + out.join("|")); return out; } function write_Guts(guts) { var o$10 = new_buf(8); o$10.write_shift(4, 0); o$10.write_shift(2, guts[0] ? guts[0] + 1 : 0); o$10.write_shift(2, guts[1] ? guts[1] + 1 : 0); return o$10; } function parse_BoolErr(blob, length, opts) { var cell = parse_XLSCell(blob, 6, opts); var val$1 = parse_Bes(blob, 2); cell.val = val$1; cell.t = val$1 === true || val$1 === false ? "b" : "e"; return cell; } function write_BoolErr(R$1, C$2, v$3, os, opts, t$6) { var o$10 = new_buf(8); write_XLSCell(R$1, C$2, os, o$10); write_Bes(v$3, t$6, o$10); return o$10; } function parse_Number(blob, length, opts) { if (opts.biffguess && opts.biff == 2) opts.biff = 5; var cell = parse_XLSCell(blob, 6, opts); var xnum = parse_Xnum(blob, 8); cell.val = xnum; return cell; } function write_Number(R$1, C$2, v$3, os) { var o$10 = new_buf(14); write_XLSCell(R$1, C$2, os, o$10); write_Xnum(v$3, o$10); return o$10; } function parse_SupBook(blob, length, opts) { var end = blob.l + length; var ctab = blob.read_shift(2); var cch = blob.read_shift(2); opts.sbcch = cch; if (cch == 1025 || cch == 14849) return [cch, ctab]; if (cch < 1 || cch > 255) throw new Error("Unexpected SupBook type: " + cch); var virtPath = parse_XLUnicodeStringNoCch(blob, cch); var rgst = []; while (end > blob.l) rgst.push(parse_XLUnicodeString(blob)); return [ cch, ctab, virtPath, rgst ]; } function parse_ExternName(blob, length, opts) { var flags = blob.read_shift(2); var body; var o$10 = { fBuiltIn: flags & 1, fWantAdvise: flags >>> 1 & 1, fWantPict: flags >>> 2 & 1, fOle: flags >>> 3 & 1, fOleLink: flags >>> 4 & 1, cf: flags >>> 5 & 1023, fIcon: flags >>> 15 & 1 }; if (opts.sbcch === 14849) body = parse_AddinUdf(blob, length - 2, opts); o$10.body = body || blob.read_shift(length - 2); if (typeof body === "string") o$10.Name = body; return o$10; } function parse_Lbl(blob, length, opts) { var target = blob.l + length; var flags = blob.read_shift(2); var chKey = blob.read_shift(1); var cch = blob.read_shift(1); var cce = blob.read_shift(opts && opts.biff == 2 ? 1 : 2); var itab = 0; if (!opts || opts.biff >= 5) { if (opts.biff != 5) blob.l += 2; itab = blob.read_shift(2); if (opts.biff == 5) blob.l += 2; blob.l += 4; } var name = parse_XLUnicodeStringNoCch(blob, cch, opts); if (flags & 32) name = XLSLblBuiltIn[name.charCodeAt(0)]; var npflen = target - blob.l; if (opts && opts.biff == 2) --npflen; var rgce = target == blob.l || cce === 0 || !(npflen > 0) ? [] : parse_NameParsedFormula(blob, npflen, opts, cce); return { chKey, Name: name, itab, rgce }; } function parse_ExternSheet(blob, length, opts) { if (opts.biff < 8) return parse_BIFF5ExternSheet(blob, length, opts); if (!(opts.biff > 8) && length == blob[blob.l] + (blob[blob.l + 1] == 3 ? 1 : 0) + 1) return parse_BIFF5ExternSheet(blob, length, opts); var o$10 = [], target = blob.l + length, len = blob.read_shift(opts.biff > 8 ? 4 : 2); while (len-- !== 0) o$10.push(parse_XTI(blob, opts.biff > 8 ? 12 : 6, opts)); if (blob.l != target) throw new Error("Bad ExternSheet: " + blob.l + " != " + target); return o$10; } function parse_BIFF5ExternSheet(blob, length, opts) { if (blob[blob.l + 1] == 3) blob[blob.l]++; var o$10 = parse_ShortXLUnicodeString(blob, length, opts); return o$10.charCodeAt(0) == 3 ? o$10.slice(1) : o$10; } function parse_NameCmt(blob, length, opts) { if (opts.biff < 8) { blob.l += length; return; } var cchName = blob.read_shift(2); var cchComment = blob.read_shift(2); var name = parse_XLUnicodeStringNoCch(blob, cchName, opts); var comment = parse_XLUnicodeStringNoCch(blob, cchComment, opts); return [name, comment]; } function parse_ShrFmla(blob, length, opts) { var ref = parse_RefU(blob, 6); blob.l++; var cUse = blob.read_shift(1); length -= 8; return [ parse_SharedParsedFormula(blob, length, opts), cUse, ref ]; } function parse_Array(blob, length, opts) { var ref = parse_Ref(blob, 6); switch (opts.biff) { case 2: blob.l++; length -= 7; break; case 3: case 4: blob.l += 2; length -= 8; break; default: blob.l += 6; length -= 12; } return [ref, parse_ArrayParsedFormula(blob, length, opts, ref)]; } function parse_MTRSettings(blob) { var fMTREnabled = blob.read_shift(4) !== 0; var fUserSetThreadCount = blob.read_shift(4) !== 0; var cUserThreadCount = blob.read_shift(4); return [ fMTREnabled, fUserSetThreadCount, cUserThreadCount ]; } function parse_NoteSh(blob, length, opts) { var row = blob.read_shift(2), col = blob.read_shift(2); var flags = blob.read_shift(2), idObj = blob.read_shift(2); var stAuthor = parse_XLUnicodeString2(blob, 0, opts); return [ { r: row, c: col }, stAuthor, idObj, flags ]; } function parse_Note(blob, length, opts) { if (opts && opts.biff < 8) { var row = blob.read_shift(2), col = blob.read_shift(2); if (row == 65535 || row == -1) return; var cch = blob.read_shift(2); var cmnt = blob.read_shift(Math.min(cch, 2048), "cpstr"); return [{ r: row, c: col }, cmnt]; } return parse_NoteSh(blob, length, opts); } function write_NOTE_BIFF2(text$2, R$1, C$2, len) { var o$10 = new_buf(6 + (len || text$2.length)); o$10.write_shift(2, R$1); o$10.write_shift(2, C$2); o$10.write_shift(2, len || text$2.length); o$10.write_shift(text$2.length, text$2, "sbcs"); return o$10; } function parse_MergeCells(blob, length) { var merges = []; var cmcs = blob.read_shift(2); while (cmcs--) merges.push(parse_Ref8U(blob, length)); return merges; } function write_MergeCells(merges) { var o$10 = new_buf(2 + merges.length * 8); o$10.write_shift(2, merges.length); for (var i$7 = 0; i$7 < merges.length; ++i$7) write_Ref8U(merges[i$7], o$10); return o$10; } function parse_Obj(blob, length, opts) { if (opts && opts.biff < 8) return parse_BIFF5Obj(blob, length, opts); var cmo = parse_FtCmo(blob, 22); var fts = parse_FtArray(blob, length - 22, cmo[1]); return { cmo, ft: fts }; } function parse_BIFF5Obj(blob, length, opts) { blob.l += 4; var ot = blob.read_shift(2); var id = blob.read_shift(2); var grbit = blob.read_shift(2); blob.l += 2; blob.l += 2; blob.l += 2; blob.l += 2; blob.l += 2; blob.l += 2; blob.l += 2; blob.l += 2; blob.l += 2; blob.l += 6; length -= 36; var fts = []; fts.push((parse_BIFF5OT[ot] || parsenoop)(blob, length, opts)); return { cmo: [ id, ot, grbit ], ft: fts }; } function parse_TxO(blob, length, opts) { var s$5 = blob.l; var texts = ""; try { blob.l += 4; var ot = (opts.lastobj || { cmo: [0, 0] }).cmo[1]; var controlInfo; if ([ 0, 5, 7, 11, 12, 14 ].indexOf(ot) == -1) blob.l += 6; else controlInfo = parse_ControlInfo(blob, 6, opts); var cchText = blob.read_shift(2); blob.read_shift(2); parseuint16(blob, 2); var len = blob.read_shift(2); blob.l += len; for (var i$7 = 1; i$7 < blob.lens.length - 1; ++i$7) { if (blob.l - s$5 != blob.lens[i$7]) throw new Error("TxO: bad continue record"); var hdr = blob[blob.l]; var t$6 = parse_XLUnicodeStringNoCch(blob, blob.lens[i$7 + 1] - blob.lens[i$7] - 1); texts += t$6; if (texts.length >= (hdr ? cchText : 2 * cchText)) break; } if (texts.length !== cchText && texts.length !== cchText * 2) { throw new Error("cchText: " + cchText + " != " + texts.length); } blob.l = s$5 + length; return { t: texts }; } catch (e$10) { blob.l = s$5 + length; return { t: texts }; } } function parse_HLink(blob, length) { var ref = parse_Ref8U(blob, 8); blob.l += 16; var hlink = parse_Hyperlink(blob, length - 24); return [ref, hlink]; } function write_HLink(hl) { var O = new_buf(24); var ref = decode_cell(hl[0]); O.write_shift(2, ref.r); O.write_shift(2, ref.r); O.write_shift(2, ref.c); O.write_shift(2, ref.c); var clsid = "d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "); for (var i$7 = 0; i$7 < 16; ++i$7) O.write_shift(1, parseInt(clsid[i$7], 16)); return bconcat([O, write_Hyperlink(hl[1])]); } function parse_HLinkTooltip(blob, length) { blob.read_shift(2); var ref = parse_Ref8U(blob, 8); var wzTooltip = blob.read_shift((length - 10) / 2, "dbcs-cont"); wzTooltip = wzTooltip.replace(chr0, ""); return [ref, wzTooltip]; } function write_HLinkTooltip(hl) { var TT = hl[1].Tooltip; var O = new_buf(10 + 2 * (TT.length + 1)); O.write_shift(2, 2048); var ref = decode_cell(hl[0]); O.write_shift(2, ref.r); O.write_shift(2, ref.r); O.write_shift(2, ref.c); O.write_shift(2, ref.c); for (var i$7 = 0; i$7 < TT.length; ++i$7) O.write_shift(2, TT.charCodeAt(i$7)); O.write_shift(2, 0); return O; } function parse_Country(blob) { var o$10 = [0, 0], d$5; d$5 = blob.read_shift(2); o$10[0] = CountryEnum[d$5] || d$5; d$5 = blob.read_shift(2); o$10[1] = CountryEnum[d$5] || d$5; return o$10; } function write_Country(o$10) { if (!o$10) o$10 = new_buf(4); o$10.write_shift(2, 1); o$10.write_shift(2, 1); return o$10; } function parse_ClrtClient(blob) { var ccv = blob.read_shift(2); var o$10 = []; while (ccv-- > 0) o$10.push(parse_LongRGB(blob, 8)); return o$10; } function parse_Palette(blob) { var ccv = blob.read_shift(2); var o$10 = []; while (ccv-- > 0) o$10.push(parse_LongRGB(blob, 8)); return o$10; } function parse_XFCRC(blob) { blob.l += 2; var o$10 = { cxfs: 0, crc: 0 }; o$10.cxfs = blob.read_shift(2); o$10.crc = blob.read_shift(4); return o$10; } function parse_ColInfo(blob, length, opts) { if (!opts.cellStyles) return parsenoop(blob, length); var w$2 = opts && opts.biff >= 12 ? 4 : 2; var colFirst = blob.read_shift(w$2); var colLast = blob.read_shift(w$2); var coldx = blob.read_shift(w$2); var ixfe = blob.read_shift(w$2); var flags = blob.read_shift(2); if (w$2 == 2) blob.l += 2; var o$10 = { s: colFirst, e: colLast, w: coldx, ixfe, flags }; if (opts.biff >= 5 || !opts.biff) o$10.level = flags >> 8 & 7; return o$10; } function write_ColInfo(col, idx) { var o$10 = new_buf(12); o$10.write_shift(2, idx); o$10.write_shift(2, idx); o$10.write_shift(2, col.width * 256); o$10.write_shift(2, 0); var f$4 = 0; if (col.hidden) f$4 |= 1; o$10.write_shift(1, f$4); f$4 = col.level || 0; o$10.write_shift(1, f$4); o$10.write_shift(2, 0); return o$10; } function parse_Setup(blob, length) { var o$10 = {}; if (length < 32) return o$10; blob.l += 16; o$10.header = parse_Xnum(blob, 8); o$10.footer = parse_Xnum(blob, 8); blob.l += 2; return o$10; } function parse_ShtProps(blob, length, opts) { var def = { area: false }; if (opts.biff != 5) { blob.l += length; return def; } var d$5 = blob.read_shift(1); blob.l += 3; if (d$5 & 16) def.area = true; return def; } function write_RRTabId(n$9) { var out = new_buf(2 * n$9); for (var i$7 = 0; i$7 < n$9; ++i$7) out.write_shift(2, i$7 + 1); return out; } function parse_ImData(blob) { var cf = blob.read_shift(2); var env = blob.read_shift(2); var lcb = blob.read_shift(4); var o$10 = { fmt: cf, env, len: lcb, data: blob.slice(blob.l, blob.l + lcb) }; blob.l += lcb; return o$10; } function write_BIFF2Cell(out, r$10, c$7, ixfe, ifmt) { if (!out) out = new_buf(7); out.write_shift(2, r$10); out.write_shift(2, c$7); out.write_shift(1, ixfe || 0); out.write_shift(1, ifmt || 0); out.write_shift(1, 0); return out; } function parse_BIFF2STR(blob, length, opts) { if (opts.biffguess && opts.biff == 5) opts.biff = 2; var cell = parse_XLSCell(blob, 7, opts); var str = parse_XLUnicodeString2(blob, length - 7, opts); cell.t = "str"; cell.val = str; return cell; } function parse_BIFF2NUM(blob, length, opts) { var cell = parse_XLSCell(blob, 7, opts); var num = parse_Xnum(blob, 8); cell.t = "n"; cell.val = num; return cell; } function write_BIFF2NUM(r$10, c$7, val$1, ixfe, ifmt) { var out = new_buf(15); write_BIFF2Cell(out, r$10, c$7, ixfe || 0, ifmt || 0); out.write_shift(8, val$1, "f"); return out; } function parse_BIFF2INT(blob, length, opts) { var cell = parse_XLSCell(blob, 7, opts); var num = blob.read_shift(2); cell.t = "n"; cell.val = num; return cell; } function write_BIFF2INT(r$10, c$7, val$1, ixfe, ifmt) { var out = new_buf(9); write_BIFF2Cell(out, r$10, c$7, ixfe || 0, ifmt || 0); out.write_shift(2, val$1); return out; } function parse_BIFF2STRING(blob) { var cch = blob.read_shift(1); if (cch === 0) { blob.l++; return ""; } return blob.read_shift(cch, "sbcs-cont"); } function parse_BIFF2BOOLERR(blob, length, opts) { var bestart = blob.l + 7; var cell = parse_XLSCell(blob, 6, opts); blob.l = bestart; var val$1 = parse_Bes(blob, 2); cell.val = val$1; cell.t = val$1 === true || val$1 === false ? "b" : "e"; return cell; } function parse_BIFF2FONTXTRA(blob, length) { blob.l += 6; blob.l += 2; blob.l += 1; blob.l += 3; blob.l += 1; blob.l += length - 13; } function parse_RString(blob, length, opts) { var end = blob.l + length; var cell = parse_XLSCell(blob, 6, opts); var cch = blob.read_shift(2); var str = parse_XLUnicodeStringNoCch(blob, cch, opts); blob.l = end; cell.t = "str"; cell.val = str; return cell; } function parse_BIFF4SheetInfo(blob) { var flags = blob.read_shift(4); var cch = blob.read_shift(1), name = blob.read_shift(cch, "sbcs"); if (name.length === 0) name = "Sheet1"; return { flags, name }; } function read_wb_ID(d$5, opts) { var o$10 = opts || {}, OLD_WTF = !!o$10.WTF; o$10.WTF = true; try { var out = SYLK.to_workbook(d$5, o$10); o$10.WTF = OLD_WTF; return out; } catch (e$10) { o$10.WTF = OLD_WTF; if (e$10.message.indexOf("SYLK bad record ID") == -1 && OLD_WTF) throw e$10; return PRN.to_workbook(d$5, opts); } } function parse_rpr(rpr) { var font = {}, m$3 = rpr.match(tagregex), i$7 = 0; var pass = false; if (m$3) for (; i$7 != m$3.length; ++i$7) { var y$3 = parsexmltag(m$3[i$7]); switch (y$3[0].replace(/<\w*:/g, "<")) { case "": case "": font.shadow = 1; break; case "": break; case "": case "": font.outline = 1; break; case "": break; case "": case "": font.strike = 1; break; case "": break; case "": case "": font.u = 1; break; case "": break; case "": case "": font.b = 1; break; case "": break; case "": case "": font.i = 1; break; case "": break; case "": case "": case "": break; case "": case "": case "": break; case "": case "": case "": break; case "": case "": case "": break; case "": case "": break; case "": pass = false; break; default: if (y$3[0].charCodeAt(1) !== 47 && !pass) throw new Error("Unrecognized rich format " + y$3[0]); } } return font; } function parse_si(x$2, opts) { var html = opts ? opts.cellHTML : true; var z$2 = {}; if (!x$2) return { t: "" }; if (x$2.match(/^\s*<(?:\w+:)?t[^>]*>/)) { z$2.t = unescapexml(utf8read(x$2.slice(x$2.indexOf(">") + 1).split(/<\/(?:\w+:)?t>/)[0] || ""), true); z$2.r = utf8read(x$2); if (html) z$2.h = escapehtml(z$2.t); } else if (x$2.match(sirregex)) { z$2.r = utf8read(x$2); z$2.t = unescapexml(utf8read((str_remove_xml_ns_g(x$2, "rPh").match(sitregex) || []).join("").replace(tagregex, "")), true); if (html) z$2.h = rs_to_html(parse_rs(z$2.r)); } return z$2; } function parse_sst_xml(data, opts) { var s$5 = [], ss = ""; if (!data) return s$5; var sst = str_match_xml_ns(data, "sst"); if (sst) { ss = sst[1].replace(sstr1, "").split(sstr2); for (var i$7 = 0; i$7 != ss.length; ++i$7) { var o$10 = parse_si(ss[i$7].trim(), opts); if (o$10 != null) s$5[s$5.length] = o$10; } sst = parsexmltag(sst[0].slice(0, sst[0].indexOf(">"))); s$5.Count = sst.count; s$5.Unique = sst.uniqueCount; } return s$5; } function write_sst_xml(sst, opts) { if (!opts.bookSST) return ""; var o$10 = [XML_HEADER]; o$10[o$10.length] = writextag("sst", null, { xmlns: XMLNS_main[0], count: sst.Count, uniqueCount: sst.Unique }); for (var i$7 = 0; i$7 != sst.length; ++i$7) { if (sst[i$7] == null) continue; var s$5 = sst[i$7]; var sitag = ""; if (s$5.r) sitag += s$5.r; else { sitag += ""; } sitag += ""; o$10[o$10.length] = sitag; } if (o$10.length > 2) { o$10[o$10.length] = ""; o$10[1] = o$10[1].replace("/>", ">"); } return o$10.join(""); } function parse_BrtBeginSst(data) { return [data.read_shift(4), data.read_shift(4)]; } function parse_sst_bin(data, opts) { var s$5 = []; var pass = false; recordhopper(data, function hopper_sst(val$1, R$1, RT) { switch (RT) { case 159: s$5.Count = val$1[0]; s$5.Unique = val$1[1]; break; case 19: s$5.push(val$1); break; case 160: return true; case 35: pass = true; break; case 36: pass = false; break; default: if (R$1.T) {} if (!pass || opts.WTF) throw new Error("Unexpected record 0x" + RT.toString(16)); } }); return s$5; } function write_BrtBeginSst(sst, o$10) { if (!o$10) o$10 = new_buf(8); o$10.write_shift(4, sst.Count); o$10.write_shift(4, sst.Unique); return o$10; } function write_sst_bin(sst) { var ba = buf_array(); write_record(ba, 159, write_BrtBeginSst(sst)); for (var i$7 = 0; i$7 < sst.length; ++i$7) write_record(ba, 19, write_BrtSSTItem(sst[i$7])); write_record(ba, 160); return ba.end(); } function _JS2ANSI(str) { if (typeof $cptable !== "undefined") return $cptable.utils.encode(current_ansi, str); var o$10 = [], oo = str.split(""); for (var i$7 = 0; i$7 < oo.length; ++i$7) o$10[i$7] = oo[i$7].charCodeAt(0); return o$10; } function parse_CRYPTOVersion(blob, length) { var o$10 = {}; o$10.Major = blob.read_shift(2); o$10.Minor = blob.read_shift(2); if (length >= 4) blob.l += length - 4; return o$10; } function parse_DataSpaceVersionInfo(blob) { var o$10 = {}; o$10.id = blob.read_shift(0, "lpp4"); o$10.R = parse_CRYPTOVersion(blob, 4); o$10.U = parse_CRYPTOVersion(blob, 4); o$10.W = parse_CRYPTOVersion(blob, 4); return o$10; } function parse_DataSpaceMapEntry(blob) { var len = blob.read_shift(4); var end = blob.l + len - 4; var o$10 = {}; var cnt = blob.read_shift(4); var comps = []; while (cnt-- > 0) comps.push({ t: blob.read_shift(4), v: blob.read_shift(0, "lpp4") }); o$10.name = blob.read_shift(0, "lpp4"); o$10.comps = comps; if (blob.l != end) throw new Error("Bad DataSpaceMapEntry: " + blob.l + " != " + end); return o$10; } function parse_DataSpaceMap(blob) { var o$10 = []; blob.l += 4; var cnt = blob.read_shift(4); while (cnt-- > 0) o$10.push(parse_DataSpaceMapEntry(blob)); return o$10; } function parse_DataSpaceDefinition(blob) { var o$10 = []; blob.l += 4; var cnt = blob.read_shift(4); while (cnt-- > 0) o$10.push(blob.read_shift(0, "lpp4")); return o$10; } function parse_TransformInfoHeader(blob) { var o$10 = {}; blob.read_shift(4); blob.l += 4; o$10.id = blob.read_shift(0, "lpp4"); o$10.name = blob.read_shift(0, "lpp4"); o$10.R = parse_CRYPTOVersion(blob, 4); o$10.U = parse_CRYPTOVersion(blob, 4); o$10.W = parse_CRYPTOVersion(blob, 4); return o$10; } function parse_Primary(blob) { var hdr = parse_TransformInfoHeader(blob); hdr.ename = blob.read_shift(0, "8lpp4"); hdr.blksz = blob.read_shift(4); hdr.cmode = blob.read_shift(4); if (blob.read_shift(4) != 4) throw new Error("Bad !Primary record"); return hdr; } function parse_EncryptionHeader(blob, length) { var tgt = blob.l + length; var o$10 = {}; o$10.Flags = blob.read_shift(4) & 63; blob.l += 4; o$10.AlgID = blob.read_shift(4); var valid = false; switch (o$10.AlgID) { case 26126: case 26127: case 26128: valid = o$10.Flags == 36; break; case 26625: valid = o$10.Flags == 4; break; case 0: valid = o$10.Flags == 16 || o$10.Flags == 4 || o$10.Flags == 36; break; default: throw "Unrecognized encryption algorithm: " + o$10.AlgID; } if (!valid) throw new Error("Encryption Flags/AlgID mismatch"); o$10.AlgIDHash = blob.read_shift(4); o$10.KeySize = blob.read_shift(4); o$10.ProviderType = blob.read_shift(4); blob.l += 8; o$10.CSPName = blob.read_shift(tgt - blob.l >> 1, "utf16le"); blob.l = tgt; return o$10; } function parse_EncryptionVerifier(blob, length) { var o$10 = {}, tgt = blob.l + length; blob.l += 4; o$10.Salt = blob.slice(blob.l, blob.l + 16); blob.l += 16; o$10.Verifier = blob.slice(blob.l, blob.l + 16); blob.l += 16; blob.read_shift(4); o$10.VerifierHash = blob.slice(blob.l, tgt); blob.l = tgt; return o$10; } function parse_EncryptionInfo(blob) { var vers = parse_CRYPTOVersion(blob); switch (vers.Minor) { case 2: return [vers.Minor, parse_EncInfoStd(blob, vers)]; case 3: return [vers.Minor, parse_EncInfoExt(blob, vers)]; case 4: return [vers.Minor, parse_EncInfoAgl(blob, vers)]; } throw new Error("ECMA-376 Encrypted file unrecognized Version: " + vers.Minor); } function parse_EncInfoStd(blob) { var flags = blob.read_shift(4); if ((flags & 63) != 36) throw new Error("EncryptionInfo mismatch"); var sz = blob.read_shift(4); var hdr = parse_EncryptionHeader(blob, sz); var verifier = parse_EncryptionVerifier(blob, blob.length - blob.l); return { t: "Std", h: hdr, v: verifier }; } function parse_EncInfoExt() { throw new Error("File is password-protected: ECMA-376 Extensible"); } function parse_EncInfoAgl(blob) { var KeyData = [ "saltSize", "blockSize", "keyBits", "hashSize", "cipherAlgorithm", "cipherChaining", "hashAlgorithm", "saltValue" ]; blob.l += 4; var xml$2 = blob.read_shift(blob.length - blob.l, "utf8"); var o$10 = {}; xml$2.replace(tagregex, function xml_agile(x$2) { var y$3 = parsexmltag(x$2); switch (strip_ns(y$3[0])) { case "": break; case "": case "": break; case "": break; case " 4 || vers.Major < 2) throw new Error("unrecognized major version code: " + vers.Major); o$10.Flags = blob.read_shift(4); length -= 4; var sz = blob.read_shift(4); length -= 4; o$10.EncryptionHeader = parse_EncryptionHeader(blob, sz); length -= sz; o$10.EncryptionVerifier = parse_EncryptionVerifier(blob, length); return o$10; } function parse_RC4Header(blob) { var o$10 = {}; var vers = o$10.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4); if (vers.Major != 1 || vers.Minor != 1) throw "unrecognized version code " + vers.Major + " : " + vers.Minor; o$10.Salt = blob.read_shift(16); o$10.EncryptedVerifier = blob.read_shift(16); o$10.EncryptedVerifierHash = blob.read_shift(16); return o$10; } function crypto_CreatePasswordVerifier_Method1(Password) { var Verifier = 0, PasswordArray; var PasswordDecoded = _JS2ANSI(Password); var len = PasswordDecoded.length + 1, i$7, PasswordByte; var Intermediate1, Intermediate2, Intermediate3; PasswordArray = new_raw_buf(len); PasswordArray[0] = PasswordDecoded.length; for (i$7 = 1; i$7 != len; ++i$7) PasswordArray[i$7] = PasswordDecoded[i$7 - 1]; for (i$7 = len - 1; i$7 >= 0; --i$7) { PasswordByte = PasswordArray[i$7]; Intermediate1 = (Verifier & 16384) === 0 ? 0 : 1; Intermediate2 = Verifier << 1 & 32767; Intermediate3 = Intermediate1 | Intermediate2; Verifier = Intermediate3 ^ PasswordByte; } return Verifier ^ 52811; } function parse_XORObfuscation(blob, length, opts, out) { var o$10 = { key: parseuint16(blob), verificationBytes: parseuint16(blob) }; if (opts.password) o$10.verifier = crypto_CreatePasswordVerifier_Method1(opts.password); out.valid = o$10.verificationBytes === o$10.verifier; if (out.valid) out.insitu = crypto_MakeXorDecryptor(opts.password); return o$10; } function parse_FilePassHeader(blob, length, oo) { var o$10 = oo || {}; o$10.Info = blob.read_shift(2); blob.l -= 2; if (o$10.Info === 1) o$10.Data = parse_RC4Header(blob, length); else o$10.Data = parse_RC4CryptoHeader(blob, length); return o$10; } function parse_FilePass(blob, length, opts) { var o$10 = { Type: opts.biff >= 8 ? blob.read_shift(2) : 0 }; if (o$10.Type) parse_FilePassHeader(blob, length - 2, o$10); else parse_XORObfuscation(blob, opts.biff >= 8 ? length : length - 2, opts, o$10); return o$10; } function rtf_to_sheet(d$5, opts) { switch (opts.type) { case "base64": return rtf_to_sheet_str(Base64_decode(d$5), opts); case "binary": return rtf_to_sheet_str(d$5, opts); case "buffer": return rtf_to_sheet_str(has_buf && Buffer.isBuffer(d$5) ? d$5.toString("binary") : a2s(d$5), opts); case "array": return rtf_to_sheet_str(cc2str(d$5), opts); } throw new Error("Unrecognized type " + opts.type); } function rtf_to_sheet_str(str, opts) { var o$10 = opts || {}; var ws = {}; var dense = o$10.dense; if (dense) ws["!data"] = []; var rows = str_match_ng(str, "\\trowd", "\\row"); if (!rows) throw new Error("RTF missing table"); var range = { s: { c: 0, r: 0 }, e: { c: 0, r: rows.length - 1 } }; var row = []; rows.forEach(function(rowtf, R$1) { if (dense) row = ws["!data"][R$1] = []; var rtfre = /\\[\w\-]+\b/g; var last_index = 0; var res; var C$2 = -1; var payload = []; while ((res = rtfre.exec(rowtf)) != null) { var data = rowtf.slice(last_index, rtfre.lastIndex - res[0].length); if (data.charCodeAt(0) == 32) data = data.slice(1); if (data.length) payload.push(data); switch (res[0]) { case "\\cell": ++C$2; if (payload.length) { var cell = { v: payload.join(""), t: "s" }; if (cell.v == "TRUE" || cell.v == "FALSE") { cell.v = cell.v == "TRUE"; cell.t = "b"; } else if (!isNaN(fuzzynum(cell.v))) { cell.t = "n"; if (o$10.cellText !== false) cell.w = cell.v; cell.v = fuzzynum(cell.v); } else if (RBErr[cell.v] != null) { cell.t = "e"; cell.w = cell.v; cell.v = RBErr[cell.v]; } if (dense) row[C$2] = cell; else ws[encode_cell({ r: R$1, c: C$2 })] = cell; } payload = []; break; case "\\par": payload.push("\n"); break; } last_index = rtfre.lastIndex; } if (C$2 > range.e.c) range.e.c = C$2; }); ws["!ref"] = encode_range(range); return ws; } function rtf_to_workbook(d$5, opts) { var wb = sheet_to_workbook(rtf_to_sheet(d$5, opts), opts); wb.bookType = "rtf"; return wb; } function sheet_to_rtf(ws, opts) { var o$10 = ["{\\rtf1\\ansi"]; if (!ws["!ref"]) return o$10[0] + "}"; var r$10 = safe_decode_range(ws["!ref"]), cell; var dense = ws["!data"] != null, row = []; for (var R$1 = r$10.s.r; R$1 <= r$10.e.r; ++R$1) { o$10.push("\\trowd\\trautofit1"); for (var C$2 = r$10.s.c; C$2 <= r$10.e.c; ++C$2) o$10.push("\\cellx" + (C$2 + 1)); o$10.push("\\pard\\intbl"); if (dense) row = ws["!data"][R$1] || []; for (C$2 = r$10.s.c; C$2 <= r$10.e.c; ++C$2) { var coord = encode_cell({ r: R$1, c: C$2 }); cell = dense ? row[C$2] : ws[coord]; if (!cell || cell.v == null && (!cell.f || cell.F)) { o$10.push(" \\cell"); continue; } o$10.push(" " + (cell.w || (format_cell(cell), cell.w) || "").replace(/[\r\n]/g, "\\par ")); o$10.push("\\cell"); } o$10.push("\\pard\\intbl\\row"); } return o$10.join("") + "}"; } function hex2RGB(h$5) { var o$10 = h$5.slice(h$5[0] === "#" ? 1 : 0).slice(0, 6); return [ parseInt(o$10.slice(0, 2), 16), parseInt(o$10.slice(2, 4), 16), parseInt(o$10.slice(4, 6), 16) ]; } function rgb2Hex(rgb) { for (var i$7 = 0, o$10 = 1; i$7 != 3; ++i$7) o$10 = o$10 * 256 + (rgb[i$7] > 255 ? 255 : rgb[i$7] < 0 ? 0 : rgb[i$7]); return o$10.toString(16).toUpperCase().slice(1); } function rgb2HSL(rgb) { var R$1 = rgb[0] / 255, G$1 = rgb[1] / 255, B$2 = rgb[2] / 255; var M$3 = Math.max(R$1, G$1, B$2), m$3 = Math.min(R$1, G$1, B$2), C$2 = M$3 - m$3; if (C$2 === 0) return [ 0, 0, R$1 ]; var H6 = 0, S$4 = 0, L2 = M$3 + m$3; S$4 = C$2 / (L2 > 1 ? 2 - L2 : L2); switch (M$3) { case R$1: H6 = ((G$1 - B$2) / C$2 + 6) % 6; break; case G$1: H6 = (B$2 - R$1) / C$2 + 2; break; case B$2: H6 = (R$1 - G$1) / C$2 + 4; break; } return [ H6 / 6, S$4, L2 / 2 ]; } function hsl2RGB(hsl) { var H$1 = hsl[0], S$4 = hsl[1], L$2 = hsl[2]; var C$2 = S$4 * 2 * (L$2 < .5 ? L$2 : 1 - L$2), m$3 = L$2 - C$2 / 2; var rgb = [ m$3, m$3, m$3 ], h6 = 6 * H$1; var X$2; if (S$4 !== 0) switch (h6 | 0) { case 0: case 6: X$2 = C$2 * h6; rgb[0] += C$2; rgb[1] += X$2; break; case 1: X$2 = C$2 * (2 - h6); rgb[0] += X$2; rgb[1] += C$2; break; case 2: X$2 = C$2 * (h6 - 2); rgb[1] += C$2; rgb[2] += X$2; break; case 3: X$2 = C$2 * (4 - h6); rgb[1] += X$2; rgb[2] += C$2; break; case 4: X$2 = C$2 * (h6 - 4); rgb[2] += C$2; rgb[0] += X$2; break; case 5: X$2 = C$2 * (6 - h6); rgb[2] += X$2; rgb[0] += C$2; break; } for (var i$7 = 0; i$7 != 3; ++i$7) rgb[i$7] = Math.round(rgb[i$7] * 255); return rgb; } function rgb_tint(hex, tint) { if (tint === 0) return hex; var hsl = rgb2HSL(hex2RGB(hex)); if (tint < 0) hsl[2] = hsl[2] * (1 + tint); else hsl[2] = 1 - (1 - hsl[2]) * (1 - tint); return rgb2Hex(hsl2RGB(hsl)); } function width2px(width) { return Math.floor((width + Math.round(128 / MDW) / 256) * MDW); } function px2char(px) { return Math.floor((px - 5) / MDW * 100 + .5) / 100; } function char2width(chr) { return Math.round((chr * MDW + 5) / MDW * 256) / 256; } function cycle_width(collw) { return char2width(px2char(width2px(collw))); } function find_mdw_colw(collw) { var delta = Math.abs(collw - cycle_width(collw)), _MDW = MDW; if (delta > .005) { for (MDW = MIN_MDW; MDW < MAX_MDW; ++MDW) if (Math.abs(collw - cycle_width(collw)) <= delta) { delta = Math.abs(collw - cycle_width(collw)); _MDW = MDW; } } MDW = _MDW; } function process_col(coll) { if (coll.width) { coll.wpx = width2px(coll.width); coll.wch = px2char(coll.wpx); coll.MDW = MDW; } else if (coll.wpx) { coll.wch = px2char(coll.wpx); coll.width = char2width(coll.wch); coll.MDW = MDW; } else if (typeof coll.wch == "number") { coll.width = char2width(coll.wch); coll.wpx = width2px(coll.width); coll.MDW = MDW; } if (coll.customWidth) delete coll.customWidth; } function px2pt(px) { return px * 96 / PPI; } function pt2px(pt) { return pt * PPI / 96; } function parse_borders(t$6, styles$1, themes, opts) { styles$1.Borders = []; var border = {}; var pass = false; (t$6.match(tagregex) || []).forEach(function(x$2) { var y$3 = parsexmltag(x$2); switch (strip_ns(y$3[0])) { case "": case "": break; case "": case "": border = {}; if (y$3.diagonalUp) border.diagonalUp = parsexmlbool(y$3.diagonalUp); if (y$3.diagonalDown) border.diagonalDown = parsexmlbool(y$3.diagonalDown); styles$1.Borders.push(border); break; case "": break; case "": break; case "": break; case "": break; case "": break; case "": break; case "": break; case "": break; case "": break; case "": break; case "": break; case "": break; case "": break; case "": case "": break; case "": break; case "": case "": break; case "": break; case "": case "": break; case "": break; case "": case "": break; case "": break; case "": case "": break; case "": break; case "": break; case "": case "": break; case "": case "": break; case "": pass = false; break; default: if (opts && opts.WTF) { if (!pass) throw new Error("unrecognized " + y$3[0] + " in borders"); } } }); } function parse_fills(t$6, styles$1, themes, opts) { styles$1.Fills = []; var fill$1 = {}; var pass = false; (t$6.match(tagregex) || []).forEach(function(x$2) { var y$3 = parsexmltag(x$2); switch (strip_ns(y$3[0])) { case "": case "": break; case "": case "": fill$1 = {}; styles$1.Fills.push(fill$1); break; case "": break; case "": break; case "": styles$1.Fills.push(fill$1); fill$1 = {}; break; case "": if (y$3.patternType) fill$1.patternType = y$3.patternType; break; case "": case "": break; case "": case "": break; case "": case "": break; case "": break; case "": break; case "": break; case "": break; case "": case "": break; case "": pass = false; break; default: if (opts && opts.WTF) { if (!pass) throw new Error("unrecognized " + y$3[0] + " in fills"); } } }); } function parse_fonts(t$6, styles$1, themes, opts) { styles$1.Fonts = []; var font = {}; var pass = false; (t$6.match(tagregex) || []).forEach(function(x$2) { var y$3 = parsexmltag(x$2); switch (strip_ns(y$3[0])) { case "": case "": break; case "": break; case "": case "": styles$1.Fonts.push(font); font = {}; break; case "": case "": break; case "": font.bold = 1; break; case "": case "": font.italic = 1; break; case "": case "": font.underline = 1; break; case "": case "": font.strike = 1; break; case "": case "": font.outline = 1; break; case "": case "": font.shadow = 1; break; case "": case "": font.condense = 1; break; case "": case "": font.extend = 1; break; case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": break; case "": pass = false; break; default: if (opts && opts.WTF) { if (!pass) throw new Error("unrecognized " + y$3[0] + " in fonts"); } } }); } function parse_numFmts(t$6, styles$1, opts) { styles$1.NumberFmt = []; var k$2 = keys(table_fmt); for (var i$7 = 0; i$7 < k$2.length; ++i$7) styles$1.NumberFmt[k$2[i$7]] = table_fmt[k$2[i$7]]; var m$3 = t$6.match(tagregex); if (!m$3) return; for (i$7 = 0; i$7 < m$3.length; ++i$7) { var y$3 = parsexmltag(m$3[i$7]); switch (strip_ns(y$3[0])) { case "": case "": case "": break; case " 0) { if (j$2 > 392) { for (j$2 = 392; j$2 > 60; --j$2) if (styles$1.NumberFmt[j$2] == null) break; styles$1.NumberFmt[j$2] = f$4; } SSF__load(f$4, j$2); } } break; case "": break; default: if (opts.WTF) throw new Error("unrecognized " + y$3[0] + " in numFmts"); } } } function write_numFmts(NF) { var o$10 = [""]; [ [5, 8], [23, 26], [41, 44], [50, 392] ].forEach(function(r$10) { for (var i$7 = r$10[0]; i$7 <= r$10[1]; ++i$7) if (NF[i$7] != null) o$10[o$10.length] = writextag("numFmt", null, { numFmtId: i$7, formatCode: escapexml(NF[i$7]) }); }); if (o$10.length === 1) return ""; o$10[o$10.length] = ""; o$10[0] = writextag("numFmts", null, { count: o$10.length - 2 }).replace("/>", ">"); return o$10.join(""); } function parse_cellXfs(t$6, styles$1, opts) { styles$1.CellXf = []; var xf; var pass = false; (t$6.match(tagregex) || []).forEach(function(x$2) { var y$3 = parsexmltag(x$2), i$7 = 0; switch (strip_ns(y$3[0])) { case "": case "": case "": break; case "": case "": xf = y$3; delete xf[0]; for (i$7 = 0; i$7 < cellXF_uint.length; ++i$7) if (xf[cellXF_uint[i$7]]) xf[cellXF_uint[i$7]] = parseInt(xf[cellXF_uint[i$7]], 10); for (i$7 = 0; i$7 < cellXF_bool.length; ++i$7) if (xf[cellXF_bool[i$7]]) xf[cellXF_bool[i$7]] = parsexmlbool(xf[cellXF_bool[i$7]]); if (styles$1.NumberFmt && xf.numFmtId > 392) { for (i$7 = 392; i$7 > 60; --i$7) if (styles$1.NumberFmt[xf.numFmtId] == styles$1.NumberFmt[i$7]) { xf.numFmtId = i$7; break; } } styles$1.CellXf.push(xf); break; case "": break; case "": case "": var alignment = {}; if (y$3.vertical) alignment.vertical = y$3.vertical; if (y$3.horizontal) alignment.horizontal = y$3.horizontal; if (y$3.textRotation != null) alignment.textRotation = y$3.textRotation; if (y$3.indent) alignment.indent = y$3.indent; if (y$3.wrapText) alignment.wrapText = parsexmlbool(y$3.wrapText); xf.alignment = alignment; break; case "": break; case "": break; case "": case "": break; case "": pass = true; break; case "": pass = false; break; case "": case "": break; case "": pass = false; break; default: if (opts && opts.WTF) { if (!pass) throw new Error("unrecognized " + y$3[0] + " in cellXfs"); } } }); } function write_cellXfs(cellXfs) { var o$10 = []; o$10[o$10.length] = writextag("cellXfs", null); cellXfs.forEach(function(c$7) { o$10[o$10.length] = writextag("xf", null, c$7); }); o$10[o$10.length] = ""; if (o$10.length === 2) return ""; o$10[0] = writextag("cellXfs", null, { count: o$10.length - 2 }).replace("/>", ">"); return o$10.join(""); } function write_sty_xml(wb, opts) { var o$10 = [XML_HEADER, writextag("styleSheet", null, { "xmlns": XMLNS_main[0], "xmlns:vt": XMLNS.vt })], w$2; if (wb.SSF && (w$2 = write_numFmts(wb.SSF)) != null) o$10[o$10.length] = w$2; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; if (w$2 = write_cellXfs(opts.cellXfs)) o$10[o$10.length] = w$2; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; if (o$10.length > 2) { o$10[o$10.length] = ""; o$10[1] = o$10[1].replace("/>", ">"); } return o$10.join(""); } function parse_BrtFmt(data, length) { var numFmtId = data.read_shift(2); var stFmtCode = parse_XLWideString(data, length - 2); return [numFmtId, stFmtCode]; } function write_BrtFmt(i$7, f$4, o$10) { if (!o$10) o$10 = new_buf(6 + 4 * f$4.length); o$10.write_shift(2, i$7); write_XLWideString(f$4, o$10); var out = o$10.length > o$10.l ? o$10.slice(0, o$10.l) : o$10; if (o$10.l == null) o$10.l = o$10.length; return out; } function parse_BrtFont(data, length, opts) { var out = {}; out.sz = data.read_shift(2) / 20; var grbit = parse_FontFlags(data, 2, opts); if (grbit.fItalic) out.italic = 1; if (grbit.fCondense) out.condense = 1; if (grbit.fExtend) out.extend = 1; if (grbit.fShadow) out.shadow = 1; if (grbit.fOutline) out.outline = 1; if (grbit.fStrikeout) out.strike = 1; var bls = data.read_shift(2); if (bls === 700) out.bold = 1; switch (data.read_shift(2)) { case 1: out.vertAlign = "superscript"; break; case 2: out.vertAlign = "subscript"; break; } var underline = data.read_shift(1); if (underline != 0) out.underline = underline; var family = data.read_shift(1); if (family > 0) out.family = family; var bCharSet = data.read_shift(1); if (bCharSet > 0) out.charset = bCharSet; data.l++; out.color = parse_BrtColor(data, 8); switch (data.read_shift(1)) { case 1: out.scheme = "major"; break; case 2: out.scheme = "minor"; break; } out.name = parse_XLWideString(data, length - 21); return out; } function write_BrtFont(font, o$10) { if (!o$10) o$10 = new_buf(25 + 4 * 32); o$10.write_shift(2, font.sz * 20); write_FontFlags(font, o$10); o$10.write_shift(2, font.bold ? 700 : 400); var sss = 0; if (font.vertAlign == "superscript") sss = 1; else if (font.vertAlign == "subscript") sss = 2; o$10.write_shift(2, sss); o$10.write_shift(1, font.underline || 0); o$10.write_shift(1, font.family || 0); o$10.write_shift(1, font.charset || 0); o$10.write_shift(1, 0); write_BrtColor(font.color, o$10); var scheme$1 = 0; if (font.scheme == "major") scheme$1 = 1; if (font.scheme == "minor") scheme$1 = 2; o$10.write_shift(1, scheme$1); write_XLWideString(font.name, o$10); return o$10.length > o$10.l ? o$10.slice(0, o$10.l) : o$10; } function write_BrtFill(fill$1, o$10) { if (!o$10) o$10 = new_buf(4 * 3 + 8 * 7 + 16 * 1); if (!rev_XLSBFillPTNames) rev_XLSBFillPTNames = evert(XLSBFillPTNames); var fls = rev_XLSBFillPTNames[fill$1.patternType]; if (fls == null) fls = 40; o$10.write_shift(4, fls); var j$2 = 0; if (fls != 40) { write_BrtColor({ auto: 1 }, o$10); write_BrtColor({ auto: 1 }, o$10); for (; j$2 < 12; ++j$2) o$10.write_shift(4, 0); } else { for (; j$2 < 4; ++j$2) o$10.write_shift(4, 0); for (; j$2 < 12; ++j$2) o$10.write_shift(4, 0); } return o$10.length > o$10.l ? o$10.slice(0, o$10.l) : o$10; } function parse_BrtXF(data, length) { var tgt = data.l + length; var ixfeParent = data.read_shift(2); var ifmt = data.read_shift(2); data.l = tgt; return { ixfe: ixfeParent, numFmtId: ifmt }; } function write_BrtXF(data, ixfeP, o$10) { if (!o$10) o$10 = new_buf(16); o$10.write_shift(2, ixfeP || 0); o$10.write_shift(2, data.numFmtId || 0); o$10.write_shift(2, 0); o$10.write_shift(2, 0); o$10.write_shift(2, 0); o$10.write_shift(1, 0); o$10.write_shift(1, 0); var flow = 0; o$10.write_shift(1, flow); o$10.write_shift(1, 0); o$10.write_shift(1, 0); o$10.write_shift(1, 0); return o$10; } function write_Blxf(data, o$10) { if (!o$10) o$10 = new_buf(10); o$10.write_shift(1, 0); o$10.write_shift(1, 0); o$10.write_shift(4, 0); o$10.write_shift(4, 0); return o$10; } function write_BrtBorder(border, o$10) { if (!o$10) o$10 = new_buf(51); o$10.write_shift(1, 0); write_Blxf(null, o$10); write_Blxf(null, o$10); write_Blxf(null, o$10); write_Blxf(null, o$10); write_Blxf(null, o$10); return o$10.length > o$10.l ? o$10.slice(0, o$10.l) : o$10; } function write_BrtStyle(style, o$10) { if (!o$10) o$10 = new_buf(12 + 4 * 10); o$10.write_shift(4, style.xfId); o$10.write_shift(2, 1); o$10.write_shift(1, +style.builtinId); o$10.write_shift(1, 0); write_XLNullableWideString(style.name || "", o$10); return o$10.length > o$10.l ? o$10.slice(0, o$10.l) : o$10; } function write_BrtBeginTableStyles(cnt, defTableStyle, defPivotStyle) { var o$10 = new_buf(4 + 256 * 2 * 4); o$10.write_shift(4, cnt); write_XLNullableWideString(defTableStyle, o$10); write_XLNullableWideString(defPivotStyle, o$10); return o$10.length > o$10.l ? o$10.slice(0, o$10.l) : o$10; } function parse_sty_bin(data, themes, opts) { var styles$1 = {}; styles$1.NumberFmt = []; for (var y$3 in table_fmt) styles$1.NumberFmt[y$3] = table_fmt[y$3]; styles$1.CellXf = []; styles$1.Fonts = []; var state$1 = []; var pass = false; recordhopper(data, function hopper_sty(val$1, R$1, RT) { switch (RT) { case 44: styles$1.NumberFmt[val$1[0]] = val$1[1]; SSF__load(val$1[1], val$1[0]); break; case 43: styles$1.Fonts.push(val$1); if (val$1.color.theme != null && themes && themes.themeElements && themes.themeElements.clrScheme) { val$1.color.rgb = rgb_tint(themes.themeElements.clrScheme[val$1.color.theme].rgb, val$1.color.tint || 0); } break; case 1025: break; case 45: break; case 46: break; case 47: if (state$1[state$1.length - 1] == 617) { styles$1.CellXf.push(val$1); } break; case 48: case 507: case 572: case 475: break; case 1171: case 2102: case 1130: case 512: case 2095: case 3072: break; case 35: pass = true; break; case 36: pass = false; break; case 37: state$1.push(RT); pass = true; break; case 38: state$1.pop(); pass = false; break; default: if (R$1.T > 0) state$1.push(RT); else if (R$1.T < 0) state$1.pop(); else if (!pass || opts.WTF && state$1[state$1.length - 1] != 37) throw new Error("Unexpected record 0x" + RT.toString(16)); } }); return styles$1; } function write_FMTS_bin(ba, NF) { if (!NF) return; var cnt = 0; [ [5, 8], [23, 26], [41, 44], [50, 392] ].forEach(function(r$10) { for (var i$7 = r$10[0]; i$7 <= r$10[1]; ++i$7) if (NF[i$7] != null) ++cnt; }); if (cnt == 0) return; write_record(ba, 615, write_UInt32LE(cnt)); [ [5, 8], [23, 26], [41, 44], [50, 392] ].forEach(function(r$10) { for (var i$7 = r$10[0]; i$7 <= r$10[1]; ++i$7) if (NF[i$7] != null) write_record(ba, 44, write_BrtFmt(i$7, NF[i$7])); }); write_record(ba, 616); } function write_FONTS_bin(ba) { var cnt = 1; if (cnt == 0) return; write_record(ba, 611, write_UInt32LE(cnt)); write_record(ba, 43, write_BrtFont({ sz: 12, color: { theme: 1 }, name: "Calibri", family: 2, scheme: "minor" })); write_record(ba, 612); } function write_FILLS_bin(ba) { var cnt = 2; if (cnt == 0) return; write_record(ba, 603, write_UInt32LE(cnt)); write_record(ba, 45, write_BrtFill({ patternType: "none" })); write_record(ba, 45, write_BrtFill({ patternType: "gray125" })); write_record(ba, 604); } function write_BORDERS_bin(ba) { var cnt = 1; if (cnt == 0) return; write_record(ba, 613, write_UInt32LE(cnt)); write_record(ba, 46, write_BrtBorder({})); write_record(ba, 614); } function write_CELLSTYLEXFS_bin(ba) { var cnt = 1; write_record(ba, 626, write_UInt32LE(cnt)); write_record(ba, 47, write_BrtXF({ numFmtId: 0, fontId: 0, fillId: 0, borderId: 0 }, 65535)); write_record(ba, 627); } function write_CELLXFS_bin(ba, data) { write_record(ba, 617, write_UInt32LE(data.length)); data.forEach(function(c$7) { write_record(ba, 47, write_BrtXF(c$7, 0)); }); write_record(ba, 618); } function write_STYLES_bin(ba) { var cnt = 1; write_record(ba, 619, write_UInt32LE(cnt)); write_record(ba, 48, write_BrtStyle({ xfId: 0, builtinId: 0, name: "Normal" })); write_record(ba, 620); } function write_DXFS_bin(ba) { var cnt = 0; write_record(ba, 505, write_UInt32LE(cnt)); write_record(ba, 506); } function write_TABLESTYLES_bin(ba) { var cnt = 0; write_record(ba, 508, write_BrtBeginTableStyles(cnt, "TableStyleMedium9", "PivotStyleMedium4")); write_record(ba, 509); } function write_COLORPALETTE_bin() { return; } function write_sty_bin(wb, opts) { var ba = buf_array(); write_record(ba, 278); write_FMTS_bin(ba, wb.SSF); write_FONTS_bin(ba, wb); write_FILLS_bin(ba, wb); write_BORDERS_bin(ba, wb); write_CELLSTYLEXFS_bin(ba, wb); write_CELLXFS_bin(ba, opts.cellXfs); write_STYLES_bin(ba, wb); write_DXFS_bin(ba, wb); write_TABLESTYLES_bin(ba, wb); write_COLORPALETTE_bin(ba, wb); write_record(ba, 279); return ba.end(); } function parse_clrScheme(t$6, themes, opts) { themes.themeElements.clrScheme = []; var color = {}; (t$6[0].match(tagregex) || []).forEach(function(x$2) { var y$3 = parsexmltag(x$2); switch (y$3[0]) { case "": break; case "": break; case "": break; case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": case "": if (y$3[0].charAt(1) === "/") { themes.themeElements.clrScheme[XLSXThemeClrScheme.indexOf(y$3[0])] = color; color = {}; } else { color.name = y$3[0].slice(3, y$3[0].length - 1); } break; default: if (opts && opts.WTF) throw new Error("Unrecognized " + y$3[0] + " in clrScheme"); } }); } function parse_fontScheme() {} function parse_fmtScheme() {} function parse_themeElements(data, themes, opts) { themes.themeElements = {}; var t$6; if (!(t$6 = str_match_xml(data, "a:clrScheme"))) throw new Error("clrScheme not found in themeElements"); parse_clrScheme(t$6, themes, opts); if (!(t$6 = str_match_xml(data, "a:fontScheme"))) throw new Error("fontScheme not found in themeElements"); parse_fontScheme(t$6, themes, opts); if (!(t$6 = str_match_xml(data, "a:fmtScheme"))) throw new Error("fmtScheme not found in themeElements"); parse_fmtScheme(t$6, themes, opts); } function parse_theme_xml(data, opts) { if (!data || data.length === 0) data = write_theme(); var t$6; var themes = {}; if (!(t$6 = str_match_xml(data, "a:themeElements"))) throw new Error("themeElements not found in theme"); parse_themeElements(t$6[0], themes, opts); themes.raw = data; return themes; } function write_theme(Themes, opts) { if (opts && opts.themeXLSX) return opts.themeXLSX; if (Themes && typeof Themes.raw == "string") return Themes.raw; var o$10 = [XML_HEADER]; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; o$10[o$10.length] = ""; return o$10.join(""); } function parse_Theme(blob, length, opts) { var end = blob.l + length; var dwThemeVersion = blob.read_shift(4); if (dwThemeVersion === 124226) return; if (!opts.cellStyles) { blob.l = end; return; } var data = blob.slice(blob.l); blob.l = end; var zip; try { zip = zip_read(data, { type: "array" }); } catch (e$10) { return; } var themeXML = getzipstr(zip, "theme/theme/theme1.xml", true); if (!themeXML) return; return parse_theme_xml(themeXML, opts); } function parse_ColorTheme(blob) { return blob.read_shift(4); } function parse_FullColorExt(blob) { var o$10 = {}; o$10.xclrType = blob.read_shift(2); o$10.nTintShade = blob.read_shift(2); switch (o$10.xclrType) { case 0: blob.l += 4; break; case 1: o$10.xclrValue = parse_IcvXF(blob, 4); break; case 2: o$10.xclrValue = parse_LongRGBA(blob, 4); break; case 3: o$10.xclrValue = parse_ColorTheme(blob, 4); break; case 4: blob.l += 4; break; } blob.l += 8; return o$10; } function parse_IcvXF(blob, length) { return parsenoop(blob, length); } function parse_XFExtGradient(blob, length) { return parsenoop(blob, length); } function parse_ExtProp(blob) { var extType = blob.read_shift(2); var cb = blob.read_shift(2) - 4; var o$10 = [extType]; switch (extType) { case 4: case 5: case 7: case 8: case 9: case 10: case 11: case 13: o$10[1] = parse_FullColorExt(blob, cb); break; case 6: o$10[1] = parse_XFExtGradient(blob, cb); break; case 14: case 15: o$10[1] = blob.read_shift(cb === 1 ? 1 : 2); break; default: throw new Error("Unrecognized ExtProp type: " + extType + " " + cb); } return o$10; } function parse_XFExt(blob, length) { var end = blob.l + length; blob.l += 2; var ixfe = blob.read_shift(2); blob.l += 2; var cexts = blob.read_shift(2); var ext = []; while (cexts-- > 0) ext.push(parse_ExtProp(blob, end - blob.l)); return { ixfe, ext }; } function update_xfext(xf, xfext) { xfext.forEach(function(xfe) { switch (xfe[0]) { case 4: break; case 5: break; case 6: break; case 7: break; case 8: break; case 9: break; case 10: break; case 11: break; case 13: break; case 14: break; case 15: break; } }); } function parse_BrtMdtinfo(data, length) { return { flags: data.read_shift(4), version: data.read_shift(4), name: parse_XLWideString(data, length - 8) }; } function write_BrtMdtinfo(data) { var o$10 = new_buf(12 + 2 * data.name.length); o$10.write_shift(4, data.flags); o$10.write_shift(4, data.version); write_XLWideString(data.name, o$10); return o$10.slice(0, o$10.l); } function parse_BrtMdb(data) { var out = []; var cnt = data.read_shift(4); while (cnt-- > 0) out.push([data.read_shift(4), data.read_shift(4)]); return out; } function write_BrtMdb(mdb) { var o$10 = new_buf(4 + 8 * mdb.length); o$10.write_shift(4, mdb.length); for (var i$7 = 0; i$7 < mdb.length; ++i$7) { o$10.write_shift(4, mdb[i$7][0]); o$10.write_shift(4, mdb[i$7][1]); } return o$10; } function write_BrtBeginEsfmd(cnt, name) { var o$10 = new_buf(8 + 2 * name.length); o$10.write_shift(4, cnt); write_XLWideString(name, o$10); return o$10.slice(0, o$10.l); } function parse_BrtBeginEsmdb(data) { data.l += 4; return data.read_shift(4) != 0; } function write_BrtBeginEsmdb(cnt, cm) { var o$10 = new_buf(8); o$10.write_shift(4, cnt); o$10.write_shift(4, cm ? 1 : 0); return o$10; } function parse_xlmeta_bin(data, name, _opts) { var out = { Types: [], Cell: [], Value: [] }; var opts = _opts || {}; var state$1 = []; var pass = false; var metatype = 2; recordhopper(data, function(val$1, R$1, RT) { switch (RT) { case 335: out.Types.push({ name: val$1.name }); break; case 51: val$1.forEach(function(r$10) { if (metatype == 1) out.Cell.push({ type: out.Types[r$10[0] - 1].name, index: r$10[1] }); else if (metatype == 0) out.Value.push({ type: out.Types[r$10[0] - 1].name, index: r$10[1] }); }); break; case 337: metatype = val$1 ? 1 : 0; break; case 338: metatype = 2; break; case 35: state$1.push(RT); pass = true; break; case 36: state$1.pop(); pass = false; break; default: if (R$1.T) {} else if (!pass || opts.WTF && state$1[state$1.length - 1] != 35) throw new Error("Unexpected record 0x" + RT.toString(16)); } }); return out; } function write_xlmeta_bin() { var ba = buf_array(); write_record(ba, 332); write_record(ba, 334, write_UInt32LE(1)); write_record(ba, 335, write_BrtMdtinfo({ name: "XLDAPR", version: 12e4, flags: 3496657072 })); write_record(ba, 336); write_record(ba, 339, write_BrtBeginEsfmd(1, "XLDAPR")); write_record(ba, 52); write_record(ba, 35, write_UInt32LE(514)); write_record(ba, 4096, write_UInt32LE(0)); write_record(ba, 4097, writeuint16(1)); write_record(ba, 36); write_record(ba, 53); write_record(ba, 340); write_record(ba, 337, write_BrtBeginEsmdb(1, true)); write_record(ba, 51, write_BrtMdb([[1, 0]])); write_record(ba, 338); write_record(ba, 333); return ba.end(); } function parse_xlmeta_xml(data, name, opts) { var out = { Types: [], Cell: [], Value: [] }; if (!data) return out; var pass = false; var metatype = 2; var lastmeta; data.replace(tagregex, function(x$2) { var y$3 = parsexmltag(x$2); switch (strip_ns(y$3[0])) { case "": break; case "": break; case "": break; case "": break; case "": break; case "": break; case "": break; case "": metatype = 2; break; case "": metatype = 2; break; case "": case "": case "": break; case "": pass = false; break; case "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n"); return o$10.join(""); } function parse_cc_xml(data) { var d$5 = []; if (!data) return d$5; var i$7 = 1; (data.match(tagregex) || []).forEach(function(x$2) { var y$3 = parsexmltag(x$2); switch (y$3[0]) { case "": case "": break; case "]*r:id="([^<>"]*)"/) || ["", ""])[1]; return rels["!id"][id].Target; } function parse_vml(data, sheet, comments) { var cidx = 0; (str_match_xml_ns_g(data, "shape") || []).forEach(function(m$3) { var type = ""; var hidden = true; var aidx = -1; var R$1 = -1, C$2 = -1; m$3.replace(tagregex, function(x$2, idx) { var y$3 = parsexmltag(x$2); switch (strip_ns(y$3[0])) { case "": hidden = false; break; case "": aidx = idx + x$2.length; break; case "": R$1 = +m$3.slice(aidx, idx).trim(); break; case "": aidx = idx + x$2.length; break; case "": C$2 = +m$3.slice(aidx, idx).trim(); break; } return ""; }); switch (type) { case "Note": var cell = ws_get_cell_stub(sheet, R$1 >= 0 && C$2 >= 0 ? encode_cell({ r: R$1, c: C$2 }) : comments[cidx].ref); if (cell.c) { cell.c.hidden = hidden; } ++cidx; break; } }); } function write_vml(rId, comments, ws) { var csize = [21600, 21600]; var bbox = [ "m0,0l0", csize[1], csize[0], csize[1], csize[0], "0xe" ].join(","); var o$10 = [writextag("xml", null, { "xmlns:v": XLMLNS.v, "xmlns:o": XLMLNS.o, "xmlns:x": XLMLNS.x, "xmlns:mv": XLMLNS.mv }).replace(/\/>/, ">"), writextag("o:shapelayout", writextag("o:idmap", null, { "v:ext": "edit", "data": rId }), { "v:ext": "edit" })]; var _shapeid = 65536 * rId; var _comments = comments || []; if (_comments.length > 0) o$10.push(writextag("v:shapetype", [writextag("v:stroke", null, { joinstyle: "miter" }), writextag("v:path", null, { gradientshapeok: "t", "o:connecttype": "rect" })].join(""), { id: "_x0000_t202", coordsize: csize.join(","), "o:spt": 202, path: bbox })); _comments.forEach(function(x$2) { ++_shapeid; o$10.push(write_vml_comment(x$2, _shapeid)); }); o$10.push(""); return o$10.join(""); } function write_vml_comment(x$2, _shapeid, ws) { var c$7 = decode_cell(x$2[0]); var fillopts = { "color2": "#BEFF82", "type": "gradient" }; if (fillopts.type == "gradient") fillopts.angle = "-180"; var fillparm = fillopts.type == "gradient" ? writextag("o:fill", null, { type: "gradientUnscaled", "v:ext": "view" }) : null; var fillxml = writextag("v:fill", fillparm, fillopts); var shadata = { on: "t", "obscured": "t" }; return [ "", fillxml, writextag("v:shadow", null, shadata), writextag("v:path", null, { "o:connecttype": "none" }), "
", "", "", "", writetag("x:Anchor", [ c$7.c + 1, 0, c$7.r + 1, 0, c$7.c + 3, 20, c$7.r + 5, 20 ].join(",")), writetag("x:AutoFill", "False"), writetag("x:Row", String(c$7.r)), writetag("x:Column", String(c$7.c)), x$2[1].hidden ? "" : "", "", "" ].join(""); } function sheet_insert_comments(sheet, comments, threaded, people) { var dense = sheet["!data"] != null; var cell; comments.forEach(function(comment) { var r$10 = decode_cell(comment.ref); if (r$10.r < 0 || r$10.c < 0) return; if (dense) { if (!sheet["!data"][r$10.r]) sheet["!data"][r$10.r] = []; cell = sheet["!data"][r$10.r][r$10.c]; } else cell = sheet[comment.ref]; if (!cell) { cell = { t: "z" }; if (dense) sheet["!data"][r$10.r][r$10.c] = cell; else sheet[comment.ref] = cell; var range = safe_decode_range(sheet["!ref"] || "BDWGO1000001:A1"); if (range.s.r > r$10.r) range.s.r = r$10.r; if (range.e.r < r$10.r) range.e.r = r$10.r; if (range.s.c > r$10.c) range.s.c = r$10.c; if (range.e.c < r$10.c) range.e.c = r$10.c; var encoded = encode_range(range); sheet["!ref"] = encoded; } if (!cell.c) cell.c = []; var o$10 = { a: comment.author, t: comment.t, r: comment.r, T: threaded }; if (comment.h) o$10.h = comment.h; for (var i$7 = cell.c.length - 1; i$7 >= 0; --i$7) { if (!threaded && cell.c[i$7].T) return; if (threaded && !cell.c[i$7].T) cell.c.splice(i$7, 1); } if (threaded && people) for (i$7 = 0; i$7 < people.length; ++i$7) { if (o$10.a == people[i$7].id) { o$10.a = people[i$7].name || o$10.a; break; } } cell.c.push(o$10); }); } function parse_comments_xml(data, opts) { if (data.match(/<(?:\w+:)?comments *\/>/)) return []; var authors = []; var commentList = []; var authtag = str_match_xml_ns(data, "authors"); if (authtag && authtag[1]) authtag[1].split(/<\/\w*:?author>/).forEach(function(x$2) { if (x$2 === "" || x$2.trim() === "") return; var a$2 = x$2.match(/<(?:\w+:)?author[^<>]*>(.*)/); if (a$2) authors.push(a$2[1]); }); var cmnttag = str_match_xml_ns(data, "commentList"); if (cmnttag && cmnttag[1]) cmnttag[1].split(/<\/\w*:?comment>/).forEach(function(x$2) { if (x$2 === "" || x$2.trim() === "") return; var cm = x$2.match(/<(?:\w+:)?comment[^<>]*>/); if (!cm) return; var y$3 = parsexmltag(cm[0]); var comment = { author: y$3.authorId && authors[y$3.authorId] || "sheetjsghost", ref: y$3.ref, guid: y$3.guid }; var cell = decode_cell(y$3.ref); if (opts.sheetRows && opts.sheetRows <= cell.r) return; var textMatch = str_match_xml_ns(x$2, "text"); var rt = !!textMatch && !!textMatch[1] && parse_si(textMatch[1]) || { r: "", t: "", h: "" }; comment.r = rt.r; if (rt.r == "") rt.t = rt.h = ""; comment.t = (rt.t || "").replace(/\r\n/g, "\n").replace(/\r/g, "\n"); if (opts.cellHTML) comment.h = rt.h; commentList.push(comment); }); return commentList; } function write_comments_xml(data) { var o$10 = [XML_HEADER, writextag("comments", null, { "xmlns": XMLNS_main[0] })]; var iauthor = []; o$10.push(""); data.forEach(function(x$2) { x$2[1].forEach(function(w$2) { var a$2 = escapexml(w$2.a); if (iauthor.indexOf(a$2) == -1) { iauthor.push(a$2); o$10.push("" + a$2 + ""); } if (w$2.T && w$2.ID && iauthor.indexOf("tc=" + w$2.ID) == -1) { iauthor.push("tc=" + w$2.ID); o$10.push("" + "tc=" + w$2.ID + ""); } }); }); if (iauthor.length == 0) { iauthor.push("SheetJ5"); o$10.push("SheetJ5"); } o$10.push(""); o$10.push(""); data.forEach(function(d$5) { var lastauthor = 0, ts = [], tcnt = 0; if (d$5[1][0] && d$5[1][0].T && d$5[1][0].ID) lastauthor = iauthor.indexOf("tc=" + d$5[1][0].ID); d$5[1].forEach(function(c$7) { if (c$7.a) lastauthor = iauthor.indexOf(escapexml(c$7.a)); if (c$7.T) ++tcnt; ts.push(c$7.t == null ? "" : escapexml(c$7.t)); }); if (tcnt === 0) { d$5[1].forEach(function(c$7) { o$10.push(""); o$10.push(writetag("t", c$7.t == null ? "" : escapexml(c$7.t))); o$10.push(""); }); } else { if (d$5[1][0] && d$5[1][0].T && d$5[1][0].ID) lastauthor = iauthor.indexOf("tc=" + d$5[1][0].ID); o$10.push(""); var t$6 = "Comment:\n " + ts[0] + "\n"; for (var i$7 = 1; i$7 < ts.length; ++i$7) t$6 += "Reply:\n " + ts[i$7] + "\n"; o$10.push(writetag("t", escapexml(t$6))); o$10.push(""); } }); o$10.push(""); if (o$10.length > 2) { o$10[o$10.length] = ""; o$10[1] = o$10[1].replace("/>", ">"); } return o$10.join(""); } function parse_tcmnt_xml(data, opts) { var out = []; var pass = false, comment = {}, tidx = 0; data.replace(tagregex, function xml_tcmnt(x$2, idx) { var y$3 = parsexmltag(x$2); switch (strip_ns(y$3[0])) { case "": break; case "": if (comment.t != null) out.push(comment); break; case "": case "": comment.t = data.slice(tidx, idx).replace(/\r\n/g, "\n").replace(/\r/g, "\n"); break; case "": pass = true; break; case "": pass = false; break; case "": case "
": case "": break; case "": pass = false; break; default: if (!pass && opts.WTF) throw new Error("unrecognized " + y$3[0] + " in threaded comments"); } return x$2; }); return out; } function write_tcmnt_xml(comments, people, opts) { var o$10 = [XML_HEADER, writextag("ThreadedComments", null, { "xmlns": XMLNS.TCMNT }).replace(/[\/]>/, ">")]; comments.forEach(function(carr) { var rootid = ""; (carr[1] || []).forEach(function(c$7, idx) { if (!c$7.T) { delete c$7.ID; return; } if (c$7.a && people.indexOf(c$7.a) == -1) people.push(c$7.a); var tcopts = { ref: carr[0], id: "{54EE7951-7262-4200-6969-" + ("000000000000" + opts.tcid++).slice(-12) + "}" }; if (idx == 0) rootid = tcopts.id; else tcopts.parentId = rootid; c$7.ID = tcopts.id; if (c$7.a) tcopts.personId = "{54EE7950-7262-4200-6969-" + ("000000000000" + people.indexOf(c$7.a)).slice(-12) + "}"; o$10.push(writextag("threadedComment", writetag("text", c$7.t || ""), tcopts)); }); }); o$10.push(""); return o$10.join(""); } function parse_people_xml(data, opts) { var out = []; var pass = false; data.replace(tagregex, function xml_tcmnt(x$2) { var y$3 = parsexmltag(x$2); switch (strip_ns(y$3[0])) { case "": break; case "": break; case "": case "": case "": break; case "": pass = false; break; default: if (!pass && opts.WTF) throw new Error("unrecognized " + y$3[0] + " in threaded comments"); } return x$2; }); return out; } function write_people_xml(people) { var o$10 = [XML_HEADER, writextag("personList", null, { "xmlns": XMLNS.TCMNT, "xmlns:x": XMLNS_main[0] }).replace(/[\/]>/, ">")]; people.forEach(function(person, idx) { o$10.push(writextag("person", null, { displayName: person, id: "{54EE7950-7262-4200-6969-" + ("000000000000" + idx).slice(-12) + "}", userId: person, providerId: "None" })); }); o$10.push(""); return o$10.join(""); } function parse_BrtBeginComment(data) { var out = {}; out.iauthor = data.read_shift(4); var rfx = parse_UncheckedRfX(data, 16); out.rfx = rfx.s; out.ref = encode_cell(rfx.s); data.l += 16; return out; } function write_BrtBeginComment(data, o$10) { if (o$10 == null) o$10 = new_buf(36); o$10.write_shift(4, data[1].iauthor); write_UncheckedRfX(data[0], o$10); o$10.write_shift(4, 0); o$10.write_shift(4, 0); o$10.write_shift(4, 0); o$10.write_shift(4, 0); return o$10; } function write_BrtCommentAuthor(data) { return write_XLWideString(data.slice(0, 54)); } function parse_comments_bin(data, opts) { var out = []; var authors = []; var c$7 = {}; var pass = false; recordhopper(data, function hopper_cmnt(val$1, R$1, RT) { switch (RT) { case 632: authors.push(val$1); break; case 635: c$7 = val$1; break; case 637: c$7.t = val$1.t; c$7.h = val$1.h; c$7.r = val$1.r; break; case 636: c$7.author = authors[c$7.iauthor]; delete c$7.iauthor; if (opts.sheetRows && c$7.rfx && opts.sheetRows <= c$7.rfx.r) break; if (!c$7.t) c$7.t = ""; delete c$7.rfx; out.push(c$7); break; case 3072: break; case 35: pass = true; break; case 36: pass = false; break; case 37: break; case 38: break; default: if (R$1.T) {} else if (!pass || opts.WTF) throw new Error("Unexpected record 0x" + RT.toString(16)); } }); return out; } function write_comments_bin(data) { var ba = buf_array(); var iauthor = []; write_record(ba, 628); write_record(ba, 630); data.forEach(function(comment) { comment[1].forEach(function(c$7) { if (iauthor.indexOf(c$7.a) > -1) return; iauthor.push(c$7.a.slice(0, 54)); write_record(ba, 632, write_BrtCommentAuthor(c$7.a)); if (c$7.T && c$7.ID && iauthor.indexOf("tc=" + c$7.ID) == -1) { iauthor.push("tc=" + c$7.ID); write_record(ba, 632, write_BrtCommentAuthor("tc=" + c$7.ID)); } }); }); write_record(ba, 631); write_record(ba, 633); data.forEach(function(comment) { comment[1].forEach(function(c$7) { var _ia = -1; if (c$7.ID) _ia = iauthor.indexOf("tc=" + c$7.ID); if (_ia == -1 && comment[1][0].T && comment[1][0].ID) _ia = iauthor.indexOf("tc=" + comment[1][0].ID); if (_ia == -1) _ia = iauthor.indexOf(c$7.a); c$7.iauthor = _ia; var range = { s: decode_cell(comment[0]), e: decode_cell(comment[0]) }; write_record(ba, 635, write_BrtBeginComment([range, c$7])); if (c$7.t && c$7.t.length > 0) write_record(ba, 637, write_BrtCommentText(c$7)); write_record(ba, 636); delete c$7.iauthor; }); }); write_record(ba, 634); write_record(ba, 629); return ba.end(); } function make_vba_xls(cfb) { var newcfb = CFB.utils.cfb_new({ root: "R" }); cfb.FullPaths.forEach(function(p$3, i$7) { if (p$3.slice(-1) === "/" || !p$3.match(/_VBA_PROJECT_CUR/)) return; var newpath = p$3.replace(/^[^\/]*/, "R").replace(/\/_VBA_PROJECT_CUR\u0000*/, ""); CFB.utils.cfb_add(newcfb, newpath, cfb.FileIndex[i$7].content); }); return CFB.write(newcfb); } function fill_vba_xls(cfb, vba) { vba.FullPaths.forEach(function(p$3, i$7) { if (i$7 == 0) return; var newpath = p$3.replace(/^[\/]*[^\/]*[\/]/, "/_VBA_PROJECT_CUR/"); if (newpath.slice(-1) !== "/") CFB.utils.cfb_add(cfb, newpath, vba.FileIndex[i$7].content); }); } function parse_ds_bin() { return { "!type": "dialog" }; } function parse_ds_xml() { return { "!type": "dialog" }; } function parse_ms_bin() { return { "!type": "macro" }; } function parse_ms_xml() { return { "!type": "macro" }; } function shift_formula_str(f$4, delta) { return f$4.replace(crefregex, function($0, $1, $2, $3, $4, $5) { return $1 + ($2 == "$" ? $2 + $3 : encode_col(decode_col($3) + delta.c)) + ($4 == "$" ? $4 + $5 : encode_row(decode_row($5) + delta.r)); }); } function shift_formula_xlsx(f$4, range, cell) { var r$10 = decode_range(range), s$5 = r$10.s, c$7 = decode_cell(cell); var delta = { r: c$7.r - s$5.r, c: c$7.c - s$5.c }; return shift_formula_str(f$4, delta); } function fuzzyfmla(f$4) { if (f$4.length == 1) return false; return true; } function _xlfn(f$4) { return f$4.replace(/_xlfn\./g, ""); } function parseread1(blob) { blob.l += 1; return; } function parse_ColRelU(blob, length) { var c$7 = blob.read_shift(length == 1 ? 1 : 2); return [ c$7 & 16383, c$7 >> 14 & 1, c$7 >> 15 & 1 ]; } function parse_RgceArea(blob, length, opts) { var w$2 = 2; if (opts) { if (opts.biff >= 2 && opts.biff <= 5) return parse_RgceArea_BIFF2(blob, length, opts); else if (opts.biff == 12) w$2 = 4; } var r$10 = blob.read_shift(w$2), R$1 = blob.read_shift(w$2); var c$7 = parse_ColRelU(blob, 2); var C$2 = parse_ColRelU(blob, 2); return { s: { r: r$10, c: c$7[0], cRel: c$7[1], rRel: c$7[2] }, e: { r: R$1, c: C$2[0], cRel: C$2[1], rRel: C$2[2] } }; } function parse_RgceArea_BIFF2(blob) { var r$10 = parse_ColRelU(blob, 2), R$1 = parse_ColRelU(blob, 2); var c$7 = blob.read_shift(1); var C$2 = blob.read_shift(1); return { s: { r: r$10[0], c: c$7, cRel: r$10[1], rRel: r$10[2] }, e: { r: R$1[0], c: C$2, cRel: R$1[1], rRel: R$1[2] } }; } function parse_RgceAreaRel(blob, length, opts) { if (opts.biff < 8) return parse_RgceArea_BIFF2(blob, length, opts); var r$10 = blob.read_shift(opts.biff == 12 ? 4 : 2), R$1 = blob.read_shift(opts.biff == 12 ? 4 : 2); var c$7 = parse_ColRelU(blob, 2); var C$2 = parse_ColRelU(blob, 2); return { s: { r: r$10, c: c$7[0], cRel: c$7[1], rRel: c$7[2] }, e: { r: R$1, c: C$2[0], cRel: C$2[1], rRel: C$2[2] } }; } function parse_RgceLoc(blob, length, opts) { if (opts && opts.biff >= 2 && opts.biff <= 5) return parse_RgceLoc_BIFF2(blob, length, opts); var r$10 = blob.read_shift(opts && opts.biff == 12 ? 4 : 2); var c$7 = parse_ColRelU(blob, 2); return { r: r$10, c: c$7[0], cRel: c$7[1], rRel: c$7[2] }; } function parse_RgceLoc_BIFF2(blob) { var r$10 = parse_ColRelU(blob, 2); var c$7 = blob.read_shift(1); return { r: r$10[0], c: c$7, cRel: r$10[1], rRel: r$10[2] }; } function parse_RgceElfLoc(blob) { var r$10 = blob.read_shift(2); var c$7 = blob.read_shift(2); return { r: r$10, c: c$7 & 255, fQuoted: !!(c$7 & 16384), cRel: c$7 >> 15, rRel: c$7 >> 15 }; } function parse_RgceLocRel(blob, length, opts) { var biff = opts && opts.biff ? opts.biff : 8; if (biff >= 2 && biff <= 5) return parse_RgceLocRel_BIFF2(blob, length, opts); var r$10 = blob.read_shift(biff >= 12 ? 4 : 2); var cl = blob.read_shift(2); var cRel = (cl & 16384) >> 14, rRel = (cl & 32768) >> 15; cl &= 16383; if (rRel == 1) while (r$10 > 524287) r$10 -= 1048576; if (cRel == 1) while (cl > 8191) cl = cl - 16384; return { r: r$10, c: cl, cRel, rRel }; } function parse_RgceLocRel_BIFF2(blob) { var rl = blob.read_shift(2); var c$7 = blob.read_shift(1); var rRel = (rl & 32768) >> 15, cRel = (rl & 16384) >> 14; rl &= 16383; if (rRel == 1 && rl >= 8192) rl = rl - 16384; if (cRel == 1 && c$7 >= 128) c$7 = c$7 - 256; return { r: rl, c: c$7, cRel, rRel }; } function parse_PtgArea(blob, length, opts) { var type = (blob[blob.l++] & 96) >> 5; var area = parse_RgceArea(blob, opts.biff >= 2 && opts.biff <= 5 ? 6 : 8, opts); return [type, area]; } function parse_PtgArea3d(blob, length, opts) { var type = (blob[blob.l++] & 96) >> 5; var ixti = blob.read_shift(2, "i"); var w$2 = 8; if (opts) switch (opts.biff) { case 5: blob.l += 12; w$2 = 6; break; case 12: w$2 = 12; break; } var area = parse_RgceArea(blob, w$2, opts); return [ type, ixti, area ]; } function parse_PtgAreaErr(blob, length, opts) { var type = (blob[blob.l++] & 96) >> 5; blob.l += opts && opts.biff > 8 ? 12 : opts.biff < 8 ? 6 : 8; return [type]; } function parse_PtgAreaErr3d(blob, length, opts) { var type = (blob[blob.l++] & 96) >> 5; var ixti = blob.read_shift(2); var w$2 = 8; if (opts) switch (opts.biff) { case 5: blob.l += 12; w$2 = 6; break; case 12: w$2 = 12; break; } blob.l += w$2; return [type, ixti]; } function parse_PtgAreaN(blob, length, opts) { var type = (blob[blob.l++] & 96) >> 5; var area = parse_RgceAreaRel(blob, length - 1, opts); return [type, area]; } function parse_PtgArray(blob, length, opts) { var type = (blob[blob.l++] & 96) >> 5; blob.l += opts.biff == 2 ? 6 : opts.biff == 12 ? 14 : 7; return [type]; } function parse_PtgAttrBaxcel(blob) { var bitSemi = blob[blob.l + 1] & 1; var bitBaxcel = 1; blob.l += 4; return [bitSemi, bitBaxcel]; } function parse_PtgAttrChoose(blob, length, opts) { blob.l += 2; var offset = blob.read_shift(opts && opts.biff == 2 ? 1 : 2); var o$10 = []; for (var i$7 = 0; i$7 <= offset; ++i$7) o$10.push(blob.read_shift(opts && opts.biff == 2 ? 1 : 2)); return o$10; } function parse_PtgAttrGoto(blob, length, opts) { var bitGoto = blob[blob.l + 1] & 255 ? 1 : 0; blob.l += 2; return [bitGoto, blob.read_shift(opts && opts.biff == 2 ? 1 : 2)]; } function parse_PtgAttrIf(blob, length, opts) { var bitIf = blob[blob.l + 1] & 255 ? 1 : 0; blob.l += 2; return [bitIf, blob.read_shift(opts && opts.biff == 2 ? 1 : 2)]; } function parse_PtgAttrIfError(blob) { var bitIf = blob[blob.l + 1] & 255 ? 1 : 0; blob.l += 2; return [bitIf, blob.read_shift(2)]; } function parse_PtgAttrSemi(blob, length, opts) { var bitSemi = blob[blob.l + 1] & 255 ? 1 : 0; blob.l += opts && opts.biff == 2 ? 3 : 4; return [bitSemi]; } function parse_PtgAttrSpaceType(blob) { var type = blob.read_shift(1), cch = blob.read_shift(1); return [type, cch]; } function parse_PtgAttrSpace(blob) { blob.read_shift(2); return parse_PtgAttrSpaceType(blob, 2); } function parse_PtgAttrSpaceSemi(blob) { blob.read_shift(2); return parse_PtgAttrSpaceType(blob, 2); } function parse_PtgRef(blob, length, opts) { var type = (blob[blob.l] & 96) >> 5; blob.l += 1; var loc = parse_RgceLoc(blob, 0, opts); return [type, loc]; } function parse_PtgRefN(blob, length, opts) { var type = (blob[blob.l] & 96) >> 5; blob.l += 1; var loc = parse_RgceLocRel(blob, 0, opts); return [type, loc]; } function parse_PtgRef3d(blob, length, opts) { var type = (blob[blob.l] & 96) >> 5; blob.l += 1; var ixti = blob.read_shift(2); if (opts && opts.biff == 5) blob.l += 12; var loc = parse_RgceLoc(blob, 0, opts); return [ type, ixti, loc ]; } function parse_PtgFunc(blob, length, opts) { var type = (blob[blob.l] & 96) >> 5; blob.l += 1; var iftab = blob.read_shift(opts && opts.biff <= 3 ? 1 : 2); return [ FtabArgc[iftab], Ftab[iftab], type ]; } function parse_PtgFuncVar(blob, length, opts) { var type = blob[blob.l++]; var cparams = blob.read_shift(1), tab = opts && opts.biff <= 3 ? [type == 88 ? -1 : 0, blob.read_shift(1)] : parsetab(blob); return [cparams, (tab[0] === 0 ? Ftab : Cetab)[tab[1]]]; } function parsetab(blob) { return [blob[blob.l + 1] >> 7, blob.read_shift(2) & 32767]; } function parse_PtgAttrSum(blob, length, opts) { blob.l += opts && opts.biff == 2 ? 3 : 4; return; } function parse_PtgExp(blob, length, opts) { blob.l++; if (opts && opts.biff == 12) return [blob.read_shift(4, "i"), 0]; var row = blob.read_shift(2); var col = blob.read_shift(opts && opts.biff == 2 ? 1 : 2); return [row, col]; } function parse_PtgErr(blob) { blob.l++; return BErr[blob.read_shift(1)]; } function parse_PtgInt(blob) { blob.l++; return blob.read_shift(2); } function parse_PtgBool(blob) { blob.l++; return blob.read_shift(1) !== 0; } function parse_PtgNum(blob) { blob.l++; return parse_Xnum(blob, 8); } function parse_PtgStr(blob, length, opts) { blob.l++; return parse_ShortXLUnicodeString(blob, length - 1, opts); } function parse_SerAr(blob, biff) { var val$1 = [blob.read_shift(1)]; if (biff == 12) switch (val$1[0]) { case 2: val$1[0] = 4; break; case 4: val$1[0] = 16; break; case 0: val$1[0] = 1; break; case 1: val$1[0] = 2; break; } switch (val$1[0]) { case 4: val$1[1] = parsebool(blob, 1) ? "TRUE" : "FALSE"; if (biff != 12) blob.l += 7; break; case 37: case 16: val$1[1] = BErr[blob[blob.l]]; blob.l += biff == 12 ? 4 : 8; break; case 0: blob.l += 8; break; case 1: val$1[1] = parse_Xnum(blob, 8); break; case 2: val$1[1] = parse_XLUnicodeString2(blob, 0, { biff: biff > 0 && biff < 8 ? 2 : biff }); break; default: throw new Error("Bad SerAr: " + val$1[0]); } return val$1; } function parse_PtgExtraMem(blob, cce, opts) { var count = blob.read_shift(opts.biff == 12 ? 4 : 2); var out = []; for (var i$7 = 0; i$7 != count; ++i$7) out.push((opts.biff == 12 ? parse_UncheckedRfX : parse_Ref8U)(blob, 8)); return out; } function parse_PtgExtraArray(blob, length, opts) { var rows = 0, cols = 0; if (opts.biff == 12) { rows = blob.read_shift(4); cols = blob.read_shift(4); } else { cols = 1 + blob.read_shift(1); rows = 1 + blob.read_shift(2); } if (opts.biff >= 2 && opts.biff < 8) { --rows; if (--cols == 0) cols = 256; } for (var i$7 = 0, o$10 = []; i$7 != rows && (o$10[i$7] = []); ++i$7) for (var j$2 = 0; j$2 != cols; ++j$2) o$10[i$7][j$2] = parse_SerAr(blob, opts.biff); return o$10; } function parse_PtgName(blob, length, opts) { var type = blob.read_shift(1) >>> 5 & 3; var w$2 = !opts || opts.biff >= 8 ? 4 : 2; var nameindex = blob.read_shift(w$2); switch (opts.biff) { case 2: blob.l += 5; break; case 3: case 4: blob.l += 8; break; case 5: blob.l += 12; break; } return [ type, 0, nameindex ]; } function parse_PtgNameX(blob, length, opts) { if (opts.biff == 5) return parse_PtgNameX_BIFF5(blob, length, opts); var type = blob.read_shift(1) >>> 5 & 3; var ixti = blob.read_shift(2); var nameindex = blob.read_shift(4); return [ type, ixti, nameindex ]; } function parse_PtgNameX_BIFF5(blob) { var type = blob.read_shift(1) >>> 5 & 3; var ixti = blob.read_shift(2, "i"); blob.l += 8; var nameindex = blob.read_shift(2); blob.l += 12; return [ type, ixti, nameindex ]; } function parse_PtgMemArea(blob, length, opts) { var type = blob.read_shift(1) >>> 5 & 3; blob.l += opts && opts.biff == 2 ? 3 : 4; var cce = blob.read_shift(opts && opts.biff == 2 ? 1 : 2); return [type, cce]; } function parse_PtgMemFunc(blob, length, opts) { var type = blob.read_shift(1) >>> 5 & 3; var cce = blob.read_shift(opts && opts.biff == 2 ? 1 : 2); return [type, cce]; } function parse_PtgRefErr(blob, length, opts) { var type = blob.read_shift(1) >>> 5 & 3; blob.l += 4; if (opts.biff < 8) blob.l--; if (opts.biff == 12) blob.l += 2; return [type]; } function parse_PtgRefErr3d(blob, length, opts) { var type = (blob[blob.l++] & 96) >> 5; var ixti = blob.read_shift(2); var w$2 = 4; if (opts) switch (opts.biff) { case 5: w$2 = 15; break; case 12: w$2 = 6; break; } blob.l += w$2; return [type, ixti]; } function parse_PtgElfLoc(blob, length, opts) { blob.l += 2; return [parse_RgceElfLoc(blob, 4, opts)]; } function parse_PtgElfNoop(blob) { blob.l += 6; return []; } function parse_PtgElfLel(blob) { blob.l += 2; return [parseuint16(blob), blob.read_shift(2) & 1]; } function parse_PtgList(blob) { blob.l += 2; var ixti = blob.read_shift(2); var flags = blob.read_shift(2); var idx = blob.read_shift(4); var c$7 = blob.read_shift(2); var C$2 = blob.read_shift(2); var rt = PtgListRT[flags >> 2 & 31]; return { ixti, coltype: flags & 3, rt, idx, c: c$7, C: C$2 }; } function parse_PtgSxName(blob) { blob.l += 2; return [blob.read_shift(4)]; } function parse_PtgSheet(blob, length, opts) { blob.l += 5; blob.l += 2; blob.l += opts.biff == 2 ? 1 : 4; return ["PTGSHEET"]; } function parse_PtgEndSheet(blob, length, opts) { blob.l += opts.biff == 2 ? 4 : 5; return ["PTGENDSHEET"]; } function parse_PtgMemAreaN(blob) { var type = blob.read_shift(1) >>> 5 & 3; var cce = blob.read_shift(2); return [type, cce]; } function parse_PtgMemNoMemN(blob) { var type = blob.read_shift(1) >>> 5 & 3; var cce = blob.read_shift(2); return [type, cce]; } function parse_PtgAttrNoop(blob) { blob.l += 4; return [0, 0]; } function parse_RgbExtra(blob, length, rgce, opts) { if (opts.biff < 8) return parsenoop(blob, length); var target = blob.l + length; var o$10 = []; for (var i$7 = 0; i$7 !== rgce.length; ++i$7) { switch (rgce[i$7][0]) { case "PtgArray": rgce[i$7][1] = parse_PtgExtraArray(blob, 0, opts); o$10.push(rgce[i$7][1]); break; case "PtgMemArea": rgce[i$7][2] = parse_PtgExtraMem(blob, rgce[i$7][1], opts); o$10.push(rgce[i$7][2]); break; case "PtgExp": if (opts && opts.biff == 12) { rgce[i$7][1][1] = blob.read_shift(4); o$10.push(rgce[i$7][1]); } break; case "PtgList": case "PtgElfRadicalS": case "PtgElfColS": case "PtgElfColSV": throw "Unsupported " + rgce[i$7][0]; default: break; } } length = target - blob.l; if (length !== 0) o$10.push(parsenoop(blob, length)); return o$10; } function parse_Rgce(blob, length, opts) { var target = blob.l + length; var R$1, id, ptgs = []; while (target != blob.l) { length = target - blob.l; id = blob[blob.l]; R$1 = PtgTypes[id] || PtgTypes[PtgDupes[id]]; if (id === 24 || id === 25) R$1 = (id === 24 ? Ptg18 : Ptg19)[blob[blob.l + 1]]; if (!R$1 || !R$1.f) { parsenoop(blob, length); } else { ptgs.push([R$1.n, R$1.f(blob, length, opts)]); } } return ptgs; } function stringify_array(f$4) { var o$10 = []; for (var i$7 = 0; i$7 < f$4.length; ++i$7) { var x$2 = f$4[i$7], r$10 = []; for (var j$2 = 0; j$2 < x$2.length; ++j$2) { var y$3 = x$2[j$2]; if (y$3) switch (y$3[0]) { case 2: r$10.push("\"" + y$3[1].replace(/"/g, "\"\"") + "\""); break; default: r$10.push(y$3[1]); } else r$10.push(""); } o$10.push(r$10.join(",")); } return o$10.join(";"); } function make_3d_range(start, end) { var s$5 = start.lastIndexOf("!"), e$10 = end.lastIndexOf("!"); if (s$5 == -1 && e$10 == -1) return start + ":" + end; if (s$5 > 0 && e$10 > 0 && start.slice(0, s$5).toLowerCase() == end.slice(0, e$10).toLowerCase()) return start + ":" + end.slice(e$10 + 1); console.error("Cannot hydrate range", start, end); return start + ":" + end; } function get_ixti_raw(supbooks, ixti, opts) { if (!supbooks) return "SH33TJSERR0"; if (opts.biff > 8 && (!supbooks.XTI || !supbooks.XTI[ixti])) return supbooks.SheetNames[ixti]; if (!supbooks.XTI) return "SH33TJSERR6"; var XTI = supbooks.XTI[ixti]; if (opts.biff < 8) { if (ixti > 1e4) ixti -= 65536; if (ixti < 0) ixti = -ixti; return ixti == 0 ? "" : supbooks.XTI[ixti - 1]; } if (!XTI) return "SH33TJSERR1"; var o$10 = ""; if (opts.biff > 8) switch (supbooks[XTI[0]][0]) { case 357: o$10 = XTI[1] == -1 ? "#REF" : supbooks.SheetNames[XTI[1]]; return XTI[1] == XTI[2] ? o$10 : o$10 + ":" + supbooks.SheetNames[XTI[2]]; case 358: if (opts.SID != null) return supbooks.SheetNames[opts.SID]; return "SH33TJSSAME" + supbooks[XTI[0]][0]; case 355: default: return "SH33TJSSRC" + supbooks[XTI[0]][0]; } switch (supbooks[XTI[0]][0][0]) { case 1025: o$10 = XTI[1] == -1 ? "#REF" : supbooks.SheetNames[XTI[1]] || "SH33TJSERR3"; return XTI[1] == XTI[2] ? o$10 : o$10 + ":" + supbooks.SheetNames[XTI[2]]; case 14849: return supbooks[XTI[0]].slice(1).map(function(name) { return name.Name; }).join(";;"); default: if (!supbooks[XTI[0]][0][3]) return "SH33TJSERR2"; o$10 = XTI[1] == -1 ? "#REF" : supbooks[XTI[0]][0][3][XTI[1]] || "SH33TJSERR4"; return XTI[1] == XTI[2] ? o$10 : o$10 + ":" + supbooks[XTI[0]][0][3][XTI[2]]; } } function get_ixti(supbooks, ixti, opts) { var ixtiraw = get_ixti_raw(supbooks, ixti, opts); return ixtiraw == "#REF" ? ixtiraw : formula_quote_sheet_name(ixtiraw, opts); } function stringify_formula(formula, range, cell, supbooks, opts) { var biff = opts && opts.biff || 8; var _range = { s: { c: 0, r: 0 }, e: { c: 0, r: 0 } }; var stack = [], e1, e2, c$7, ixti = 0, nameidx = 0, r$10, sname = ""; if (!formula[0] || !formula[0][0]) return ""; var last_sp = -1, sp = ""; for (var ff = 0, fflen = formula[0].length; ff < fflen; ++ff) { var f$4 = formula[0][ff]; switch (f$4[0]) { case "PtgUminus": stack.push("-" + stack.pop()); break; case "PtgUplus": stack.push("+" + stack.pop()); break; case "PtgPercent": stack.push(stack.pop() + "%"); break; case "PtgAdd": case "PtgConcat": case "PtgDiv": case "PtgEq": case "PtgGe": case "PtgGt": case "PtgLe": case "PtgLt": case "PtgMul": case "PtgNe": case "PtgPower": case "PtgSub": e1 = stack.pop(); e2 = stack.pop(); if (last_sp >= 0) { switch (formula[0][last_sp][1][0]) { case 0: sp = fill(" ", formula[0][last_sp][1][1]); break; case 1: sp = fill("\r", formula[0][last_sp][1][1]); break; default: sp = ""; if (opts.WTF) throw new Error("Unexpected PtgAttrSpaceType " + formula[0][last_sp][1][0]); } e2 = e2 + sp; last_sp = -1; } stack.push(e2 + PtgBinOp[f$4[0]] + e1); break; case "PtgIsect": e1 = stack.pop(); e2 = stack.pop(); stack.push(e2 + " " + e1); break; case "PtgUnion": e1 = stack.pop(); e2 = stack.pop(); stack.push(e2 + "," + e1); break; case "PtgRange": e1 = stack.pop(); e2 = stack.pop(); stack.push(make_3d_range(e2, e1)); break; case "PtgAttrChoose": break; case "PtgAttrGoto": break; case "PtgAttrIf": break; case "PtgAttrIfError": break; case "PtgRef": c$7 = shift_cell_xls(f$4[1][1], _range, opts); stack.push(encode_cell_xls(c$7, biff)); break; case "PtgRefN": c$7 = cell ? shift_cell_xls(f$4[1][1], cell, opts) : f$4[1][1]; stack.push(encode_cell_xls(c$7, biff)); break; case "PtgRef3d": ixti = f$4[1][1]; c$7 = shift_cell_xls(f$4[1][2], _range, opts); sname = get_ixti(supbooks, ixti, opts); var w$2 = sname; stack.push(sname + "!" + encode_cell_xls(c$7, biff)); break; case "PtgFunc": case "PtgFuncVar": var argc = f$4[1][0], func = f$4[1][1]; if (!argc) argc = 0; argc &= 127; var args = argc == 0 ? [] : stack.slice(-argc); stack.length -= argc; if (func === "User") func = args.shift(); stack.push(func + "(" + args.join(",") + ")"); break; case "PtgBool": stack.push(f$4[1] ? "TRUE" : "FALSE"); break; case "PtgInt": stack.push(f$4[1]); break; case "PtgNum": stack.push(String(f$4[1])); break; case "PtgStr": stack.push("\"" + f$4[1].replace(/"/g, "\"\"") + "\""); break; case "PtgErr": stack.push(f$4[1]); break; case "PtgAreaN": r$10 = shift_range_xls(f$4[1][1], cell ? { s: cell } : _range, opts); stack.push(encode_range_xls(r$10, opts)); break; case "PtgArea": r$10 = shift_range_xls(f$4[1][1], _range, opts); stack.push(encode_range_xls(r$10, opts)); break; case "PtgArea3d": ixti = f$4[1][1]; r$10 = f$4[1][2]; sname = get_ixti(supbooks, ixti, opts); stack.push(sname + "!" + encode_range_xls(r$10, opts)); break; case "PtgAttrSum": stack.push("SUM(" + stack.pop() + ")"); break; case "PtgAttrBaxcel": case "PtgAttrSemi": break; case "PtgName": nameidx = f$4[1][2]; var lbl = (supbooks.names || [])[nameidx - 1] || (supbooks[0] || [])[nameidx]; var name = lbl ? lbl.Name : "SH33TJSNAME" + String(nameidx); if (name && name.slice(0, 6) == "_xlfn." && !opts.xlfn) name = name.slice(6); stack.push(name); break; case "PtgNameX": var bookidx = f$4[1][1]; nameidx = f$4[1][2]; var externbook; if (opts.biff <= 5) { if (bookidx < 0) bookidx = -bookidx; if (supbooks[bookidx]) externbook = supbooks[bookidx][nameidx]; } else { var o$10 = ""; if (((supbooks[bookidx] || [])[0] || [])[0] == 14849) {} else if (((supbooks[bookidx] || [])[0] || [])[0] == 1025) { if (supbooks[bookidx][nameidx] && supbooks[bookidx][nameidx].itab > 0) { o$10 = supbooks.SheetNames[supbooks[bookidx][nameidx].itab - 1] + "!"; } } else o$10 = supbooks.SheetNames[nameidx - 1] + "!"; if (supbooks[bookidx] && supbooks[bookidx][nameidx]) o$10 += supbooks[bookidx][nameidx].Name; else if (supbooks[0] && supbooks[0][nameidx]) o$10 += supbooks[0][nameidx].Name; else { var ixtidata = (get_ixti_raw(supbooks, bookidx, opts) || "").split(";;"); if (ixtidata[nameidx - 1]) o$10 = ixtidata[nameidx - 1]; else o$10 += "SH33TJSERRX"; } stack.push(o$10); break; } if (!externbook) externbook = { Name: "SH33TJSERRY" }; stack.push(externbook.Name); break; case "PtgParen": var lp = "(", rp = ")"; if (last_sp >= 0) { sp = ""; switch (formula[0][last_sp][1][0]) { case 2: lp = fill(" ", formula[0][last_sp][1][1]) + lp; break; case 3: lp = fill("\r", formula[0][last_sp][1][1]) + lp; break; case 4: rp = fill(" ", formula[0][last_sp][1][1]) + rp; break; case 5: rp = fill("\r", formula[0][last_sp][1][1]) + rp; break; default: if (opts.WTF) throw new Error("Unexpected PtgAttrSpaceType " + formula[0][last_sp][1][0]); } last_sp = -1; } stack.push(lp + stack.pop() + rp); break; case "PtgRefErr": stack.push("#REF!"); break; case "PtgRefErr3d": stack.push("#REF!"); break; case "PtgExp": c$7 = { c: f$4[1][1], r: f$4[1][0] }; var q$2 = { c: cell.c, r: cell.r }; if (supbooks.sharedf[encode_cell(c$7)]) { var parsedf = supbooks.sharedf[encode_cell(c$7)]; stack.push(stringify_formula(parsedf, _range, q$2, supbooks, opts)); } else { var fnd = false; for (e1 = 0; e1 != supbooks.arrayf.length; ++e1) { e2 = supbooks.arrayf[e1]; if (c$7.c < e2[0].s.c || c$7.c > e2[0].e.c) continue; if (c$7.r < e2[0].s.r || c$7.r > e2[0].e.r) continue; stack.push(stringify_formula(e2[1], _range, q$2, supbooks, opts)); fnd = true; break; } if (!fnd) stack.push(f$4[1]); } break; case "PtgArray": stack.push("{" + stringify_array(f$4[1]) + "}"); break; case "PtgMemArea": break; case "PtgAttrSpace": case "PtgAttrSpaceSemi": last_sp = ff; break; case "PtgTbl": break; case "PtgMemErr": break; case "PtgMissArg": stack.push(""); break; case "PtgAreaErr": stack.push("#REF!"); break; case "PtgAreaErr3d": stack.push("#REF!"); break; case "PtgList": stack.push("Table" + f$4[1].idx + "[#" + f$4[1].rt + "]"); break; case "PtgMemAreaN": case "PtgMemNoMemN": case "PtgAttrNoop": case "PtgSheet": case "PtgEndSheet": break; case "PtgMemFunc": break; case "PtgMemNoMem": break; case "PtgElfCol": case "PtgElfColS": case "PtgElfColSV": case "PtgElfColV": case "PtgElfLel": case "PtgElfRadical": case "PtgElfRadicalLel": case "PtgElfRadicalS": case "PtgElfRw": case "PtgElfRwV": throw new Error("Unsupported ELFs"); case "PtgSxName": throw new Error("Unrecognized Formula Token: " + String(f$4)); default: throw new Error("Unrecognized Formula Token: " + String(f$4)); } var PtgNonDisp = [ "PtgAttrSpace", "PtgAttrSpaceSemi", "PtgAttrGoto" ]; if (opts.biff != 3) { if (last_sp >= 0 && PtgNonDisp.indexOf(formula[0][ff][0]) == -1) { f$4 = formula[0][last_sp]; var _left = true; switch (f$4[1][0]) { case 4: _left = false; case 0: sp = fill(" ", f$4[1][1]); break; case 5: _left = false; case 1: sp = fill("\r", f$4[1][1]); break; default: sp = ""; if (opts.WTF) throw new Error("Unexpected PtgAttrSpaceType " + f$4[1][0]); } stack.push((_left ? sp : "") + stack.pop() + (_left ? "" : sp)); last_sp = -1; } } } if (stack.length > 1 && opts.WTF) throw new Error("bad formula stack"); if (stack[0] == "TRUE") return true; if (stack[0] == "FALSE") return false; return stack[0]; } function parse_ArrayParsedFormula(blob, length, opts) { var target = blob.l + length, len = opts.biff == 2 ? 1 : 2; var rgcb, cce = blob.read_shift(len); if (cce == 65535) return [[], parsenoop(blob, length - 2)]; var rgce = parse_Rgce(blob, cce, opts); if (length !== cce + len) rgcb = parse_RgbExtra(blob, length - cce - len, rgce, opts); blob.l = target; return [rgce, rgcb]; } function parse_XLSCellParsedFormula(blob, length, opts) { var target = blob.l + length, len = opts.biff == 2 ? 1 : 2; var rgcb, cce = blob.read_shift(len); if (cce == 65535) return [[], parsenoop(blob, length - 2)]; var rgce = parse_Rgce(blob, cce, opts); if (length !== cce + len) rgcb = parse_RgbExtra(blob, length - cce - len, rgce, opts); blob.l = target; return [rgce, rgcb]; } function parse_NameParsedFormula(blob, length, opts, cce) { var target = blob.l + length; var rgce = parse_Rgce(blob, cce, opts); var rgcb; if (target !== blob.l) rgcb = parse_RgbExtra(blob, target - blob.l, rgce, opts); return [rgce, rgcb]; } function parse_SharedParsedFormula(blob, length, opts) { var target = blob.l + length; var rgcb, cce = blob.read_shift(2); var rgce = parse_Rgce(blob, cce, opts); if (cce == 65535) return [[], parsenoop(blob, length - 2)]; if (length !== cce + 2) rgcb = parse_RgbExtra(blob, target - cce - 2, rgce, opts); return [rgce, rgcb]; } function parse_FormulaValue(blob) { var b$3; if (__readUInt16LE(blob, blob.l + 6) !== 65535) return [parse_Xnum(blob), "n"]; switch (blob[blob.l]) { case 0: blob.l += 8; return ["String", "s"]; case 1: b$3 = blob[blob.l + 2] === 1; blob.l += 8; return [b$3, "b"]; case 2: b$3 = blob[blob.l + 2]; blob.l += 8; return [b$3, "e"]; case 3: blob.l += 8; return ["", "s"]; } return []; } function write_FormulaValue(value) { if (value == null) { var o$10 = new_buf(8); o$10.write_shift(1, 3); o$10.write_shift(1, 0); o$10.write_shift(2, 0); o$10.write_shift(2, 0); o$10.write_shift(2, 65535); return o$10; } else if (typeof value == "number") return write_Xnum(value); return write_Xnum(0); } function parse_Formula(blob, length, opts) { var end = blob.l + length; var cell = parse_XLSCell(blob, 6, opts); var val$1 = parse_FormulaValue(blob, 8); var flags = blob.read_shift(1); if (opts.biff != 2) { blob.read_shift(1); if (opts.biff >= 5) { blob.read_shift(4); } } var cbf = parse_XLSCellParsedFormula(blob, end - blob.l, opts); return { cell, val: val$1[0], formula: cbf, shared: flags >> 3 & 1, tt: val$1[1] }; } function write_Formula(cell, R$1, C$2, opts, os) { var o1 = write_XLSCell(R$1, C$2, os); var o2 = write_FormulaValue(cell.v); var o3 = new_buf(6); var flags = 1 | 32; o3.write_shift(2, flags); o3.write_shift(4, 0); var bf = new_buf(cell.bf.length); for (var i$7 = 0; i$7 < cell.bf.length; ++i$7) bf[i$7] = cell.bf[i$7]; var out = bconcat([ o1, o2, o3, bf ]); return out; } function parse_XLSBParsedFormula(data, length, opts) { var cce = data.read_shift(4); var rgce = parse_Rgce(data, cce, opts); var cb = data.read_shift(4); var rgcb = cb > 0 ? parse_RgbExtra(data, cb, rgce, opts) : null; return [rgce, rgcb]; } function write_XLSBFormulaNum(val$1) { if ((val$1 | 0) == val$1 && val$1 < Math.pow(2, 16) && val$1 >= 0) { var oint = new_buf(11); oint.write_shift(4, 3); oint.write_shift(1, 30); oint.write_shift(2, val$1); oint.write_shift(4, 0); return oint; } var num = new_buf(17); num.write_shift(4, 11); num.write_shift(1, 31); num.write_shift(8, val$1); num.write_shift(4, 0); return num; } function write_XLSBFormulaErr(val$1) { var oint = new_buf(10); oint.write_shift(4, 2); oint.write_shift(1, 28); oint.write_shift(1, val$1); oint.write_shift(4, 0); return oint; } function write_XLSBFormulaBool(val$1) { var oint = new_buf(10); oint.write_shift(4, 2); oint.write_shift(1, 29); oint.write_shift(1, val$1 ? 1 : 0); oint.write_shift(4, 0); return oint; } function write_XLSBFormulaStr(val$1) { var preamble = new_buf(7); preamble.write_shift(4, 3 + 2 * val$1.length); preamble.write_shift(1, 23); preamble.write_shift(2, val$1.length); var body = new_buf(2 * val$1.length); body.write_shift(2 * val$1.length, val$1, "utf16le"); var postamble = new_buf(4); postamble.write_shift(4, 0); return bconcat([ preamble, body, postamble ]); } function write_XLSBFormulaRef(str) { var cell = decode_cell(str); var out = new_buf(15); out.write_shift(4, 7); out.write_shift(1, 4 | 1 << 5); out.write_shift(4, cell.r); out.write_shift(2, cell.c | (str.charAt(0) == "$" ? 0 : 1) << 14 | (str.match(/\$\d/) ? 0 : 1) << 15); out.write_shift(4, 0); return out; } function write_XLSBFormulaRef3D(str, wb) { var lastbang = str.lastIndexOf("!"); var sname = str.slice(0, lastbang); str = str.slice(lastbang + 1); var cell = decode_cell(str); if (sname.charAt(0) == "'") sname = sname.slice(1, -1).replace(/''/g, "'"); var out = new_buf(17); out.write_shift(4, 9); out.write_shift(1, 26 | 1 << 5); out.write_shift(2, 2 + wb.SheetNames.map(function(n$9) { return n$9.toLowerCase(); }).indexOf(sname.toLowerCase())); out.write_shift(4, cell.r); out.write_shift(2, cell.c | (str.charAt(0) == "$" ? 0 : 1) << 14 | (str.match(/\$\d/) ? 0 : 1) << 15); out.write_shift(4, 0); return out; } function write_XLSBFormulaRefErr3D(str, wb) { var lastbang = str.lastIndexOf("!"); var sname = str.slice(0, lastbang); str = str.slice(lastbang + 1); if (sname.charAt(0) == "'") sname = sname.slice(1, -1).replace(/''/g, "'"); var out = new_buf(17); out.write_shift(4, 9); out.write_shift(1, 28 | 1 << 5); out.write_shift(2, 2 + wb.SheetNames.map(function(n$9) { return n$9.toLowerCase(); }).indexOf(sname.toLowerCase())); out.write_shift(4, 0); out.write_shift(2, 0); out.write_shift(4, 0); return out; } function write_XLSBFormulaRange(_str) { var parts = _str.split(":"), str = parts[0]; var out = new_buf(23); out.write_shift(4, 15); str = parts[0]; var cell = decode_cell(str); out.write_shift(1, 4 | 1 << 5); out.write_shift(4, cell.r); out.write_shift(2, cell.c | (str.charAt(0) == "$" ? 0 : 1) << 14 | (str.match(/\$\d/) ? 0 : 1) << 15); out.write_shift(4, 0); str = parts[1]; cell = decode_cell(str); out.write_shift(1, 4 | 1 << 5); out.write_shift(4, cell.r); out.write_shift(2, cell.c | (str.charAt(0) == "$" ? 0 : 1) << 14 | (str.match(/\$\d/) ? 0 : 1) << 15); out.write_shift(4, 0); out.write_shift(1, 17); out.write_shift(4, 0); return out; } function write_XLSBFormulaRangeWS(_str, wb) { var lastbang = _str.lastIndexOf("!"); var sname = _str.slice(0, lastbang); _str = _str.slice(lastbang + 1); if (sname.charAt(0) == "'") sname = sname.slice(1, -1).replace(/''/g, "'"); var parts = _str.split(":"); var out = new_buf(27); out.write_shift(4, 19); var str = parts[0], cell = decode_cell(str); out.write_shift(1, 26 | 1 << 5); out.write_shift(2, 2 + wb.SheetNames.map(function(n$9) { return n$9.toLowerCase(); }).indexOf(sname.toLowerCase())); out.write_shift(4, cell.r); out.write_shift(2, cell.c | (str.charAt(0) == "$" ? 0 : 1) << 14 | (str.match(/\$\d/) ? 0 : 1) << 15); str = parts[1]; cell = decode_cell(str); out.write_shift(1, 26 | 1 << 5); out.write_shift(2, 2 + wb.SheetNames.map(function(n$9) { return n$9.toLowerCase(); }).indexOf(sname.toLowerCase())); out.write_shift(4, cell.r); out.write_shift(2, cell.c | (str.charAt(0) == "$" ? 0 : 1) << 14 | (str.match(/\$\d/) ? 0 : 1) << 15); out.write_shift(1, 17); out.write_shift(4, 0); return out; } function write_XLSBFormulaArea3D(_str, wb) { var lastbang = _str.lastIndexOf("!"); var sname = _str.slice(0, lastbang); _str = _str.slice(lastbang + 1); if (sname.charAt(0) == "'") sname = sname.slice(1, -1).replace(/''/g, "'"); var range = decode_range(_str); var out = new_buf(23); out.write_shift(4, 15); out.write_shift(1, 27 | 1 << 5); out.write_shift(2, 2 + wb.SheetNames.map(function(n$9) { return n$9.toLowerCase(); }).indexOf(sname.toLowerCase())); out.write_shift(4, range.s.r); out.write_shift(4, range.e.r); out.write_shift(2, range.s.c); out.write_shift(2, range.e.c); out.write_shift(4, 0); return out; } function write_XLSBFormula(val$1, wb) { if (typeof val$1 == "number") return write_XLSBFormulaNum(val$1); if (typeof val$1 == "boolean") return write_XLSBFormulaBool(val$1); if (/^#(DIV\/0!|GETTING_DATA|N\/A|NAME\?|NULL!|NUM!|REF!|VALUE!)$/.test(val$1)) return write_XLSBFormulaErr(+RBErr[val$1]); if (val$1.match(/^\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/)) return write_XLSBFormulaRef(val$1); if (val$1.match(/^\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/)) return write_XLSBFormulaRange(val$1); if (val$1.match(/^#REF!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/)) return write_XLSBFormulaArea3D(val$1, wb); if (val$1.match(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/)) return write_XLSBFormulaRef3D(val$1, wb); if (val$1.match(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/)) return write_XLSBFormulaRangeWS(val$1, wb); if (/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!#REF!$/.test(val$1)) return write_XLSBFormulaRefErr3D(val$1, wb); if (/^".*"$/.test(val$1)) return write_XLSBFormulaStr(val$1); if (/^[+-]\d+$/.test(val$1)) return write_XLSBFormulaNum(parseInt(val$1, 10)); throw "Formula |" + val$1 + "| not supported for XLSB"; } function ods_to_csf_formula(f$4) { if (f$4.slice(0, 3) == "of:") f$4 = f$4.slice(3); if (f$4.charCodeAt(0) == 61) { f$4 = f$4.slice(1); if (f$4.charCodeAt(0) == 61) f$4 = f$4.slice(1); } f$4 = f$4.replace(/COM\.MICROSOFT\./g, ""); f$4 = f$4.replace(/\[((?:\.[A-Z]+[0-9]+)(?::\.[A-Z]+[0-9]+)?)\]/g, function($$, $1) { return $1.replace(/\./g, ""); }); f$4 = f$4.replace(/\$'([^']|'')+'/g, function($$) { return $$.slice(1); }); f$4 = f$4.replace(/\$([^\]\. #$]+)/g, function($$, $1) { return $1.match(/^([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])?(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})?$/) ? $$ : $1; }); f$4 = f$4.replace(/\[.(#[A-Z]*[?!])\]/g, "$1"); return f$4.replace(/[;~]/g, ",").replace(/\|/g, ";"); } function csf_to_ods_formula(f$4) { var o$10 = "of:=" + f$4.replace(crefregex, "$1[.$2$3$4$5]").replace(/\]:\[/g, ":"); return o$10.replace(/;/g, "|").replace(/,/g, ";"); } function ods_to_csf_3D(r$10) { r$10 = r$10.replace(/\$'([^']|'')+'/g, function($$) { return $$.slice(1); }); r$10 = r$10.replace(/\$([^\]\. #$]+)/g, function($$, $1) { return $1.match(/^([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])?(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})?$/) ? $$ : $1; }); var a$2 = r$10.split(":"); var s$5 = a$2[0].split(".")[0]; return [s$5, a$2[0].split(".")[1] + (a$2.length > 1 ? ":" + (a$2[1].split(".")[1] || a$2[1].split(".")[0]) : "")]; } function csf_to_ods_3D(r$10) { return r$10.replace(/!/, ".").replace(/:/, ":."); } function get_sst_id(sst, str, rev) { var i$7 = 0, len = sst.length; if (rev) { if (browser_has_Map ? rev.has(str) : Object.prototype.hasOwnProperty.call(rev, str)) { var revarr = browser_has_Map ? rev.get(str) : rev[str]; for (; i$7 < revarr.length; ++i$7) { if (sst[revarr[i$7]].t === str) { sst.Count++; return revarr[i$7]; } } } } else for (; i$7 < len; ++i$7) { if (sst[i$7].t === str) { sst.Count++; return i$7; } } sst[len] = { t: str }; sst.Count++; sst.Unique++; if (rev) { if (browser_has_Map) { if (!rev.has(str)) rev.set(str, []); rev.get(str).push(len); } else { if (!Object.prototype.hasOwnProperty.call(rev, str)) rev[str] = []; rev[str].push(len); } } return len; } function col_obj_w(C$2, col) { var p$3 = { min: C$2 + 1, max: C$2 + 1 }; var wch = -1; if (col.MDW) MDW = col.MDW; if (col.width != null) p$3.customWidth = 1; else if (col.wpx != null) wch = px2char(col.wpx); else if (col.wch != null) wch = col.wch; if (wch > -1) { p$3.width = char2width(wch); p$3.customWidth = 1; } else if (col.width != null) p$3.width = col.width; if (col.hidden) p$3.hidden = true; if (col.level != null) { p$3.outlineLevel = p$3.level = col.level; } return p$3; } function default_margins(margins, mode) { if (!margins) return; var defs = [ .7, .7, .75, .75, .3, .3 ]; if (mode == "xlml") defs = [ 1, 1, 1, 1, .5, .5 ]; if (margins.left == null) margins.left = defs[0]; if (margins.right == null) margins.right = defs[1]; if (margins.top == null) margins.top = defs[2]; if (margins.bottom == null) margins.bottom = defs[3]; if (margins.header == null) margins.header = defs[4]; if (margins.footer == null) margins.footer = defs[5]; } function get_cell_style(styles$1, cell, opts) { var z$2 = opts.revssf[cell.z != null ? cell.z : "General"]; var i$7 = 60, len = styles$1.length; if (z$2 == null && opts.ssf) { for (; i$7 < 392; ++i$7) if (opts.ssf[i$7] == null) { SSF__load(cell.z, i$7); opts.ssf[i$7] = cell.z; opts.revssf[cell.z] = z$2 = i$7; break; } } for (i$7 = 0; i$7 != len; ++i$7) if (styles$1[i$7].numFmtId === z$2) return i$7; styles$1[len] = { numFmtId: z$2, fontId: 0, fillId: 0, borderId: 0, xfId: 0, applyNumberFormat: 1 }; return len; } function safe_format(p$3, fmtid, fillid, opts, themes, styles$1, date1904) { try { if (opts.cellNF) p$3.z = table_fmt[fmtid]; } catch (e$10) { if (opts.WTF) throw e$10; } if (p$3.t === "z" && !opts.cellStyles) return; if (p$3.t === "d" && typeof p$3.v === "string") p$3.v = parseDate(p$3.v); if ((!opts || opts.cellText !== false) && p$3.t !== "z") try { if (table_fmt[fmtid] == null) SSF__load(SSFImplicit[fmtid] || "General", fmtid); if (p$3.t === "e") p$3.w = p$3.w || BErr[p$3.v]; else if (fmtid === 0) { if (p$3.t === "n") { if ((p$3.v | 0) === p$3.v) p$3.w = p$3.v.toString(10); else p$3.w = SSF_general_num(p$3.v); } else if (p$3.t === "d") { var dd = datenum(p$3.v, !!date1904); if ((dd | 0) === dd) p$3.w = dd.toString(10); else p$3.w = SSF_general_num(dd); } else if (p$3.v === undefined) return ""; else p$3.w = SSF_general(p$3.v, _ssfopts); } else if (p$3.t === "d") p$3.w = SSF_format(fmtid, datenum(p$3.v, !!date1904), _ssfopts); else p$3.w = SSF_format(fmtid, p$3.v, _ssfopts); } catch (e$10) { if (opts.WTF) throw e$10; } if (!opts.cellStyles) return; if (fillid != null) try { p$3.s = styles$1.Fills[fillid]; if (p$3.s.fgColor && p$3.s.fgColor.theme && !p$3.s.fgColor.rgb) { p$3.s.fgColor.rgb = rgb_tint(themes.themeElements.clrScheme[p$3.s.fgColor.theme].rgb, p$3.s.fgColor.tint || 0); if (opts.WTF) p$3.s.fgColor.raw_rgb = themes.themeElements.clrScheme[p$3.s.fgColor.theme].rgb; } if (p$3.s.bgColor && p$3.s.bgColor.theme) { p$3.s.bgColor.rgb = rgb_tint(themes.themeElements.clrScheme[p$3.s.bgColor.theme].rgb, p$3.s.bgColor.tint || 0); if (opts.WTF) p$3.s.bgColor.raw_rgb = themes.themeElements.clrScheme[p$3.s.bgColor.theme].rgb; } } catch (e$10) { if (opts.WTF && styles$1.Fills) throw e$10; } } function check_ws(ws, sname, i$7) { if (ws && ws["!ref"]) { var range = safe_decode_range(ws["!ref"]); if (range.e.c < range.s.c || range.e.r < range.s.r) throw new Error("Bad range (" + i$7 + "): " + ws["!ref"]); } } function parse_ws_xml_dim(ws, s$5) { var d$5 = safe_decode_range(s$5); if (d$5.s.r <= d$5.e.r && d$5.s.c <= d$5.e.c && d$5.s.r >= 0 && d$5.s.c >= 0) ws["!ref"] = encode_range(d$5); } function parse_ws_xml(data, opts, idx, rels, wb, themes, styles$1) { if (!data) return data; if (!rels) rels = { "!id": {} }; if (DENSE != null && opts.dense == null) opts.dense = DENSE; var s$5 = {}; if (opts.dense) s$5["!data"] = []; var refguess = { s: { r: 2e6, c: 2e6 }, e: { r: 0, c: 0 } }; var data1 = "", data2 = ""; var mtch = str_match_xml_ns(data, "sheetData"); if (mtch) { data1 = data.slice(0, mtch.index); data2 = data.slice(mtch.index + mtch[0].length); } else data1 = data2 = data; var sheetPr = data1.match(sheetprregex); if (sheetPr) parse_ws_xml_sheetpr(sheetPr[0], s$5, wb, idx); else if (sheetPr = str_match_xml_ns(data1, "sheetPr")) parse_ws_xml_sheetpr2(sheetPr[0], sheetPr[1] || "", s$5, wb, idx, styles$1, themes); var ridx = (data1.match(/<(?:\w*:)?dimension/) || { index: -1 }).index; if (ridx > 0) { var ref = data1.slice(ridx, ridx + 50).match(dimregex); if (ref && !(opts && opts.nodim)) parse_ws_xml_dim(s$5, ref[1]); } var svs = str_match_xml_ns(data1, "sheetViews"); if (svs && svs[1]) parse_ws_xml_sheetviews(svs[1], wb); var columns = []; if (opts.cellStyles) { var cols = data1.match(colregex); if (cols) parse_ws_xml_cols(columns, cols); } if (mtch) parse_ws_xml_data(mtch[1], s$5, opts, refguess, themes, styles$1, wb); var afilter = data2.match(afregex); if (afilter) s$5["!autofilter"] = parse_ws_xml_autofilter(afilter[0]); var merges = []; var _merge = data2.match(mergecregex); if (_merge) for (ridx = 0; ridx != _merge.length; ++ridx) merges[ridx] = safe_decode_range(_merge[ridx].slice(_merge[ridx].indexOf("=") + 2)); var hlink = data2.match(hlinkregex); if (hlink) parse_ws_xml_hlinks(s$5, hlink, rels); var margins = data2.match(marginregex); if (margins) s$5["!margins"] = parse_ws_xml_margins(parsexmltag(margins[0])); var m$3; if (m$3 = data2.match(/legacyDrawing r:id="(.*?)"/)) s$5["!legrel"] = m$3[1]; if (opts && opts.nodim) refguess.s.c = refguess.s.r = 0; if (!s$5["!ref"] && refguess.e.c >= refguess.s.c && refguess.e.r >= refguess.s.r) s$5["!ref"] = encode_range(refguess); if (opts.sheetRows > 0 && s$5["!ref"]) { var tmpref = safe_decode_range(s$5["!ref"]); if (opts.sheetRows <= +tmpref.e.r) { tmpref.e.r = opts.sheetRows - 1; if (tmpref.e.r > refguess.e.r) tmpref.e.r = refguess.e.r; if (tmpref.e.r < tmpref.s.r) tmpref.s.r = tmpref.e.r; if (tmpref.e.c > refguess.e.c) tmpref.e.c = refguess.e.c; if (tmpref.e.c < tmpref.s.c) tmpref.s.c = tmpref.e.c; s$5["!fullref"] = s$5["!ref"]; s$5["!ref"] = encode_range(tmpref); } } if (columns.length > 0) s$5["!cols"] = columns; if (merges.length > 0) s$5["!merges"] = merges; if (rels["!id"][s$5["!legrel"]]) s$5["!legdrawel"] = rels["!id"][s$5["!legrel"]]; return s$5; } function write_ws_xml_merges(merges) { if (merges.length === 0) return ""; var o$10 = ""; for (var i$7 = 0; i$7 != merges.length; ++i$7) o$10 += ""; return o$10 + ""; } function parse_ws_xml_sheetpr(sheetPr, s$5, wb, idx) { var data = parsexmltag(sheetPr); if (!wb.Sheets[idx]) wb.Sheets[idx] = {}; if (data.codeName) wb.Sheets[idx].CodeName = unescapexml(utf8read(data.codeName)); } function parse_ws_xml_sheetpr2(sheetPr, body, s$5, wb, idx) { parse_ws_xml_sheetpr(sheetPr.slice(0, sheetPr.indexOf(">")), s$5, wb, idx); } function write_ws_xml_sheetpr(ws, wb, idx, opts, o$10) { var needed = false; var props = {}, payload = null; if (opts.bookType !== "xlsx" && wb.vbaraw) { var cname = wb.SheetNames[idx]; try { if (wb.Workbook) cname = wb.Workbook.Sheets[idx].CodeName || cname; } catch (e$10) {} needed = true; props.codeName = utf8write(escapexml(cname)); } if (ws && ws["!outline"]) { var outlineprops = { summaryBelow: 1, summaryRight: 1 }; if (ws["!outline"].above) outlineprops.summaryBelow = 0; if (ws["!outline"].left) outlineprops.summaryRight = 0; payload = (payload || "") + writextag("outlinePr", null, outlineprops); } if (!needed && !payload) return; o$10[o$10.length] = writextag("sheetPr", payload, props); } function write_ws_xml_protection(sp) { var o$10 = { sheet: 1 }; sheetprot_deffalse.forEach(function(n$9) { if (sp[n$9] != null && sp[n$9]) o$10[n$9] = "1"; }); sheetprot_deftrue.forEach(function(n$9) { if (sp[n$9] != null && !sp[n$9]) o$10[n$9] = "0"; }); if (sp.password) o$10.password = crypto_CreatePasswordVerifier_Method1(sp.password).toString(16).toUpperCase(); return writextag("sheetProtection", null, o$10); } function parse_ws_xml_hlinks(s$5, data, rels) { var dense = s$5["!data"] != null; for (var i$7 = 0; i$7 != data.length; ++i$7) { var val$1 = parsexmltag(utf8read(data[i$7]), true); if (!val$1.ref) return; var rel$1 = ((rels || {})["!id"] || [])[val$1.id]; if (rel$1) { val$1.Target = rel$1.Target; if (val$1.location) val$1.Target += "#" + unescapexml(val$1.location); } else { val$1.Target = "#" + unescapexml(val$1.location); rel$1 = { Target: val$1.Target, TargetMode: "Internal" }; } val$1.Rel = rel$1; if (val$1.tooltip) { val$1.Tooltip = val$1.tooltip; delete val$1.tooltip; } var rng = safe_decode_range(val$1.ref); for (var R$1 = rng.s.r; R$1 <= rng.e.r; ++R$1) for (var C$2 = rng.s.c; C$2 <= rng.e.c; ++C$2) { var addr = encode_col(C$2) + encode_row(R$1); if (dense) { if (!s$5["!data"][R$1]) s$5["!data"][R$1] = []; if (!s$5["!data"][R$1][C$2]) s$5["!data"][R$1][C$2] = { t: "z", v: undefined }; s$5["!data"][R$1][C$2].l = val$1; } else { if (!s$5[addr]) s$5[addr] = { t: "z", v: undefined }; s$5[addr].l = val$1; } } } } function parse_ws_xml_margins(margin) { var o$10 = {}; [ "left", "right", "top", "bottom", "header", "footer" ].forEach(function(k$2) { if (margin[k$2]) o$10[k$2] = parseFloat(margin[k$2]); }); return o$10; } function write_ws_xml_margins(margin) { default_margins(margin); return writextag("pageMargins", null, margin); } function parse_ws_xml_cols(columns, cols) { var seencol = false; for (var coli = 0; coli != cols.length; ++coli) { var coll = parsexmltag(cols[coli], true); if (coll.hidden) coll.hidden = parsexmlbool(coll.hidden); var colm = parseInt(coll.min, 10) - 1, colM = parseInt(coll.max, 10) - 1; if (coll.outlineLevel) coll.level = +coll.outlineLevel || 0; delete coll.min; delete coll.max; coll.width = +coll.width; if (!seencol && coll.width) { seencol = true; find_mdw_colw(coll.width); } process_col(coll); while (colm <= colM) columns[colm++] = dup(coll); } } function write_ws_xml_cols(ws, cols) { var o$10 = [""], col; for (var i$7 = 0; i$7 != cols.length; ++i$7) { if (!(col = cols[i$7])) continue; o$10[o$10.length] = writextag("col", null, col_obj_w(i$7, col)); } o$10[o$10.length] = ""; return o$10.join(""); } function parse_ws_xml_autofilter(data) { var o$10 = { ref: (data.match(/ref="([^"]*)"/) || [])[1] }; return o$10; } function write_ws_xml_autofilter(data, ws, wb, idx) { var ref = typeof data.ref == "string" ? data.ref : encode_range(data.ref); if (!wb.Workbook) wb.Workbook = { Sheets: [] }; if (!wb.Workbook.Names) wb.Workbook.Names = []; var names = wb.Workbook.Names; var range = decode_range(ref); if (range.s.r == range.e.r) { range.e.r = decode_range(ws["!ref"]).e.r; ref = encode_range(range); } for (var i$7 = 0; i$7 < names.length; ++i$7) { var name = names[i$7]; if (name.Name != "_xlnm._FilterDatabase") continue; if (name.Sheet != idx) continue; name.Ref = formula_quote_sheet_name(wb.SheetNames[idx]) + "!" + fix_range(ref); break; } if (i$7 == names.length) names.push({ Name: "_xlnm._FilterDatabase", Sheet: idx, Ref: "'" + wb.SheetNames[idx] + "'!" + ref }); return writextag("autoFilter", null, { ref }); } function parse_ws_xml_sheetviews(data, wb) { if (!wb.Views) wb.Views = [{}]; (data.match(sviewregex) || []).forEach(function(r$10, i$7) { var tag = parsexmltag(r$10); if (!wb.Views[i$7]) wb.Views[i$7] = {}; if (+tag.zoomScale) wb.Views[i$7].zoom = +tag.zoomScale; if (tag.rightToLeft && parsexmlbool(tag.rightToLeft)) wb.Views[i$7].RTL = true; }); } function write_ws_xml_sheetviews(ws, opts, idx, wb) { var sview = { workbookViewId: "0" }; if ((((wb || {}).Workbook || {}).Views || [])[0]) sview.rightToLeft = wb.Workbook.Views[0].RTL ? "1" : "0"; return writextag("sheetViews", writextag("sheetView", null, sview), {}); } function write_ws_xml_cell(cell, ref, ws, opts, idx, wb, date1904) { if (cell.c) ws["!comments"].push([ref, cell.c]); if ((cell.v === undefined || cell.t === "z" && !(opts || {}).sheetStubs) && typeof cell.f !== "string" && typeof cell.z == "undefined") return ""; var vv = ""; var oldt = cell.t, oldv = cell.v; if (cell.t !== "z") switch (cell.t) { case "b": vv = cell.v ? "1" : "0"; break; case "n": if (isNaN(cell.v)) { cell.t = "e"; vv = BErr[cell.v = 36]; } else if (!isFinite(cell.v)) { cell.t = "e"; vv = BErr[cell.v = 7]; } else vv = "" + cell.v; break; case "e": vv = BErr[cell.v]; break; case "d": if (opts && opts.cellDates) { var _vv = parseDate(cell.v, date1904); vv = _vv.toISOString(); if (_vv.getUTCFullYear() < 1900) vv = vv.slice(vv.indexOf("T") + 1).replace("Z", ""); } else { cell = dup(cell); cell.t = "n"; vv = "" + (cell.v = datenum(parseDate(cell.v, date1904), date1904)); } if (typeof cell.z === "undefined") cell.z = table_fmt[14]; break; default: vv = cell.v; break; } var v$3 = cell.t == "z" || cell.v == null ? "" : writetag("v", escapexml(vv)), o$10 = { r: ref }; var os = get_cell_style(opts.cellXfs, cell, opts); if (os !== 0) o$10.s = os; switch (cell.t) { case "n": break; case "d": o$10.t = "d"; break; case "b": o$10.t = "b"; break; case "e": o$10.t = "e"; break; case "z": break; default: if (cell.v == null) { delete cell.t; break; } if (cell.v.length > 32767) throw new Error("Text length must not exceed 32767 characters"); if (opts && opts.bookSST) { v$3 = writetag("v", "" + get_sst_id(opts.Strings, cell.v, opts.revStrings)); o$10.t = "s"; break; } else o$10.t = "str"; break; } if (cell.t != oldt) { cell.t = oldt; cell.v = oldv; } if (typeof cell.f == "string" && cell.f) { var ff = cell.F && cell.F.slice(0, ref.length) == ref ? { t: "array", ref: cell.F } : null; v$3 = writextag("f", escapexml(cell.f), ff) + (cell.v != null ? v$3 : ""); } if (cell.l) { cell.l.display = escapexml(vv); ws["!links"].push([ref, cell.l]); } if (cell.D) o$10.cm = 1; return writextag("c", v$3, o$10); } function write_ws_xml_data(ws, opts, idx, wb) { var o$10 = [], r$10 = [], range = safe_decode_range(ws["!ref"]), cell = "", ref, rr = "", cols = [], R$1 = 0, C$2 = 0, rows = ws["!rows"]; var dense = ws["!data"] != null, data = dense ? ws["!data"] : []; var params = { r: rr }, row, height = -1; var date1904 = (((wb || {}).Workbook || {}).WBProps || {}).date1904; for (C$2 = range.s.c; C$2 <= range.e.c; ++C$2) cols[C$2] = encode_col(C$2); for (R$1 = range.s.r; R$1 <= range.e.r; ++R$1) { r$10 = []; rr = encode_row(R$1); var data_R = dense ? data[R$1] : []; for (C$2 = range.s.c; C$2 <= range.e.c; ++C$2) { ref = cols[C$2] + rr; var _cell = dense ? data_R[C$2] : ws[ref]; if (_cell === undefined) continue; if ((cell = write_ws_xml_cell(_cell, ref, ws, opts, idx, wb, date1904)) != null) r$10.push(cell); } if (r$10.length > 0 || rows && rows[R$1]) { params = { r: rr }; if (rows && rows[R$1]) { row = rows[R$1]; if (row.hidden) params.hidden = 1; height = -1; if (row.hpx) height = px2pt(row.hpx); else if (row.hpt) height = row.hpt; if (height > -1) { params.ht = height; params.customHeight = 1; } if (row.level) { params.outlineLevel = row.level; } } o$10[o$10.length] = writextag("row", r$10.join(""), params); } } if (rows) for (; R$1 < rows.length; ++R$1) { if (rows && rows[R$1]) { params = { r: R$1 + 1 }; row = rows[R$1]; if (row.hidden) params.hidden = 1; height = -1; if (row.hpx) height = px2pt(row.hpx); else if (row.hpt) height = row.hpt; if (height > -1) { params.ht = height; params.customHeight = 1; } if (row.level) { params.outlineLevel = row.level; } o$10[o$10.length] = writextag("row", "", params); } } return o$10.join(""); } function write_ws_xml(idx, opts, wb, rels) { var o$10 = [XML_HEADER, writextag("worksheet", null, { "xmlns": XMLNS_main[0], "xmlns:r": XMLNS.r })]; var s$5 = wb.SheetNames[idx], sidx = 0, rdata = ""; var ws = wb.Sheets[s$5]; if (ws == null) ws = {}; var ref = ws["!ref"] || "A1"; var range = safe_decode_range(ref); if (range.e.c > 16383 || range.e.r > 1048575) { if (opts.WTF) throw new Error("Range " + ref + " exceeds format limit A1:XFD1048576"); range.e.c = Math.min(range.e.c, 16383); range.e.r = Math.min(range.e.c, 1048575); ref = encode_range(range); } if (!rels) rels = {}; ws["!comments"] = []; var _drawing = []; write_ws_xml_sheetpr(ws, wb, idx, opts, o$10); o$10[o$10.length] = writextag("dimension", null, { "ref": ref }); o$10[o$10.length] = write_ws_xml_sheetviews(ws, opts, idx, wb); if (opts.sheetFormat) o$10[o$10.length] = writextag("sheetFormatPr", null, { defaultRowHeight: opts.sheetFormat.defaultRowHeight || "16", baseColWidth: opts.sheetFormat.baseColWidth || "10", outlineLevelRow: opts.sheetFormat.outlineLevelRow || "7" }); if (ws["!cols"] != null && ws["!cols"].length > 0) o$10[o$10.length] = write_ws_xml_cols(ws, ws["!cols"]); o$10[sidx = o$10.length] = ""; ws["!links"] = []; if (ws["!ref"] != null) { rdata = write_ws_xml_data(ws, opts, idx, wb, rels); if (rdata.length > 0) o$10[o$10.length] = rdata; } if (o$10.length > sidx + 1) { o$10[o$10.length] = ""; o$10[sidx] = o$10[sidx].replace("/>", ">"); } if (ws["!protect"]) o$10[o$10.length] = write_ws_xml_protection(ws["!protect"]); if (ws["!autofilter"] != null) o$10[o$10.length] = write_ws_xml_autofilter(ws["!autofilter"], ws, wb, idx); if (ws["!merges"] != null && ws["!merges"].length > 0) o$10[o$10.length] = write_ws_xml_merges(ws["!merges"]); var relc = -1, rel$1, rId = -1; if (ws["!links"].length > 0) { o$10[o$10.length] = ""; ws["!links"].forEach(function(l$3) { if (!l$3[1].Target) return; rel$1 = { "ref": l$3[0] }; if (l$3[1].Target.charAt(0) != "#") { rId = add_rels(rels, -1, escapexml(l$3[1].Target).replace(/#[\s\S]*$/, ""), RELS.HLINK); rel$1["r:id"] = "rId" + rId; } if ((relc = l$3[1].Target.indexOf("#")) > -1) rel$1.location = escapexml(l$3[1].Target.slice(relc + 1)); if (l$3[1].Tooltip) rel$1.tooltip = escapexml(l$3[1].Tooltip); rel$1.display = l$3[1].display; o$10[o$10.length] = writextag("hyperlink", null, rel$1); }); o$10[o$10.length] = ""; } delete ws["!links"]; if (ws["!margins"] != null) o$10[o$10.length] = write_ws_xml_margins(ws["!margins"]); if (!opts || opts.ignoreEC || opts.ignoreEC == void 0) o$10[o$10.length] = writetag("ignoredErrors", writextag("ignoredError", null, { numberStoredAsText: 1, sqref: ref })); if (_drawing.length > 0) { rId = add_rels(rels, -1, "../drawings/drawing" + (idx + 1) + ".xml", RELS.DRAW); o$10[o$10.length] = writextag("drawing", null, { "r:id": "rId" + rId }); ws["!drawing"] = _drawing; } if (ws["!comments"].length > 0) { rId = add_rels(rels, -1, "../drawings/vmlDrawing" + (idx + 1) + ".vml", RELS.VML); o$10[o$10.length] = writextag("legacyDrawing", null, { "r:id": "rId" + rId }); ws["!legacy"] = rId; } if (o$10.length > 1) { o$10[o$10.length] = ""; o$10[1] = o$10[1].replace("/>", ">"); } return o$10.join(""); } function parse_BrtRowHdr(data, length) { var z$2 = {}; var tgt = data.l + length; z$2.r = data.read_shift(4); data.l += 4; var miyRw = data.read_shift(2); data.l += 1; var flags = data.read_shift(1); data.l = tgt; if (flags & 7) z$2.level = flags & 7; if (flags & 16) z$2.hidden = true; if (flags & 32) z$2.hpt = miyRw / 20; return z$2; } function write_BrtRowHdr(R$1, range, ws) { var o$10 = new_buf(17 + 8 * 16); var row = (ws["!rows"] || [])[R$1] || {}; o$10.write_shift(4, R$1); o$10.write_shift(4, 0); var miyRw = 320; if (row.hpx) miyRw = px2pt(row.hpx) * 20; else if (row.hpt) miyRw = row.hpt * 20; o$10.write_shift(2, miyRw); o$10.write_shift(1, 0); var flags = 0; if (row.level) flags |= row.level; if (row.hidden) flags |= 16; if (row.hpx || row.hpt) flags |= 32; o$10.write_shift(1, flags); o$10.write_shift(1, 0); var ncolspan = 0, lcs = o$10.l; o$10.l += 4; var caddr = { r: R$1, c: 0 }; var dense = ws["!data"] != null; for (var i$7 = 0; i$7 < 16; ++i$7) { if (range.s.c > i$7 + 1 << 10 || range.e.c < i$7 << 10) continue; var first = -1, last = -1; for (var j$2 = i$7 << 10; j$2 < i$7 + 1 << 10; ++j$2) { caddr.c = j$2; var cell = dense ? (ws["!data"][caddr.r] || [])[caddr.c] : ws[encode_cell(caddr)]; if (cell) { if (first < 0) first = j$2; last = j$2; } } if (first < 0) continue; ++ncolspan; o$10.write_shift(4, first); o$10.write_shift(4, last); } var l$3 = o$10.l; o$10.l = lcs; o$10.write_shift(4, ncolspan); o$10.l = l$3; return o$10.length > o$10.l ? o$10.slice(0, o$10.l) : o$10; } function write_row_header(ba, ws, range, R$1) { var o$10 = write_BrtRowHdr(R$1, range, ws); if (o$10.length > 17 || (ws["!rows"] || [])[R$1]) write_record(ba, 0, o$10); } function parse_BrtWsFmtInfo() {} function parse_BrtWsProp(data, length) { var z$2 = {}; var f$4 = data[data.l]; ++data.l; z$2.above = !(f$4 & 64); z$2.left = !(f$4 & 128); data.l += 18; z$2.name = parse_XLSBCodeName(data, length - 19); return z$2; } function write_BrtWsProp(str, outl, o$10) { if (o$10 == null) o$10 = new_buf(84 + 4 * str.length); var f$4 = 192; if (outl) { if (outl.above) f$4 &= ~64; if (outl.left) f$4 &= ~128; } o$10.write_shift(1, f$4); for (var i$7 = 1; i$7 < 3; ++i$7) o$10.write_shift(1, 0); write_BrtColor({ auto: 1 }, o$10); o$10.write_shift(-4, -1); o$10.write_shift(-4, -1); write_XLSBCodeName(str, o$10); return o$10.slice(0, o$10.l); } function parse_BrtCellBlank(data) { var cell = parse_XLSBCell(data); return [cell]; } function write_BrtCellBlank(cell, ncell, o$10) { if (o$10 == null) o$10 = new_buf(8); return write_XLSBCell(ncell, o$10); } function parse_BrtShortBlank(data) { var cell = parse_XLSBShortCell(data); return [cell]; } function write_BrtShortBlank(cell, ncell, o$10) { if (o$10 == null) o$10 = new_buf(4); return write_XLSBShortCell(ncell, o$10); } function parse_BrtCellBool(data) { var cell = parse_XLSBCell(data); var fBool = data.read_shift(1); return [ cell, fBool, "b" ]; } function write_BrtCellBool(cell, ncell, o$10) { if (o$10 == null) o$10 = new_buf(9); write_XLSBCell(ncell, o$10); o$10.write_shift(1, cell.v ? 1 : 0); return o$10; } function parse_BrtShortBool(data) { var cell = parse_XLSBShortCell(data); var fBool = data.read_shift(1); return [ cell, fBool, "b" ]; } function write_BrtShortBool(cell, ncell, o$10) { if (o$10 == null) o$10 = new_buf(5); write_XLSBShortCell(ncell, o$10); o$10.write_shift(1, cell.v ? 1 : 0); return o$10; } function parse_BrtCellError(data) { var cell = parse_XLSBCell(data); var bError = data.read_shift(1); return [ cell, bError, "e" ]; } function write_BrtCellError(cell, ncell, o$10) { if (o$10 == null) o$10 = new_buf(9); write_XLSBCell(ncell, o$10); o$10.write_shift(1, cell.v); return o$10; } function parse_BrtShortError(data) { var cell = parse_XLSBShortCell(data); var bError = data.read_shift(1); return [ cell, bError, "e" ]; } function write_BrtShortError(cell, ncell, o$10) { if (o$10 == null) o$10 = new_buf(8); write_XLSBShortCell(ncell, o$10); o$10.write_shift(1, cell.v); o$10.write_shift(2, 0); o$10.write_shift(1, 0); return o$10; } function parse_BrtCellIsst(data) { var cell = parse_XLSBCell(data); var isst = data.read_shift(4); return [ cell, isst, "s" ]; } function write_BrtCellIsst(cell, ncell, o$10) { if (o$10 == null) o$10 = new_buf(12); write_XLSBCell(ncell, o$10); o$10.write_shift(4, ncell.v); return o$10; } function parse_BrtShortIsst(data) { var cell = parse_XLSBShortCell(data); var isst = data.read_shift(4); return [ cell, isst, "s" ]; } function write_BrtShortIsst(cell, ncell, o$10) { if (o$10 == null) o$10 = new_buf(8); write_XLSBShortCell(ncell, o$10); o$10.write_shift(4, ncell.v); return o$10; } function parse_BrtCellReal(data) { var cell = parse_XLSBCell(data); var value = parse_Xnum(data); return [ cell, value, "n" ]; } function write_BrtCellReal(cell, ncell, o$10) { if (o$10 == null) o$10 = new_buf(16); write_XLSBCell(ncell, o$10); write_Xnum(cell.v, o$10); return o$10; } function parse_BrtShortReal(data) { var cell = parse_XLSBShortCell(data); var value = parse_Xnum(data); return [ cell, value, "n" ]; } function write_BrtShortReal(cell, ncell, o$10) { if (o$10 == null) o$10 = new_buf(12); write_XLSBShortCell(ncell, o$10); write_Xnum(cell.v, o$10); return o$10; } function parse_BrtCellRk(data) { var cell = parse_XLSBCell(data); var value = parse_RkNumber(data); return [ cell, value, "n" ]; } function write_BrtCellRk(cell, ncell, o$10) { if (o$10 == null) o$10 = new_buf(12); write_XLSBCell(ncell, o$10); write_RkNumber(cell.v, o$10); return o$10; } function parse_BrtShortRk(data) { var cell = parse_XLSBShortCell(data); var value = parse_RkNumber(data); return [ cell, value, "n" ]; } function write_BrtShortRk(cell, ncell, o$10) { if (o$10 == null) o$10 = new_buf(8); write_XLSBShortCell(ncell, o$10); write_RkNumber(cell.v, o$10); return o$10; } function parse_BrtCellRString(data) { var cell = parse_XLSBCell(data); var value = parse_RichStr(data); return [ cell, value, "is" ]; } function parse_BrtCellSt(data) { var cell = parse_XLSBCell(data); var value = parse_XLWideString(data); return [ cell, value, "str" ]; } function write_BrtCellSt(cell, ncell, o$10) { var data = cell.v == null ? "" : String(cell.v); if (o$10 == null) o$10 = new_buf(12 + 4 * cell.v.length); write_XLSBCell(ncell, o$10); write_XLWideString(data, o$10); return o$10.length > o$10.l ? o$10.slice(0, o$10.l) : o$10; } function parse_BrtShortSt(data) { var cell = parse_XLSBShortCell(data); var value = parse_XLWideString(data); return [ cell, value, "str" ]; } function write_BrtShortSt(cell, ncell, o$10) { var data = cell.v == null ? "" : String(cell.v); if (o$10 == null) o$10 = new_buf(8 + 4 * data.length); write_XLSBShortCell(ncell, o$10); write_XLWideString(data, o$10); return o$10.length > o$10.l ? o$10.slice(0, o$10.l) : o$10; } function parse_BrtFmlaBool(data, length, opts) { var end = data.l + length; var cell = parse_XLSBCell(data); cell.r = opts["!row"]; var value = data.read_shift(1); var o$10 = [ cell, value, "b" ]; if (opts.cellFormula) { data.l += 2; var formula = parse_XLSBCellParsedFormula(data, end - data.l, opts); o$10[3] = stringify_formula(formula, null, cell, opts.supbooks, opts); } else data.l = end; return o$10; } function parse_BrtFmlaError(data, length, opts) { var end = data.l + length; var cell = parse_XLSBCell(data); cell.r = opts["!row"]; var value = data.read_shift(1); var o$10 = [ cell, value, "e" ]; if (opts.cellFormula) { data.l += 2; var formula = parse_XLSBCellParsedFormula(data, end - data.l, opts); o$10[3] = stringify_formula(formula, null, cell, opts.supbooks, opts); } else data.l = end; return o$10; } function parse_BrtFmlaNum(data, length, opts) { var end = data.l + length; var cell = parse_XLSBCell(data); cell.r = opts["!row"]; var value = parse_Xnum(data); var o$10 = [ cell, value, "n" ]; if (opts.cellFormula) { data.l += 2; var formula = parse_XLSBCellParsedFormula(data, end - data.l, opts); o$10[3] = stringify_formula(formula, null, cell, opts.supbooks, opts); } else data.l = end; return o$10; } function parse_BrtFmlaString(data, length, opts) { var end = data.l + length; var cell = parse_XLSBCell(data); cell.r = opts["!row"]; var value = parse_XLWideString(data); var o$10 = [ cell, value, "str" ]; if (opts.cellFormula) { data.l += 2; var formula = parse_XLSBCellParsedFormula(data, end - data.l, opts); o$10[3] = stringify_formula(formula, null, cell, opts.supbooks, opts); } else data.l = end; return o$10; } function write_BrtBeginMergeCells(cnt, o$10) { if (o$10 == null) o$10 = new_buf(4); o$10.write_shift(4, cnt); return o$10; } function parse_BrtHLink(data, length) { var end = data.l + length; var rfx = parse_UncheckedRfX(data, 16); var relId = parse_XLNullableWideString(data); var loc = parse_XLWideString(data); var tooltip = parse_XLWideString(data); var display = parse_XLWideString(data); data.l = end; var o$10 = { rfx, relId, loc, display }; if (tooltip) o$10.Tooltip = tooltip; return o$10; } function write_BrtHLink(l$3, rId) { var o$10 = new_buf(50 + 4 * (l$3[1].Target.length + (l$3[1].Tooltip || "").length)); write_UncheckedRfX({ s: decode_cell(l$3[0]), e: decode_cell(l$3[0]) }, o$10); write_RelID("rId" + rId, o$10); var locidx = l$3[1].Target.indexOf("#"); var loc = locidx == -1 ? "" : l$3[1].Target.slice(locidx + 1); write_XLWideString(loc || "", o$10); write_XLWideString(l$3[1].Tooltip || "", o$10); write_XLWideString("", o$10); return o$10.slice(0, o$10.l); } function parse_BrtPane() {} function parse_BrtArrFmla(data, length, opts) { var end = data.l + length; var rfx = parse_RfX(data, 16); var fAlwaysCalc = data.read_shift(1); var o$10 = [rfx]; o$10[2] = fAlwaysCalc; if (opts.cellFormula) { var formula = parse_XLSBArrayParsedFormula(data, end - data.l, opts); o$10[1] = formula; } else data.l = end; return o$10; } function parse_BrtShrFmla(data, length, opts) { var end = data.l + length; var rfx = parse_UncheckedRfX(data, 16); var o$10 = [rfx]; if (opts.cellFormula) { var formula = parse_XLSBSharedParsedFormula(data, end - data.l, opts); o$10[1] = formula; data.l = end; } else data.l = end; return o$10; } function write_BrtColInfo(C$2, col, o$10) { if (o$10 == null) o$10 = new_buf(18); var p$3 = col_obj_w(C$2, col); o$10.write_shift(-4, C$2); o$10.write_shift(-4, C$2); o$10.write_shift(4, (p$3.width || 10) * 256); o$10.write_shift(4, 0); var flags = 0; if (col.hidden) flags |= 1; if (typeof p$3.width == "number") flags |= 2; if (col.level) flags |= col.level << 8; o$10.write_shift(2, flags); return o$10; } function parse_BrtMargins(data) { var margins = {}; BrtMarginKeys.forEach(function(k$2) { margins[k$2] = parse_Xnum(data, 8); }); return margins; } function write_BrtMargins(margins, o$10) { if (o$10 == null) o$10 = new_buf(6 * 8); default_margins(margins); BrtMarginKeys.forEach(function(k$2) { write_Xnum(margins[k$2], o$10); }); return o$10; } function parse_BrtBeginWsView(data) { var f$4 = data.read_shift(2); data.l += 28; return { RTL: f$4 & 32 }; } function write_BrtBeginWsView(ws, Workbook, o$10) { if (o$10 == null) o$10 = new_buf(30); var f$4 = 924; if ((((Workbook || {}).Views || [])[0] || {}).RTL) f$4 |= 32; o$10.write_shift(2, f$4); o$10.write_shift(4, 0); o$10.write_shift(4, 0); o$10.write_shift(4, 0); o$10.write_shift(1, 0); o$10.write_shift(1, 0); o$10.write_shift(2, 0); o$10.write_shift(2, 100); o$10.write_shift(2, 0); o$10.write_shift(2, 0); o$10.write_shift(2, 0); o$10.write_shift(4, 0); return o$10; } function write_BrtCellIgnoreEC(ref) { var o$10 = new_buf(24); o$10.write_shift(4, 4); o$10.write_shift(4, 1); write_UncheckedRfX(ref, o$10); return o$10; } function write_BrtSheetProtection(sp, o$10) { if (o$10 == null) o$10 = new_buf(16 * 4 + 2); o$10.write_shift(2, sp.password ? crypto_CreatePasswordVerifier_Method1(sp.password) : 0); o$10.write_shift(4, 1); [ ["objects", false], ["scenarios", false], ["formatCells", true], ["formatColumns", true], ["formatRows", true], ["insertColumns", true], ["insertRows", true], ["insertHyperlinks", true], ["deleteColumns", true], ["deleteRows", true], ["selectLockedCells", false], ["sort", true], ["autoFilter", true], ["pivotTables", true], ["selectUnlockedCells", false] ].forEach(function(n$9) { if (n$9[1]) o$10.write_shift(4, sp[n$9[0]] != null && !sp[n$9[0]] ? 1 : 0); else o$10.write_shift(4, sp[n$9[0]] != null && sp[n$9[0]] ? 0 : 1); }); return o$10; } function parse_BrtDVal() {} function parse_BrtDVal14() {} function parse_ws_bin(data, _opts, idx, rels, wb, themes, styles$1) { if (!data) return data; var opts = _opts || {}; if (!rels) rels = { "!id": {} }; if (DENSE != null && opts.dense == null) opts.dense = DENSE; var s$5 = {}; if (opts.dense) s$5["!data"] = []; var ref; var refguess = { s: { r: 2e6, c: 2e6 }, e: { r: 0, c: 0 } }; var state$1 = []; var pass = false, end = false; var row, p$3, cf, R$1, C$2, addr, sstr, rr, cell; var merges = []; opts.biff = 12; opts["!row"] = 0; var ai = 0, af = false; var arrayf = []; var sharedf = {}; var supbooks = opts.supbooks || wb.supbooks || [[]]; supbooks.sharedf = sharedf; supbooks.arrayf = arrayf; supbooks.SheetNames = wb.SheetNames || wb.Sheets.map(function(x$2) { return x$2.name; }); if (!opts.supbooks) { opts.supbooks = supbooks; if (wb.Names) for (var i$7 = 0; i$7 < wb.Names.length; ++i$7) supbooks[0][i$7 + 1] = wb.Names[i$7]; } var colinfo = [], rowinfo = []; var seencol = false; XLSBRecordEnum[16] = { n: "BrtShortReal", f: parse_BrtShortReal }; var cm, vm; var date1904 = 1462 * +!!((wb || {}).WBProps || {}).date1904; recordhopper(data, function ws_parse(val$1, RR, RT) { if (end) return; switch (RT) { case 148: ref = val$1; break; case 0: row = val$1; if (opts.sheetRows && opts.sheetRows <= row.r) end = true; rr = encode_row(R$1 = row.r); opts["!row"] = row.r; if (val$1.hidden || val$1.hpt || val$1.level != null) { if (val$1.hpt) val$1.hpx = pt2px(val$1.hpt); rowinfo[val$1.r] = val$1; } break; case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: case 13: case 14: case 15: case 16: case 17: case 18: case 62: p$3 = { t: val$1[2] }; switch (val$1[2]) { case "n": p$3.v = val$1[1]; break; case "s": sstr = strs[val$1[1]]; p$3.v = sstr.t; p$3.r = sstr.r; break; case "b": p$3.v = val$1[1] ? true : false; break; case "e": p$3.v = val$1[1]; if (opts.cellText !== false) p$3.w = BErr[p$3.v]; break; case "str": p$3.t = "s"; p$3.v = val$1[1]; break; case "is": p$3.t = "s"; p$3.v = val$1[1].t; break; } if (cf = styles$1.CellXf[val$1[0].iStyleRef]) safe_format(p$3, cf.numFmtId, null, opts, themes, styles$1, date1904 > 0); C$2 = val$1[0].c == -1 ? C$2 + 1 : val$1[0].c; if (opts.dense) { if (!s$5["!data"][R$1]) s$5["!data"][R$1] = []; s$5["!data"][R$1][C$2] = p$3; } else s$5[encode_col(C$2) + rr] = p$3; if (opts.cellFormula) { af = false; for (ai = 0; ai < arrayf.length; ++ai) { var aii = arrayf[ai]; if (row.r >= aii[0].s.r && row.r <= aii[0].e.r) { if (C$2 >= aii[0].s.c && C$2 <= aii[0].e.c) { p$3.F = encode_range(aii[0]); af = true; } } } if (!af && val$1.length > 3) p$3.f = val$1[3]; } if (refguess.s.r > row.r) refguess.s.r = row.r; if (refguess.s.c > C$2) refguess.s.c = C$2; if (refguess.e.r < row.r) refguess.e.r = row.r; if (refguess.e.c < C$2) refguess.e.c = C$2; if (opts.cellDates && cf && p$3.t == "n" && fmt_is_date(table_fmt[cf.numFmtId])) { var _d = SSF_parse_date_code(p$3.v + date1904); if (_d) { p$3.t = "d"; p$3.v = new Date(Date.UTC(_d.y, _d.m - 1, _d.d, _d.H, _d.M, _d.S, _d.u)); } } if (cm) { if (cm.type == "XLDAPR") p$3.D = true; cm = void 0; } if (vm) vm = void 0; break; case 1: case 12: if (!opts.sheetStubs || pass) break; p$3 = { t: "z", v: void 0 }; C$2 = val$1[0].c == -1 ? C$2 + 1 : val$1[0].c; if (opts.dense) { if (!s$5["!data"][R$1]) s$5["!data"][R$1] = []; s$5["!data"][R$1][C$2] = p$3; } else s$5[encode_col(C$2) + rr] = p$3; if (refguess.s.r > row.r) refguess.s.r = row.r; if (refguess.s.c > C$2) refguess.s.c = C$2; if (refguess.e.r < row.r) refguess.e.r = row.r; if (refguess.e.c < C$2) refguess.e.c = C$2; if (cm) { if (cm.type == "XLDAPR") p$3.D = true; cm = void 0; } if (vm) vm = void 0; break; case 176: merges.push(val$1); break; case 49: { cm = ((opts.xlmeta || {}).Cell || [])[val$1 - 1]; } break; case 494: var rel$1 = rels["!id"][val$1.relId]; if (rel$1) { val$1.Target = rel$1.Target; if (val$1.loc) val$1.Target += "#" + val$1.loc; val$1.Rel = rel$1; } else if (val$1.relId == "") { val$1.Target = "#" + val$1.loc; } for (R$1 = val$1.rfx.s.r; R$1 <= val$1.rfx.e.r; ++R$1) for (C$2 = val$1.rfx.s.c; C$2 <= val$1.rfx.e.c; ++C$2) { if (opts.dense) { if (!s$5["!data"][R$1]) s$5["!data"][R$1] = []; if (!s$5["!data"][R$1][C$2]) s$5["!data"][R$1][C$2] = { t: "z", v: undefined }; s$5["!data"][R$1][C$2].l = val$1; } else { addr = encode_col(C$2) + encode_row(R$1); if (!s$5[addr]) s$5[addr] = { t: "z", v: undefined }; s$5[addr].l = val$1; } } break; case 426: if (!opts.cellFormula) break; arrayf.push(val$1); cell = opts.dense ? s$5["!data"][R$1][C$2] : s$5[encode_col(C$2) + rr]; cell.f = stringify_formula(val$1[1], refguess, { r: row.r, c: C$2 }, supbooks, opts); cell.F = encode_range(val$1[0]); break; case 427: if (!opts.cellFormula) break; sharedf[encode_cell(val$1[0].s)] = val$1[1]; cell = opts.dense ? s$5["!data"][R$1][C$2] : s$5[encode_col(C$2) + rr]; cell.f = stringify_formula(val$1[1], refguess, { r: row.r, c: C$2 }, supbooks, opts); break; case 60: if (!opts.cellStyles) break; while (val$1.e >= val$1.s) { colinfo[val$1.e--] = { width: val$1.w / 256, hidden: !!(val$1.flags & 1), level: val$1.level }; if (!seencol) { seencol = true; find_mdw_colw(val$1.w / 256); } process_col(colinfo[val$1.e + 1]); } break; case 551: if (val$1) s$5["!legrel"] = val$1; break; case 161: s$5["!autofilter"] = { ref: encode_range(val$1) }; break; case 476: s$5["!margins"] = val$1; break; case 147: if (!wb.Sheets[idx]) wb.Sheets[idx] = {}; if (val$1.name) wb.Sheets[idx].CodeName = val$1.name; if (val$1.above || val$1.left) s$5["!outline"] = { above: val$1.above, left: val$1.left }; break; case 137: if (!wb.Views) wb.Views = [{}]; if (!wb.Views[0]) wb.Views[0] = {}; if (val$1.RTL) wb.Views[0].RTL = true; break; case 485: break; case 64: case 1053: break; case 151: break; case 152: case 175: case 644: case 625: case 562: case 396: case 1112: case 1146: case 471: case 1050: case 649: case 1105: case 589: case 607: case 564: case 1055: case 168: case 174: case 1180: case 499: case 507: case 550: case 171: case 167: case 1177: case 169: case 1181: case 552: case 661: case 639: case 478: case 537: case 477: case 536: case 1103: case 680: case 1104: case 1024: case 663: case 535: case 678: case 504: case 1043: case 428: case 170: case 3072: case 50: case 2070: case 1045: break; case 35: pass = true; break; case 36: pass = false; break; case 37: state$1.push(RT); pass = true; break; case 38: state$1.pop(); pass = false; break; default: if (RR.T) {} else if (!pass || opts.WTF) throw new Error("Unexpected record 0x" + RT.toString(16)); } }, opts); delete opts.supbooks; delete opts["!row"]; if (!s$5["!ref"] && (refguess.s.r < 2e6 || ref && (ref.e.r > 0 || ref.e.c > 0 || ref.s.r > 0 || ref.s.c > 0))) s$5["!ref"] = encode_range(ref || refguess); if (opts.sheetRows && s$5["!ref"]) { var tmpref = safe_decode_range(s$5["!ref"]); if (opts.sheetRows <= +tmpref.e.r) { tmpref.e.r = opts.sheetRows - 1; if (tmpref.e.r > refguess.e.r) tmpref.e.r = refguess.e.r; if (tmpref.e.r < tmpref.s.r) tmpref.s.r = tmpref.e.r; if (tmpref.e.c > refguess.e.c) tmpref.e.c = refguess.e.c; if (tmpref.e.c < tmpref.s.c) tmpref.s.c = tmpref.e.c; s$5["!fullref"] = s$5["!ref"]; s$5["!ref"] = encode_range(tmpref); } } if (merges.length > 0) s$5["!merges"] = merges; if (colinfo.length > 0) s$5["!cols"] = colinfo; if (rowinfo.length > 0) s$5["!rows"] = rowinfo; if (rels["!id"][s$5["!legrel"]]) s$5["!legdrawel"] = rels["!id"][s$5["!legrel"]]; return s$5; } function write_ws_bin_cell(ba, cell, R$1, C$2, opts, ws, last_seen, date1904) { var o$10 = { r: R$1, c: C$2 }; if (cell.c) ws["!comments"].push([encode_cell(o$10), cell.c]); if (cell.v === undefined) return false; var vv = ""; switch (cell.t) { case "b": vv = cell.v ? "1" : "0"; break; case "d": cell = dup(cell); cell.z = cell.z || table_fmt[14]; cell.v = datenum(parseDate(cell.v, date1904), date1904); cell.t = "n"; break; case "n": case "e": vv = "" + cell.v; break; default: vv = cell.v; break; } o$10.s = get_cell_style(opts.cellXfs, cell, opts); if (cell.l) ws["!links"].push([encode_cell(o$10), cell.l]); switch (cell.t) { case "s": case "str": if (opts.bookSST) { vv = get_sst_id(opts.Strings, cell.v == null ? "" : String(cell.v), opts.revStrings); o$10.t = "s"; o$10.v = vv; if (last_seen) write_record(ba, 18, write_BrtShortIsst(cell, o$10)); else write_record(ba, 7, write_BrtCellIsst(cell, o$10)); } else { o$10.t = "str"; if (last_seen) write_record(ba, 17, write_BrtShortSt(cell, o$10)); else write_record(ba, 6, write_BrtCellSt(cell, o$10)); } return true; case "n": if (cell.v == (cell.v | 0) && cell.v > -1e3 && cell.v < 1e3) { if (last_seen) write_record(ba, 13, write_BrtShortRk(cell, o$10)); else write_record(ba, 2, write_BrtCellRk(cell, o$10)); } else if (!isFinite(cell.v)) { o$10.t = "e"; if (isNaN(cell.v)) { if (last_seen) write_record(ba, 14, write_BrtShortError({ t: "e", v: 36 }, o$10)); else write_record(ba, 3, write_BrtCellError({ t: "e", v: 36 }, o$10)); } else { if (last_seen) write_record(ba, 14, write_BrtShortError({ t: "e", v: 7 }, o$10)); else write_record(ba, 3, write_BrtCellError({ t: "e", v: 7 }, o$10)); } } else { if (last_seen) write_record(ba, 16, write_BrtShortReal(cell, o$10)); else write_record(ba, 5, write_BrtCellReal(cell, o$10)); } return true; case "b": o$10.t = "b"; if (last_seen) write_record(ba, 15, write_BrtShortBool(cell, o$10)); else write_record(ba, 4, write_BrtCellBool(cell, o$10)); return true; case "e": o$10.t = "e"; if (last_seen) write_record(ba, 14, write_BrtShortError(cell, o$10)); else write_record(ba, 3, write_BrtCellError(cell, o$10)); return true; } if (last_seen) write_record(ba, 12, write_BrtShortBlank(cell, o$10)); else write_record(ba, 1, write_BrtCellBlank(cell, o$10)); return true; } function write_CELLTABLE(ba, ws, idx, opts, wb) { var range = safe_decode_range(ws["!ref"] || "A1"), rr = "", cols = []; var date1904 = (((wb || {}).Workbook || {}).WBProps || {}).date1904; write_record(ba, 145); var dense = ws["!data"] != null, row = dense ? ws["!data"][range.s.r] : []; var cap = range.e.r; if (ws["!rows"]) cap = Math.max(range.e.r, ws["!rows"].length - 1); for (var R$1 = range.s.r; R$1 <= cap; ++R$1) { rr = encode_row(R$1); if (dense) row = ws["!data"][R$1]; write_row_header(ba, ws, range, R$1); if (dense && !row) continue; var last_seen = false; if (R$1 <= range.e.r) for (var C$2 = range.s.c; C$2 <= range.e.c; ++C$2) { if (R$1 === range.s.r) cols[C$2] = encode_col(C$2); var cell = dense ? row[C$2] : ws[cols[C$2] + rr]; if (!cell) { last_seen = false; continue; } last_seen = write_ws_bin_cell(ba, cell, R$1, C$2, opts, ws, last_seen, date1904); } } write_record(ba, 146); } function write_MERGECELLS(ba, ws) { if (!ws || !ws["!merges"]) return; write_record(ba, 177, write_BrtBeginMergeCells(ws["!merges"].length)); ws["!merges"].forEach(function(m$3) { write_record(ba, 176, write_BrtMergeCell(m$3)); }); write_record(ba, 178); } function write_COLINFOS(ba, ws) { if (!ws || !ws["!cols"]) return; write_record(ba, 390); ws["!cols"].forEach(function(m$3, i$7) { if (m$3) write_record(ba, 60, write_BrtColInfo(i$7, m$3)); }); write_record(ba, 391); } function write_IGNOREECS(ba, ws) { if (!ws || !ws["!ref"]) return; write_record(ba, 648); write_record(ba, 649, write_BrtCellIgnoreEC(safe_decode_range(ws["!ref"]))); write_record(ba, 650); } function write_HLINKS(ba, ws, rels) { ws["!links"].forEach(function(l$3) { if (!l$3[1].Target) return; var rId = add_rels(rels, -1, l$3[1].Target.replace(/#[\s\S]*$/, ""), RELS.HLINK); write_record(ba, 494, write_BrtHLink(l$3, rId)); }); delete ws["!links"]; } function write_LEGACYDRAWING(ba, ws, idx, rels) { if (ws["!comments"].length > 0) { var rId = add_rels(rels, -1, "../drawings/vmlDrawing" + (idx + 1) + ".vml", RELS.VML); write_record(ba, 551, write_RelID("rId" + rId)); ws["!legacy"] = rId; } } function write_AUTOFILTER(ba, ws, wb, idx) { if (!ws["!autofilter"]) return; var data = ws["!autofilter"]; var ref = typeof data.ref === "string" ? data.ref : encode_range(data.ref); if (!wb.Workbook) wb.Workbook = { Sheets: [] }; if (!wb.Workbook.Names) wb.Workbook.Names = []; var names = wb.Workbook.Names; var range = decode_range(ref); if (range.s.r == range.e.r) { range.e.r = decode_range(ws["!ref"]).e.r; ref = encode_range(range); } for (var i$7 = 0; i$7 < names.length; ++i$7) { var name = names[i$7]; if (name.Name != "_xlnm._FilterDatabase") continue; if (name.Sheet != idx) continue; name.Ref = formula_quote_sheet_name(wb.SheetNames[idx]) + "!" + fix_range(ref); break; } if (i$7 == names.length) names.push({ Name: "_xlnm._FilterDatabase", Sheet: idx, Ref: formula_quote_sheet_name(wb.SheetNames[idx]) + "!" + fix_range(ref) }); write_record(ba, 161, write_UncheckedRfX(safe_decode_range(ref))); write_record(ba, 162); } function write_WSVIEWS2(ba, ws, Workbook) { write_record(ba, 133); { write_record(ba, 137, write_BrtBeginWsView(ws, Workbook)); write_record(ba, 138); } write_record(ba, 134); } function write_WSFMTINFO() {} function write_SHEETPROTECT(ba, ws) { if (!ws["!protect"]) return; write_record(ba, 535, write_BrtSheetProtection(ws["!protect"])); } function write_ws_bin(idx, opts, wb, rels) { var ba = buf_array(); var s$5 = wb.SheetNames[idx], ws = wb.Sheets[s$5] || {}; var c$7 = s$5; try { if (wb && wb.Workbook) c$7 = wb.Workbook.Sheets[idx].CodeName || c$7; } catch (e$10) {} var r$10 = safe_decode_range(ws["!ref"] || "A1"); if (r$10.e.c > 16383 || r$10.e.r > 1048575) { if (opts.WTF) throw new Error("Range " + (ws["!ref"] || "A1") + " exceeds format limit A1:XFD1048576"); r$10.e.c = Math.min(r$10.e.c, 16383); r$10.e.r = Math.min(r$10.e.c, 1048575); } ws["!links"] = []; ws["!comments"] = []; write_record(ba, 129); if (wb.vbaraw || ws["!outline"]) write_record(ba, 147, write_BrtWsProp(c$7, ws["!outline"])); write_record(ba, 148, write_BrtWsDim(r$10)); write_WSVIEWS2(ba, ws, wb.Workbook); write_WSFMTINFO(ba, ws); write_COLINFOS(ba, ws, idx, opts, wb); write_CELLTABLE(ba, ws, idx, opts, wb); write_SHEETPROTECT(ba, ws); write_AUTOFILTER(ba, ws, wb, idx); write_MERGECELLS(ba, ws); write_HLINKS(ba, ws, rels); if (ws["!margins"]) write_record(ba, 476, write_BrtMargins(ws["!margins"])); if (!opts || opts.ignoreEC || opts.ignoreEC == void 0) write_IGNOREECS(ba, ws); write_LEGACYDRAWING(ba, ws, idx, rels); write_record(ba, 130); return ba.end(); } function parse_Cache(data) { var col = []; var num = data.match(/^/); var f$4; (data.match(/\/]*>([^<])<\/c:v><\/c:pt>/gm) || []).forEach(function(pt) { var q$2 = pt.match(/\/]*>([^<]*)<\/c:v><\/c:pt>/); if (!q$2) return; col[+q$2[1]] = num ? +q$2[2] : q$2[2]; }); var nf = unescapexml((str_match_xml(data, "c:formatCode") || ["", "General"])[1]); (str_match_ng(data, "", "") || []).forEach(function(F$1) { f$4 = F$1.replace(/<[^<>]*>/g, ""); }); return [ col, nf, f$4 ]; } function parse_chart(data, name, opts, rels, wb, csheet) { var cs = csheet || { "!type": "chart" }; if (!data) return csheet; var C$2 = 0, R$1 = 0, col = "A"; var refguess = { s: { r: 2e6, c: 2e6 }, e: { r: 0, c: 0 } }; (str_match_ng(data, "", "") || []).forEach(function(nc) { var cache = parse_Cache(nc); refguess.s.r = refguess.s.c = 0; refguess.e.c = C$2; col = encode_col(C$2); cache[0].forEach(function(n$9, i$7) { if (cs["!data"]) { if (!cs["!data"][i$7]) cs["!data"][i$7] = []; cs["!data"][i$7][C$2] = { t: "n", v: n$9, z: cache[1] }; } else cs[col + encode_row(i$7)] = { t: "n", v: n$9, z: cache[1] }; R$1 = i$7; }); if (refguess.e.r < R$1) refguess.e.r = R$1; ++C$2; }); if (C$2 > 0) cs["!ref"] = encode_range(refguess); return cs; } function parse_cs_xml(data, opts, idx, rels, wb) { if (!data) return data; if (!rels) rels = { "!id": {} }; var s$5 = { "!type": "chart", "!drawel": null, "!rel": "" }; var m$3; var sheetPr = data.match(sheetprregex); if (sheetPr) parse_ws_xml_sheetpr(sheetPr[0], s$5, wb, idx); if (m$3 = data.match(/drawing r:id="(.*?)"/)) s$5["!rel"] = m$3[1]; if (rels["!id"][s$5["!rel"]]) s$5["!drawel"] = rels["!id"][s$5["!rel"]]; return s$5; } function parse_BrtCsProp(data, length) { data.l += 10; var name = parse_XLWideString(data, length - 10); return { name }; } function parse_cs_bin(data, opts, idx, rels, wb) { if (!data) return data; if (!rels) rels = { "!id": {} }; var s$5 = { "!type": "chart", "!drawel": null, "!rel": "" }; var state$1 = []; var pass = false; recordhopper(data, function cs_parse(val$1, R$1, RT) { switch (RT) { case 550: s$5["!rel"] = val$1; break; case 651: if (!wb.Sheets[idx]) wb.Sheets[idx] = {}; if (val$1.name) wb.Sheets[idx].CodeName = val$1.name; break; case 562: case 652: case 669: case 679: case 551: case 552: case 476: case 3072: break; case 35: pass = true; break; case 36: pass = false; break; case 37: state$1.push(RT); break; case 38: state$1.pop(); break; default: if (R$1.T > 0) state$1.push(RT); else if (R$1.T < 0) state$1.pop(); else if (!pass || opts.WTF) throw new Error("Unexpected record 0x" + RT.toString(16)); } }, opts); if (rels["!id"][s$5["!rel"]]) s$5["!drawel"] = rels["!id"][s$5["!rel"]]; return s$5; } function push_defaults_array(target, defaults) { for (var j$2 = 0; j$2 != target.length; ++j$2) { var w$2 = target[j$2]; for (var i$7 = 0; i$7 != defaults.length; ++i$7) { var z$2 = defaults[i$7]; if (w$2[z$2[0]] == null) w$2[z$2[0]] = z$2[1]; else switch (z$2[2]) { case "bool": if (typeof w$2[z$2[0]] == "string") w$2[z$2[0]] = parsexmlbool(w$2[z$2[0]]); break; case "int": if (typeof w$2[z$2[0]] == "string") w$2[z$2[0]] = parseInt(w$2[z$2[0]], 10); break; } } } } function push_defaults(target, defaults) { for (var i$7 = 0; i$7 != defaults.length; ++i$7) { var z$2 = defaults[i$7]; if (target[z$2[0]] == null) target[z$2[0]] = z$2[1]; else switch (z$2[2]) { case "bool": if (typeof target[z$2[0]] == "string") target[z$2[0]] = parsexmlbool(target[z$2[0]]); break; case "int": if (typeof target[z$2[0]] == "string") target[z$2[0]] = parseInt(target[z$2[0]], 10); break; } } } function parse_wb_defaults(wb) { push_defaults(wb.WBProps, WBPropsDef); push_defaults(wb.CalcPr, CalcPrDef); push_defaults_array(wb.WBView, WBViewDef); push_defaults_array(wb.Sheets, SheetDef); _ssfopts.date1904 = parsexmlbool(wb.WBProps.date1904); } function safe1904(wb) { if (!wb.Workbook) return "false"; if (!wb.Workbook.WBProps) return "false"; return parsexmlbool(wb.Workbook.WBProps.date1904) ? "true" : "false"; } function check_ws_name(n$9, safe) { try { if (n$9 == "") throw new Error("Sheet name cannot be blank"); if (n$9.length > 31) throw new Error("Sheet name cannot exceed 31 chars"); if (n$9.charCodeAt(0) == 39 || n$9.charCodeAt(n$9.length - 1) == 39) throw new Error("Sheet name cannot start or end with apostrophe (')"); if (n$9.toLowerCase() == "history") throw new Error("Sheet name cannot be 'History'"); badchars.forEach(function(c$7) { if (n$9.indexOf(c$7) == -1) return; throw new Error("Sheet name cannot contain : \\ / ? * [ ]"); }); } catch (e$10) { if (safe) return false; throw e$10; } return true; } function check_wb_names(N$2, S$4, codes) { N$2.forEach(function(n$9, i$7) { check_ws_name(n$9); for (var j$2 = 0; j$2 < i$7; ++j$2) if (n$9 == N$2[j$2]) throw new Error("Duplicate Sheet Name: " + n$9); if (codes) { var cn$1 = S$4 && S$4[i$7] && S$4[i$7].CodeName || n$9; if (cn$1.charCodeAt(0) == 95 && cn$1.length > 22) throw new Error("Bad Code Name: Worksheet" + cn$1); } }); } function check_wb(wb) { if (!wb || !wb.SheetNames || !wb.Sheets) throw new Error("Invalid Workbook"); if (!wb.SheetNames.length) throw new Error("Workbook is empty"); var Sheets = wb.Workbook && wb.Workbook.Sheets || []; check_wb_names(wb.SheetNames, Sheets, !!wb.vbaraw); for (var i$7 = 0; i$7 < wb.SheetNames.length; ++i$7) check_ws(wb.Sheets[wb.SheetNames[i$7]], wb.SheetNames[i$7], i$7); wb.SheetNames.forEach(function(n$9, i$8) { var ws = wb.Sheets[n$9]; if (!ws || !ws["!autofilter"]) return; var DN; if (!wb.Workbook) wb.Workbook = {}; if (!wb.Workbook.Names) wb.Workbook.Names = []; wb.Workbook.Names.forEach(function(dn) { if (dn.Name == "_xlnm._FilterDatabase" && dn.Sheet == i$8) DN = dn; }); var nn = formula_quote_sheet_name(n$9) + "!" + fix_range(ws["!autofilter"].ref); if (DN) DN.Ref = nn; else wb.Workbook.Names.push({ Name: "_xlnm._FilterDatabase", Sheet: i$8, Ref: nn }); }); } function parse_wb_xml(data, opts) { if (!data) throw new Error("Could not find file"); var wb = { AppVersion: {}, WBProps: {}, WBView: [], Sheets: [], CalcPr: {}, Names: [], xmlns: "" }; var pass = false, xmlns = "xmlns"; var dname = {}, dnstart = 0; data.replace(tagregex, function xml_wb(x$2, idx) { var y$3 = parsexmltag(x$2); switch (strip_ns(y$3[0])) { case "": break; case "": case "": break; case "": break; case "": WBPropsDef.forEach(function(w$2) { if (y$3[w$2[0]] == null) return; switch (w$2[2]) { case "bool": wb.WBProps[w$2[0]] = parsexmlbool(y$3[w$2[0]]); break; case "int": wb.WBProps[w$2[0]] = parseInt(y$3[w$2[0]], 10); break; default: wb.WBProps[w$2[0]] = y$3[w$2[0]]; } }); if (y$3.codeName) wb.WBProps.CodeName = utf8read(y$3.codeName); break; case "": break; case "": break; case "": case "": break; case "": delete y$3[0]; wb.WBView.push(y$3); break; case "": break; case "": case "": break; case "": break; case "": break; case "": case "": break; case "": break; case "": case "": pass = false; break; case "": { dname.Ref = unescapexml(utf8read(data.slice(dnstart, idx))); wb.Names.push(dname); } break; case "": break; case "": delete y$3[0]; wb.CalcPr = y$3; break; case "": break; case "": case "": case "": break; case "": case "": case "": break; case "": case "": break; case "": break; case "": break; case "": case "": break; case "": case "": case "": break; case "": pass = false; break; case "": pass = true; break; case "": pass = false; break; case " 0; var workbookPr = { codeName: "ThisWorkbook" }; if (wb.Workbook && wb.Workbook.WBProps) { WBPropsDef.forEach(function(x$2) { if (wb.Workbook.WBProps[x$2[0]] == null) return; if (wb.Workbook.WBProps[x$2[0]] == x$2[1]) return; workbookPr[x$2[0]] = wb.Workbook.WBProps[x$2[0]]; }); if (wb.Workbook.WBProps.CodeName) { workbookPr.codeName = wb.Workbook.WBProps.CodeName; delete workbookPr.CodeName; } } o$10[o$10.length] = writextag("workbookPr", null, workbookPr); var sheets = wb.Workbook && wb.Workbook.Sheets || []; var i$7 = 0; if (sheets && sheets[0] && !!sheets[0].Hidden) { o$10[o$10.length] = ""; for (i$7 = 0; i$7 != wb.SheetNames.length; ++i$7) { if (!sheets[i$7]) break; if (!sheets[i$7].Hidden) break; } if (i$7 == wb.SheetNames.length) i$7 = 0; o$10[o$10.length] = ""; o$10[o$10.length] = ""; } o$10[o$10.length] = ""; for (i$7 = 0; i$7 != wb.SheetNames.length; ++i$7) { var sht = { name: escapexml(wb.SheetNames[i$7].slice(0, 31)) }; sht.sheetId = "" + (i$7 + 1); sht["r:id"] = "rId" + (i$7 + 1); if (sheets[i$7]) switch (sheets[i$7].Hidden) { case 1: sht.state = "hidden"; break; case 2: sht.state = "veryHidden"; break; } o$10[o$10.length] = writextag("sheet", null, sht); } o$10[o$10.length] = ""; if (write_names) { o$10[o$10.length] = ""; if (wb.Workbook && wb.Workbook.Names) wb.Workbook.Names.forEach(function(n$9) { var d$5 = { name: n$9.Name }; if (n$9.Comment) d$5.comment = n$9.Comment; if (n$9.Sheet != null) d$5.localSheetId = "" + n$9.Sheet; if (n$9.Hidden) d$5.hidden = "1"; if (!n$9.Ref) return; o$10[o$10.length] = writextag("definedName", escapexml(n$9.Ref), d$5); }); o$10[o$10.length] = ""; } if (o$10.length > 2) { o$10[o$10.length] = ""; o$10[1] = o$10[1].replace("/>", ">"); } return o$10.join(""); } function parse_BrtBundleSh(data, length) { var z$2 = {}; z$2.Hidden = data.read_shift(4); z$2.iTabID = data.read_shift(4); z$2.strRelID = parse_RelID(data, length - 8); z$2.name = parse_XLWideString(data); return z$2; } function write_BrtBundleSh(data, o$10) { if (!o$10) o$10 = new_buf(127); o$10.write_shift(4, data.Hidden); o$10.write_shift(4, data.iTabID); write_RelID(data.strRelID, o$10); write_XLWideString(data.name.slice(0, 31), o$10); return o$10.length > o$10.l ? o$10.slice(0, o$10.l) : o$10; } function parse_BrtWbProp(data, length) { var o$10 = {}; var flags = data.read_shift(4); o$10.defaultThemeVersion = data.read_shift(4); var strName = length > 8 ? parse_XLWideString(data) : ""; if (strName.length > 0) o$10.CodeName = strName; o$10.autoCompressPictures = !!(flags & 65536); o$10.backupFile = !!(flags & 64); o$10.checkCompatibility = !!(flags & 4096); o$10.date1904 = !!(flags & 1); o$10.filterPrivacy = !!(flags & 8); o$10.hidePivotFieldList = !!(flags & 1024); o$10.promptedSolutions = !!(flags & 16); o$10.publishItems = !!(flags & 2048); o$10.refreshAllConnections = !!(flags & 262144); o$10.saveExternalLinkValues = !!(flags & 128); o$10.showBorderUnselectedTables = !!(flags & 4); o$10.showInkAnnotation = !!(flags & 32); o$10.showObjects = [ "all", "placeholders", "none" ][flags >> 13 & 3]; o$10.showPivotChartFilter = !!(flags & 32768); o$10.updateLinks = [ "userSet", "never", "always" ][flags >> 8 & 3]; return o$10; } function write_BrtWbProp(data, o$10) { if (!o$10) o$10 = new_buf(72); var flags = 0; if (data) { if (data.date1904) flags |= 1; if (data.filterPrivacy) flags |= 8; } o$10.write_shift(4, flags); o$10.write_shift(4, 0); write_XLSBCodeName(data && data.CodeName || "ThisWorkbook", o$10); return o$10.slice(0, o$10.l); } function parse_BrtFRTArchID$(data, length) { var o$10 = {}; data.read_shift(4); o$10.ArchID = data.read_shift(4); data.l += length - 8; return o$10; } function parse_BrtName(data, length, opts) { var end = data.l + length; var flags = data.read_shift(4); data.l += 1; var itab = data.read_shift(4); var name = parse_XLNameWideString(data); var formula; var comment = ""; try { formula = parse_XLSBNameParsedFormula(data, 0, opts); try { comment = parse_XLNullableWideString(data); } catch (e$10) {} } catch (e$10) { console.error("Could not parse defined name " + name); } if (flags & 32) name = "_xlnm." + name; data.l = end; var out = { Name: name, Ptg: formula, Flags: flags }; if (itab < 268435455) out.Sheet = itab; if (comment) out.Comment = comment; return out; } function write_BrtName(name, wb) { var o$10 = new_buf(9); var flags = 0; var dname = name.Name; if (XLSLblBuiltIn.indexOf(dname) > -1) { flags |= 32; dname = dname.slice(6); } o$10.write_shift(4, flags); o$10.write_shift(1, 0); o$10.write_shift(4, name.Sheet == null ? 4294967295 : name.Sheet); var arr = [ o$10, write_XLWideString(dname), write_XLSBNameParsedFormula(name.Ref, wb) ]; if (name.Comment) arr.push(write_XLNullableWideString(name.Comment)); else { var x$2 = new_buf(4); x$2.write_shift(4, 4294967295); arr.push(x$2); } return bconcat(arr); } function parse_wb_bin(data, opts) { var wb = { AppVersion: {}, WBProps: {}, WBView: [], Sheets: [], CalcPr: {}, xmlns: "" }; var state$1 = []; var pass = false; if (!opts) opts = {}; opts.biff = 12; var Names = []; var supbooks = [[]]; supbooks.SheetNames = []; supbooks.XTI = []; XLSBRecordEnum[16] = { n: "BrtFRTArchID$", f: parse_BrtFRTArchID$ }; recordhopper(data, function hopper_wb(val$1, R$1, RT) { switch (RT) { case 156: supbooks.SheetNames.push(val$1.name); wb.Sheets.push(val$1); break; case 153: wb.WBProps = val$1; break; case 39: if (val$1.Sheet != null) opts.SID = val$1.Sheet; val$1.Ref = val$1.Ptg ? stringify_formula(val$1.Ptg, null, null, supbooks, opts) : "#REF!"; delete opts.SID; delete val$1.Ptg; Names.push(val$1); break; case 1036: break; case 357: case 358: case 355: case 667: if (!supbooks[0].length) supbooks[0] = [RT, val$1]; else supbooks.push([RT, val$1]); supbooks[supbooks.length - 1].XTI = []; break; case 362: if (supbooks.length === 0) { supbooks[0] = []; supbooks[0].XTI = []; } supbooks[supbooks.length - 1].XTI = supbooks[supbooks.length - 1].XTI.concat(val$1); supbooks.XTI = supbooks.XTI.concat(val$1); break; case 361: break; case 2071: case 158: case 143: case 664: case 353: break; case 3072: case 3073: case 534: case 677: case 157: case 610: case 2050: case 155: case 548: case 676: case 128: case 665: case 2128: case 2125: case 549: case 2053: case 596: case 2076: case 2075: case 2082: case 397: case 154: case 1117: case 553: case 2091: break; case 35: state$1.push(RT); pass = true; break; case 36: state$1.pop(); pass = false; break; case 37: state$1.push(RT); pass = true; break; case 38: state$1.pop(); pass = false; break; case 16: break; default: if (R$1.T) {} else if (!pass || opts.WTF && state$1[state$1.length - 1] != 37 && state$1[state$1.length - 1] != 35) throw new Error("Unexpected record 0x" + RT.toString(16)); } }, opts); parse_wb_defaults(wb); wb.Names = Names; wb.supbooks = supbooks; return wb; } function write_BUNDLESHS(ba, wb) { write_record(ba, 143); for (var idx = 0; idx != wb.SheetNames.length; ++idx) { var viz = wb.Workbook && wb.Workbook.Sheets && wb.Workbook.Sheets[idx] && wb.Workbook.Sheets[idx].Hidden || 0; var d$5 = { Hidden: viz, iTabID: idx + 1, strRelID: "rId" + (idx + 1), name: wb.SheetNames[idx] }; write_record(ba, 156, write_BrtBundleSh(d$5)); } write_record(ba, 144); } function write_BrtFileVersion(data, o$10) { if (!o$10) o$10 = new_buf(127); for (var i$7 = 0; i$7 != 4; ++i$7) o$10.write_shift(4, 0); write_XLWideString("SheetJS", o$10); write_XLWideString(XLSX.version, o$10); write_XLWideString(XLSX.version, o$10); write_XLWideString("7262", o$10); return o$10.length > o$10.l ? o$10.slice(0, o$10.l) : o$10; } function write_BrtBookView(idx, o$10) { if (!o$10) o$10 = new_buf(29); o$10.write_shift(-4, 0); o$10.write_shift(-4, 460); o$10.write_shift(4, 28800); o$10.write_shift(4, 17600); o$10.write_shift(4, 500); o$10.write_shift(4, idx); o$10.write_shift(4, idx); var flags = 120; o$10.write_shift(1, flags); return o$10.length > o$10.l ? o$10.slice(0, o$10.l) : o$10; } function write_BOOKVIEWS(ba, wb) { if (!wb.Workbook || !wb.Workbook.Sheets) return; var sheets = wb.Workbook.Sheets; var i$7 = 0, vistab = -1, hidden = -1; for (; i$7 < sheets.length; ++i$7) { if (!sheets[i$7] || !sheets[i$7].Hidden && vistab == -1) vistab = i$7; else if (sheets[i$7].Hidden == 1 && hidden == -1) hidden = i$7; } if (hidden > vistab) return; write_record(ba, 135); write_record(ba, 158, write_BrtBookView(vistab)); write_record(ba, 136); } function write_BRTNAMES(ba, wb) { if (!wb.Workbook || !wb.Workbook.Names) return; wb.Workbook.Names.forEach(function(name) { try { if (name.Flags & 14) return; write_record(ba, 39, write_BrtName(name, wb)); } catch (e$10) { console.error("Could not serialize defined name " + JSON.stringify(name)); } }); } function write_SELF_EXTERNS_xlsb(wb) { var L$2 = wb.SheetNames.length; var o$10 = new_buf(12 * L$2 + 28); o$10.write_shift(4, L$2 + 2); o$10.write_shift(4, 0); o$10.write_shift(4, -2); o$10.write_shift(4, -2); o$10.write_shift(4, 0); o$10.write_shift(4, -1); o$10.write_shift(4, -1); for (var i$7 = 0; i$7 < L$2; ++i$7) { o$10.write_shift(4, 0); o$10.write_shift(4, i$7); o$10.write_shift(4, i$7); } return o$10; } function write_EXTERNALS_xlsb(ba, wb) { write_record(ba, 353); write_record(ba, 357); write_record(ba, 362, write_SELF_EXTERNS_xlsb(wb, 0)); write_record(ba, 354); } function write_wb_bin(wb, opts) { var ba = buf_array(); write_record(ba, 131); write_record(ba, 128, write_BrtFileVersion()); write_record(ba, 153, write_BrtWbProp(wb.Workbook && wb.Workbook.WBProps || null)); write_BOOKVIEWS(ba, wb, opts); write_BUNDLESHS(ba, wb, opts); write_EXTERNALS_xlsb(ba, wb); if ((wb.Workbook || {}).Names) write_BRTNAMES(ba, wb); write_record(ba, 132); return ba.end(); } function parse_wb(data, name, opts) { if (name.slice(-4) === ".bin") return parse_wb_bin(data, opts); return parse_wb_xml(data, opts); } function parse_ws(data, name, idx, opts, rels, wb, themes, styles$1) { if (name.slice(-4) === ".bin") return parse_ws_bin(data, opts, idx, rels, wb, themes, styles$1); return parse_ws_xml(data, opts, idx, rels, wb, themes, styles$1); } function parse_cs(data, name, idx, opts, rels, wb, themes, styles$1) { if (name.slice(-4) === ".bin") return parse_cs_bin(data, opts, idx, rels, wb, themes, styles$1); return parse_cs_xml(data, opts, idx, rels, wb, themes, styles$1); } function parse_ms(data, name, idx, opts, rels, wb, themes, styles$1) { if (name.slice(-4) === ".bin") return parse_ms_bin(data, opts, idx, rels, wb, themes, styles$1); return parse_ms_xml(data, opts, idx, rels, wb, themes, styles$1); } function parse_ds(data, name, idx, opts, rels, wb, themes, styles$1) { if (name.slice(-4) === ".bin") return parse_ds_bin(data, opts, idx, rels, wb, themes, styles$1); return parse_ds_xml(data, opts, idx, rels, wb, themes, styles$1); } function parse_sty(data, name, themes, opts) { if (name.slice(-4) === ".bin") return parse_sty_bin(data, themes, opts); return parse_sty_xml(data, themes, opts); } function parse_sst(data, name, opts) { if (name.slice(-4) === ".bin") return parse_sst_bin(data, opts); return parse_sst_xml(data, opts); } function parse_cmnt(data, name, opts) { if (name.slice(-4) === ".bin") return parse_comments_bin(data, opts); return parse_comments_xml(data, opts); } function parse_cc(data, name, opts) { if (name.slice(-4) === ".bin") return parse_cc_bin(data, name, opts); return parse_cc_xml(data, name, opts); } function parse_xlink(data, rel$1, name, opts) { if (name.slice(-4) === ".bin") return parse_xlink_bin(data, rel$1, name, opts); return parse_xlink_xml(data, rel$1, name, opts); } function parse_xlmeta(data, name, opts) { if (name.slice(-4) === ".bin") return parse_xlmeta_bin(data, name, opts); return parse_xlmeta_xml(data, name, opts); } function xlml_parsexmltag(tag, skip_root) { var words = tag.split(/\s+/); var z$2 = []; if (!skip_root) z$2[0] = words[0]; if (words.length === 1) return z$2; var m$3 = tag.match(attregexg2), y$3, j$2, w$2, i$7; if (m$3) for (i$7 = 0; i$7 != m$3.length; ++i$7) { y$3 = m$3[i$7].match(attregex2); if ((j$2 = y$3[1].indexOf(":")) === -1) z$2[y$3[1]] = y$3[2].slice(1, y$3[2].length - 1); else { if (y$3[1].slice(0, 6) === "xmlns:") w$2 = "xmlns" + y$3[1].slice(6); else w$2 = y$3[1].slice(j$2 + 1); z$2[w$2] = y$3[2].slice(1, y$3[2].length - 1); } } return z$2; } function xlml_parsexmltagobj(tag) { var words = tag.split(/\s+/); var z$2 = {}; if (words.length === 1) return z$2; var m$3 = tag.match(attregexg2), y$3, j$2, w$2, i$7; if (m$3) for (i$7 = 0; i$7 != m$3.length; ++i$7) { y$3 = m$3[i$7].match(attregex2); if ((j$2 = y$3[1].indexOf(":")) === -1) z$2[y$3[1]] = y$3[2].slice(1, y$3[2].length - 1); else { if (y$3[1].slice(0, 6) === "xmlns:") w$2 = "xmlns" + y$3[1].slice(6); else w$2 = y$3[1].slice(j$2 + 1); z$2[w$2] = y$3[2].slice(1, y$3[2].length - 1); } } return z$2; } function xlml_format(format, value, date1904) { var fmt = XLMLFormatMap[format] || unescapexml(format); if (fmt === "General") return SSF_general(value); return SSF_format(fmt, value, { date1904: !!date1904 }); } function xlml_set_custprop(Custprops, key, cp, val$1) { var oval = val$1; switch ((cp[0].match(/dt:dt="([\w.]+)"/) || ["", ""])[1]) { case "boolean": oval = parsexmlbool(val$1); break; case "i2": case "int": oval = parseInt(val$1, 10); break; case "r4": case "float": oval = parseFloat(val$1); break; case "date": case "dateTime.tz": oval = parseDate(val$1); break; case "i8": case "string": case "fixed": case "uuid": case "bin.base64": break; default: throw new Error("bad custprop:" + cp[0]); } Custprops[unescapexml(key)] = oval; } function safe_format_xlml(cell, nf, o$10, date1904) { if (cell.t === "z") return; if (!o$10 || o$10.cellText !== false) try { if (cell.t === "e") { cell.w = cell.w || BErr[cell.v]; } else if (nf === "General") { if (cell.t === "n") { if ((cell.v | 0) === cell.v) cell.w = cell.v.toString(10); else cell.w = SSF_general_num(cell.v); } else cell.w = SSF_general(cell.v); } else cell.w = xlml_format(nf || "General", cell.v, date1904); } catch (e$10) { if (o$10.WTF) throw e$10; } try { var z$2 = XLMLFormatMap[nf] || nf || "General"; if (o$10.cellNF) cell.z = z$2; if (o$10.cellDates && cell.t == "n" && fmt_is_date(z$2)) { var _d = SSF_parse_date_code(cell.v + (date1904 ? 1462 : 0)); if (_d) { cell.t = "d"; cell.v = new Date(Date.UTC(_d.y, _d.m - 1, _d.d, _d.H, _d.M, _d.S, _d.u)); } } } catch (e$10) { if (o$10.WTF) throw e$10; } } function process_style_xlml(styles$1, stag, opts) { if (opts.cellStyles) { if (stag.Interior) { var I$2 = stag.Interior; if (I$2.Pattern) I$2.patternType = XLMLPatternTypeMap[I$2.Pattern] || I$2.Pattern; } } styles$1[stag.ID] = stag; } function parse_xlml_data(xml$2, ss, data, cell, base, styles$1, csty, row, arrayf, o$10, date1904) { var nf = "General", sid = cell.StyleID, S$4 = {}; o$10 = o$10 || {}; var interiors = []; var i$7 = 0; if (sid === undefined && row) sid = row.StyleID; if (sid === undefined && csty) sid = csty.StyleID; while (styles$1[sid] !== undefined) { var ssid = styles$1[sid]; if (ssid.nf) nf = ssid.nf; if (ssid.Interior) interiors.push(ssid.Interior); if (!ssid.Parent) break; sid = ssid.Parent; } switch (data.Type) { case "Boolean": cell.t = "b"; cell.v = parsexmlbool(xml$2); break; case "String": cell.t = "s"; cell.r = xlml_fixstr(unescapexml(xml$2)); cell.v = xml$2.indexOf("<") > -1 ? unescapexml(ss || xml$2).replace(/<[^<>]*>/g, "") : cell.r; break; case "DateTime": if (xml$2.slice(-1) != "Z") xml$2 += "Z"; cell.v = datenum(parseDate(xml$2, date1904), date1904); if (cell.v !== cell.v) cell.v = unescapexml(xml$2); if (!nf || nf == "General") nf = "yyyy-mm-dd"; case "Number": if (cell.v === undefined) cell.v = +xml$2; if (!cell.t) cell.t = "n"; break; case "Error": cell.t = "e"; cell.v = RBErr[xml$2]; if (o$10.cellText !== false) cell.w = xml$2; break; default: if (xml$2 == "" && ss == "") { cell.t = "z"; } else { cell.t = "s"; cell.v = xlml_fixstr(ss || xml$2); } break; } safe_format_xlml(cell, nf, o$10, date1904); if (o$10.cellFormula !== false) { if (cell.Formula) { var fstr = unescapexml(cell.Formula); if (fstr.charCodeAt(0) == 61) fstr = fstr.slice(1); cell.f = rc_to_a1(fstr, base); delete cell.Formula; if (cell.ArrayRange == "RC") cell.F = rc_to_a1("RC:RC", base); else if (cell.ArrayRange) { cell.F = rc_to_a1(cell.ArrayRange, base); arrayf.push([safe_decode_range(cell.F), cell.F]); } } else { for (i$7 = 0; i$7 < arrayf.length; ++i$7) if (base.r >= arrayf[i$7][0].s.r && base.r <= arrayf[i$7][0].e.r) { if (base.c >= arrayf[i$7][0].s.c && base.c <= arrayf[i$7][0].e.c) cell.F = arrayf[i$7][1]; } } } if (o$10.cellStyles) { interiors.forEach(function(x$2) { if (!S$4.patternType && x$2.patternType) S$4.patternType = x$2.patternType; }); cell.s = S$4; } if (cell.StyleID !== undefined) cell.ixfe = cell.StyleID; } function xlml_prefix_dname(dname) { return XLSLblBuiltIn.indexOf("_xlnm." + dname) > -1 ? "_xlnm." + dname : dname; } function xlml_clean_comment(comment) { comment.t = comment.v || ""; comment.t = comment.t.replace(/\r\n/g, "\n").replace(/\r/g, "\n"); comment.v = comment.w = comment.ixfe = undefined; } function parse_xlml_xml(d$5, _opts) { var opts = _opts || {}; make_ssf(); var str = debom(xlml_normalize(d$5)); if (opts.type == "binary" || opts.type == "array" || opts.type == "base64") { if (typeof $cptable !== "undefined") str = $cptable.utils.decode(65001, char_codes(str)); else str = utf8read(str); } var opening = str.slice(0, 1024).toLowerCase(), ishtml = false; opening = opening.replace(/".*?"/g, ""); if ((opening.indexOf(">") & 1023) > Math.min(opening.indexOf(",") & 1023, opening.indexOf(";") & 1023)) { var _o = dup(opts); _o.type = "string"; return PRN.to_workbook(str, _o); } if (opening.indexOf("= 0) ishtml = true; }); if (ishtml) return html_to_workbook(str, opts); XLMLFormatMap = { "General Number": "General", "General Date": table_fmt[22], "Long Date": "dddd, mmmm dd, yyyy", "Medium Date": table_fmt[15], "Short Date": table_fmt[14], "Long Time": table_fmt[19], "Medium Time": table_fmt[18], "Short Time": table_fmt[20], "Currency": "\"$\"#,##0.00_);[Red]\\(\"$\"#,##0.00\\)", "Fixed": table_fmt[2], "Standard": table_fmt[4], "Percent": table_fmt[10], "Scientific": table_fmt[11], "Yes/No": "\"Yes\";\"Yes\";\"No\";@", "True/False": "\"True\";\"True\";\"False\";@", "On/Off": "\"Yes\";\"Yes\";\"No\";@" }; var Rn; var state$1 = [], tmp; if (DENSE != null && opts.dense == null) opts.dense = DENSE; var sheets = {}, sheetnames = [], cursheet = {}, sheetname = ""; if (opts.dense) cursheet["!data"] = []; var cell = {}, row = {}; var dtag = xlml_parsexmltag(""), didx = 0; var c$7 = 0, r$10 = 0; var refguess = { s: { r: 2e6, c: 2e6 }, e: { r: 0, c: 0 } }; var styles$1 = {}, stag = {}; var ss = "", fidx = 0; var merges = []; var Props = {}, Custprops = {}, pidx = 0, cp = []; var comments = [], comment = {}; var cstys = [], csty, seencol = false; var arrayf = []; var rowinfo = [], rowobj = {}, cc = 0, rr = 0; var Workbook = { Sheets: [], WBProps: { date1904: false } }, wsprops = {}; xlmlregex.lastIndex = 0; str = str_remove_ng(str, ""); var raw_Rn3 = ""; while (Rn = xlmlregex.exec(str)) switch (Rn[3] = (raw_Rn3 = Rn[3]).toLowerCase()) { case "data": if (raw_Rn3 == "data") { if (Rn[1] === "/") { if ((tmp = state$1.pop())[0] !== Rn[3]) throw new Error("Bad state: " + tmp.join("|")); } else if (Rn[0].charAt(Rn[0].length - 2) !== "/") state$1.push([Rn[3], true]); break; } if (state$1[state$1.length - 1][1]) break; if (Rn[1] === "/") parse_xlml_data(str.slice(didx, Rn.index), ss, dtag, state$1[state$1.length - 1][0] == "comment" ? comment : cell, { c: c$7, r: r$10 }, styles$1, cstys[c$7], row, arrayf, opts, Workbook.WBProps.date1904); else { ss = ""; dtag = xlml_parsexmltag(Rn[0]); didx = Rn.index + Rn[0].length; } break; case "cell": if (Rn[1] === "/") { if (comments.length > 0) cell.c = comments; if ((!opts.sheetRows || opts.sheetRows > r$10) && cell.v !== void 0) { if (opts.dense) { if (!cursheet["!data"][r$10]) cursheet["!data"][r$10] = []; cursheet["!data"][r$10][c$7] = cell; } else cursheet[encode_col(c$7) + encode_row(r$10)] = cell; } if (cell.HRef) { cell.l = { Target: unescapexml(cell.HRef) }; if (cell.HRefScreenTip) cell.l.Tooltip = cell.HRefScreenTip; delete cell.HRef; delete cell.HRefScreenTip; } if (cell.MergeAcross || cell.MergeDown) { cc = c$7 + (parseInt(cell.MergeAcross, 10) | 0); rr = r$10 + (parseInt(cell.MergeDown, 10) | 0); if (cc > c$7 || rr > r$10) merges.push({ s: { c: c$7, r: r$10 }, e: { c: cc, r: rr } }); } if (!opts.sheetStubs) { if (cell.MergeAcross) c$7 = cc + 1; else ++c$7; } else if (cell.MergeAcross || cell.MergeDown) { for (var cma = c$7; cma <= cc; ++cma) { for (var cmd = r$10; cmd <= rr; ++cmd) { if (cma > c$7 || cmd > r$10) { if (opts.dense) { if (!cursheet["!data"][cmd]) cursheet["!data"][cmd] = []; cursheet["!data"][cmd][cma] = { t: "z" }; } else cursheet[encode_col(cma) + encode_row(cmd)] = { t: "z" }; } } } c$7 = cc + 1; } else ++c$7; } else { cell = xlml_parsexmltagobj(Rn[0]); if (cell.Index) c$7 = +cell.Index - 1; if (c$7 < refguess.s.c) refguess.s.c = c$7; if (c$7 > refguess.e.c) refguess.e.c = c$7; if (Rn[0].slice(-2) === "/>") ++c$7; comments = []; } break; case "row": if (Rn[1] === "/" || Rn[0].slice(-2) === "/>") { if (r$10 < refguess.s.r) refguess.s.r = r$10; if (r$10 > refguess.e.r) refguess.e.r = r$10; if (Rn[0].slice(-2) === "/>") { row = xlml_parsexmltag(Rn[0]); if (row.Index) r$10 = +row.Index - 1; } c$7 = 0; ++r$10; } else { row = xlml_parsexmltag(Rn[0]); if (row.Index) r$10 = +row.Index - 1; rowobj = {}; if (row.AutoFitHeight == "0" || row.Height) { rowobj.hpx = parseInt(row.Height, 10); rowobj.hpt = px2pt(rowobj.hpx); rowinfo[r$10] = rowobj; } if (row.Hidden == "1") { rowobj.hidden = true; rowinfo[r$10] = rowobj; } } break; case "worksheet": if (Rn[1] === "/") { if ((tmp = state$1.pop())[0] !== Rn[3]) throw new Error("Bad state: " + tmp.join("|")); sheetnames.push(sheetname); if (refguess.s.r <= refguess.e.r && refguess.s.c <= refguess.e.c) { cursheet["!ref"] = encode_range(refguess); if (opts.sheetRows && opts.sheetRows <= refguess.e.r) { cursheet["!fullref"] = cursheet["!ref"]; refguess.e.r = opts.sheetRows - 1; cursheet["!ref"] = encode_range(refguess); } } if (merges.length) cursheet["!merges"] = merges; if (cstys.length > 0) cursheet["!cols"] = cstys; if (rowinfo.length > 0) cursheet["!rows"] = rowinfo; sheets[sheetname] = cursheet; } else { refguess = { s: { r: 2e6, c: 2e6 }, e: { r: 0, c: 0 } }; r$10 = c$7 = 0; state$1.push([Rn[3], false]); tmp = xlml_parsexmltag(Rn[0]); sheetname = unescapexml(tmp.Name); cursheet = {}; if (opts.dense) cursheet["!data"] = []; merges = []; arrayf = []; rowinfo = []; wsprops = { name: sheetname, Hidden: 0 }; Workbook.Sheets.push(wsprops); } break; case "table": if (Rn[1] === "/") { if ((tmp = state$1.pop())[0] !== Rn[3]) throw new Error("Bad state: " + tmp.join("|")); } else if (Rn[0].slice(-2) == "/>") break; else { state$1.push([Rn[3], false]); cstys = []; seencol = false; } break; case "style": if (Rn[1] === "/") process_style_xlml(styles$1, stag, opts); else stag = xlml_parsexmltag(Rn[0]); break; case "numberformat": stag.nf = unescapexml(xlml_parsexmltag(Rn[0]).Format || "General"); if (XLMLFormatMap[stag.nf]) stag.nf = XLMLFormatMap[stag.nf]; for (var ssfidx = 0; ssfidx != 392; ++ssfidx) if (table_fmt[ssfidx] == stag.nf) break; if (ssfidx == 392) { for (ssfidx = 57; ssfidx != 392; ++ssfidx) if (table_fmt[ssfidx] == null) { SSF__load(stag.nf, ssfidx); break; } } break; case "column": if (state$1[state$1.length - 1][0] !== "table") break; if (Rn[1] === "/") break; csty = xlml_parsexmltag(Rn[0]); if (csty.Hidden) { csty.hidden = true; delete csty.Hidden; } if (csty.Width) csty.wpx = parseInt(csty.Width, 10); if (!seencol && csty.wpx > 10) { seencol = true; MDW = DEF_MDW; for (var _col = 0; _col < cstys.length; ++_col) if (cstys[_col]) process_col(cstys[_col]); } if (seencol) process_col(csty); cstys[csty.Index - 1 || cstys.length] = csty; for (var i$7 = 0; i$7 < +csty.Span; ++i$7) cstys[cstys.length] = dup(csty); break; case "namedrange": if (Rn[1] === "/") break; if (!Workbook.Names) Workbook.Names = []; var _NamedRange = parsexmltag(Rn[0]); var _DefinedName = { Name: xlml_prefix_dname(_NamedRange.Name), Ref: rc_to_a1(_NamedRange.RefersTo.slice(1), { r: 0, c: 0 }) }; if (Workbook.Sheets.length > 0) _DefinedName.Sheet = Workbook.Sheets.length - 1; Workbook.Names.push(_DefinedName); break; case "namedcell": break; case "b": break; case "i": break; case "u": break; case "s": break; case "em": break; case "h2": break; case "h3": break; case "sub": break; case "sup": break; case "span": break; case "alignment": break; case "borders": break; case "border": break; case "font": if (Rn[0].slice(-2) === "/>") break; else if (Rn[1] === "/") ss += str.slice(fidx, Rn.index); else fidx = Rn.index + Rn[0].length; break; case "interior": if (!opts.cellStyles) break; stag.Interior = xlml_parsexmltag(Rn[0]); break; case "protection": break; case "author": case "title": case "description": case "created": case "keywords": case "subject": case "category": case "company": case "lastauthor": case "lastsaved": case "lastprinted": case "version": case "revision": case "totaltime": case "hyperlinkbase": case "manager": case "contentstatus": case "identifier": case "language": case "appname": if (Rn[0].slice(-2) === "/>") break; else if (Rn[1] === "/") xlml_set_prop(Props, raw_Rn3, str.slice(pidx, Rn.index)); else pidx = Rn.index + Rn[0].length; break; case "paragraphs": break; case "styles": case "workbook": if (Rn[1] === "/") { if ((tmp = state$1.pop())[0] !== Rn[3]) throw new Error("Bad state: " + tmp.join("|")); } else state$1.push([Rn[3], false]); break; case "comment": if (Rn[1] === "/") { if ((tmp = state$1.pop())[0] !== Rn[3]) throw new Error("Bad state: " + tmp.join("|")); xlml_clean_comment(comment); comments.push(comment); } else { state$1.push([Rn[3], false]); tmp = xlml_parsexmltag(Rn[0]); if (!parsexmlbool(tmp["ShowAlways"] || "0")) comments.hidden = true; comment = { a: tmp.Author }; } break; case "autofilter": if (Rn[1] === "/") { if ((tmp = state$1.pop())[0] !== Rn[3]) throw new Error("Bad state: " + tmp.join("|")); } else if (Rn[0].charAt(Rn[0].length - 2) !== "/") { var AutoFilter = xlml_parsexmltag(Rn[0]); cursheet["!autofilter"] = { ref: rc_to_a1(AutoFilter.Range).replace(/\$/g, "") }; state$1.push([Rn[3], true]); } break; case "name": break; case "datavalidation": if (Rn[1] === "/") { if ((tmp = state$1.pop())[0] !== Rn[3]) throw new Error("Bad state: " + tmp.join("|")); } else { if (Rn[0].charAt(Rn[0].length - 2) !== "/") state$1.push([Rn[3], true]); } break; case "pixelsperinch": break; case "componentoptions": case "documentproperties": case "customdocumentproperties": case "officedocumentsettings": case "pivottable": case "pivotcache": case "names": case "mapinfo": case "pagebreaks": case "querytable": case "sorting": case "schema": case "conditionalformatting": case "smarttagtype": case "smarttags": case "excelworkbook": case "workbookoptions": case "worksheetoptions": if (Rn[1] === "/") { if ((tmp = state$1.pop())[0] !== Rn[3]) throw new Error("Bad state: " + tmp.join("|")); } else if (Rn[0].charAt(Rn[0].length - 2) !== "/") state$1.push([Rn[3], true]); break; case "null": break; default: if (state$1.length == 0 && Rn[3] == "document") return parse_fods(str, opts); if (state$1.length == 0 && Rn[3] == "uof") return parse_fods(str, opts); var seen = true; switch (state$1[state$1.length - 1][0]) { case "officedocumentsettings": switch (Rn[3]) { case "allowpng": break; case "removepersonalinformation": break; case "downloadcomponents": break; case "locationofcomponents": break; case "colors": break; case "color": break; case "index": break; case "rgb": break; case "targetscreensize": break; case "readonlyrecommended": break; default: seen = false; } break; case "componentoptions": switch (Rn[3]) { case "toolbar": break; case "hideofficelogo": break; case "spreadsheetautofit": break; case "label": break; case "caption": break; case "maxheight": break; case "maxwidth": break; case "nextsheetnumber": break; default: seen = false; } break; case "excelworkbook": switch (Rn[3]) { case "date1904": Workbook.WBProps.date1904 = true; break; case "hidehorizontalscrollbar": break; case "hideverticalscrollbar": break; case "hideworkbooktabs": break; case "windowheight": break; case "windowwidth": break; case "windowtopx": break; case "windowtopy": break; case "tabratio": break; case "protectstructure": break; case "protectwindow": break; case "protectwindows": break; case "activesheet": break; case "displayinknotes": break; case "firstvisiblesheet": break; case "supbook": break; case "sheetname": break; case "sheetindex": break; case "sheetindexfirst": break; case "sheetindexlast": break; case "dll": break; case "acceptlabelsinformulas": break; case "donotsavelinkvalues": break; case "iteration": break; case "maxiterations": break; case "maxchange": break; case "path": break; case "xct": break; case "count": break; case "selectedsheets": break; case "calculation": break; case "uncalced": break; case "startupprompt": break; case "crn": break; case "externname": break; case "formula": break; case "colfirst": break; case "collast": break; case "wantadvise": break; case "boolean": break; case "error": break; case "text": break; case "ole": break; case "noautorecover": break; case "publishobjects": break; case "donotcalculatebeforesave": break; case "number": break; case "refmoder1c1": break; case "embedsavesmarttags": break; default: seen = false; } break; case "workbookoptions": switch (Rn[3]) { case "owcversion": break; case "height": break; case "width": break; default: seen = false; } break; case "worksheetoptions": switch (Rn[3]) { case "visible": if (Rn[0].slice(-2) === "/>") {} else if (Rn[1] === "/") switch (str.slice(pidx, Rn.index)) { case "SheetHidden": wsprops.Hidden = 1; break; case "SheetVeryHidden": wsprops.Hidden = 2; break; } else pidx = Rn.index + Rn[0].length; break; case "header": if (!cursheet["!margins"]) default_margins(cursheet["!margins"] = {}, "xlml"); if (!isNaN(+parsexmltag(Rn[0]).Margin)) cursheet["!margins"].header = +parsexmltag(Rn[0]).Margin; break; case "footer": if (!cursheet["!margins"]) default_margins(cursheet["!margins"] = {}, "xlml"); if (!isNaN(+parsexmltag(Rn[0]).Margin)) cursheet["!margins"].footer = +parsexmltag(Rn[0]).Margin; break; case "pagemargins": var pagemargins = parsexmltag(Rn[0]); if (!cursheet["!margins"]) default_margins(cursheet["!margins"] = {}, "xlml"); if (!isNaN(+pagemargins.Top)) cursheet["!margins"].top = +pagemargins.Top; if (!isNaN(+pagemargins.Left)) cursheet["!margins"].left = +pagemargins.Left; if (!isNaN(+pagemargins.Right)) cursheet["!margins"].right = +pagemargins.Right; if (!isNaN(+pagemargins.Bottom)) cursheet["!margins"].bottom = +pagemargins.Bottom; break; case "displayrighttoleft": if (!Workbook.Views) Workbook.Views = []; if (!Workbook.Views[0]) Workbook.Views[0] = {}; Workbook.Views[0].RTL = true; break; case "freezepanes": break; case "frozennosplit": break; case "splithorizontal": case "splitvertical": break; case "donotdisplaygridlines": break; case "activerow": break; case "activecol": break; case "toprowbottompane": break; case "leftcolumnrightpane": break; case "unsynced": break; case "print": break; case "printerrors": break; case "panes": break; case "scale": break; case "pane": break; case "number": break; case "layout": break; case "pagesetup": break; case "selected": break; case "protectobjects": break; case "enableselection": break; case "protectscenarios": break; case "validprinterinfo": break; case "horizontalresolution": break; case "verticalresolution": break; case "numberofcopies": break; case "activepane": break; case "toprowvisible": break; case "leftcolumnvisible": break; case "fittopage": break; case "rangeselection": break; case "papersizeindex": break; case "pagelayoutzoom": break; case "pagebreakzoom": break; case "filteron": break; case "fitwidth": break; case "fitheight": break; case "commentslayout": break; case "zoom": break; case "lefttoright": break; case "gridlines": break; case "allowsort": break; case "allowfilter": break; case "allowinsertrows": break; case "allowdeleterows": break; case "allowinsertcols": break; case "allowdeletecols": break; case "allowinserthyperlinks": break; case "allowformatcells": break; case "allowsizecols": break; case "allowsizerows": break; case "nosummaryrowsbelowdetail": if (!cursheet["!outline"]) cursheet["!outline"] = {}; cursheet["!outline"].above = true; break; case "tabcolorindex": break; case "donotdisplayheadings": break; case "showpagelayoutzoom": break; case "nosummarycolumnsrightdetail": if (!cursheet["!outline"]) cursheet["!outline"] = {}; cursheet["!outline"].left = true; break; case "blackandwhite": break; case "donotdisplayzeros": break; case "displaypagebreak": break; case "rowcolheadings": break; case "donotdisplayoutline": break; case "noorientation": break; case "allowusepivottables": break; case "zeroheight": break; case "viewablerange": break; case "selection": break; case "protectcontents": break; default: seen = false; } break; case "pivottable": case "pivotcache": switch (Rn[3]) { case "immediateitemsondrop": break; case "showpagemultipleitemlabel": break; case "compactrowindent": break; case "location": break; case "pivotfield": break; case "orientation": break; case "layoutform": break; case "layoutsubtotallocation": break; case "layoutcompactrow": break; case "position": break; case "pivotitem": break; case "datatype": break; case "datafield": break; case "sourcename": break; case "parentfield": break; case "ptlineitems": break; case "ptlineitem": break; case "countofsameitems": break; case "item": break; case "itemtype": break; case "ptsource": break; case "cacheindex": break; case "consolidationreference": break; case "filename": break; case "reference": break; case "nocolumngrand": break; case "norowgrand": break; case "blanklineafteritems": break; case "hidden": break; case "subtotal": break; case "basefield": break; case "mapchilditems": break; case "function": break; case "refreshonfileopen": break; case "printsettitles": break; case "mergelabels": break; case "defaultversion": break; case "refreshname": break; case "refreshdate": break; case "refreshdatecopy": break; case "versionlastrefresh": break; case "versionlastupdate": break; case "versionupdateablemin": break; case "versionrefreshablemin": break; case "calculation": break; default: seen = false; } break; case "pagebreaks": switch (Rn[3]) { case "colbreaks": break; case "colbreak": break; case "rowbreaks": break; case "rowbreak": break; case "colstart": break; case "colend": break; case "rowend": break; default: seen = false; } break; case "autofilter": switch (Rn[3]) { case "autofiltercolumn": break; case "autofiltercondition": break; case "autofilterand": break; case "autofilteror": break; default: seen = false; } break; case "querytable": switch (Rn[3]) { case "id": break; case "autoformatfont": break; case "autoformatpattern": break; case "querysource": break; case "querytype": break; case "enableredirections": break; case "refreshedinxl9": break; case "urlstring": break; case "htmltables": break; case "connection": break; case "commandtext": break; case "refreshinfo": break; case "notitles": break; case "nextid": break; case "columninfo": break; case "overwritecells": break; case "donotpromptforfile": break; case "textwizardsettings": break; case "source": break; case "number": break; case "decimal": break; case "thousandseparator": break; case "trailingminusnumbers": break; case "formatsettings": break; case "fieldtype": break; case "delimiters": break; case "tab": break; case "comma": break; case "autoformatname": break; case "versionlastedit": break; case "versionlastrefresh": break; default: seen = false; } break; case "datavalidation": switch (Rn[3]) { case "range": break; case "type": break; case "min": break; case "max": break; case "sort": break; case "descending": break; case "order": break; case "casesensitive": break; case "value": break; case "errorstyle": break; case "errormessage": break; case "errortitle": break; case "inputmessage": break; case "inputtitle": break; case "combohide": break; case "inputhide": break; case "condition": break; case "qualifier": break; case "useblank": break; case "value1": break; case "value2": break; case "format": break; case "cellrangelist": break; default: seen = false; } break; case "sorting": case "conditionalformatting": switch (Rn[3]) { case "range": break; case "type": break; case "min": break; case "max": break; case "sort": break; case "descending": break; case "order": break; case "casesensitive": break; case "value": break; case "errorstyle": break; case "errormessage": break; case "errortitle": break; case "cellrangelist": break; case "inputmessage": break; case "inputtitle": break; case "combohide": break; case "inputhide": break; case "condition": break; case "qualifier": break; case "useblank": break; case "value1": break; case "value2": break; case "format": break; default: seen = false; } break; case "mapinfo": case "schema": case "data": switch (Rn[3]) { case "map": break; case "entry": break; case "range": break; case "xpath": break; case "field": break; case "xsdtype": break; case "filteron": break; case "aggregate": break; case "elementtype": break; case "attributetype": break; case "schema": case "element": case "complextype": case "datatype": case "all": case "attribute": case "extends": break; case "row": break; default: seen = false; } break; case "smarttags": break; default: seen = false; break; } if (seen) break; if (Rn[3].match(/!\[CDATA/)) break; if (!state$1[state$1.length - 1][1]) throw "Unrecognized tag: " + Rn[3] + "|" + state$1.join("|"); if (state$1[state$1.length - 1][0] === "customdocumentproperties") { if (Rn[0].slice(-2) === "/>") break; else if (Rn[1] === "/") xlml_set_custprop(Custprops, raw_Rn3, cp, str.slice(pidx, Rn.index)); else { cp = Rn; pidx = Rn.index + Rn[0].length; } break; } if (opts.WTF) throw "Unrecognized tag: " + Rn[3] + "|" + state$1.join("|"); } var out = {}; if (!opts.bookSheets && !opts.bookProps) out.Sheets = sheets; out.SheetNames = sheetnames; out.Workbook = Workbook; out.SSF = dup(table_fmt); out.Props = Props; out.Custprops = Custprops; out.bookType = "xlml"; return out; } function parse_xlml(data, opts) { fix_read_opts(opts = opts || {}); switch (opts.type || "base64") { case "base64": return parse_xlml_xml(Base64_decode(data), opts); case "binary": case "buffer": case "file": return parse_xlml_xml(data, opts); case "array": return parse_xlml_xml(a2s(data), opts); } } function write_props_xlml(wb, opts) { var o$10 = []; if (wb.Props) o$10.push(xlml_write_docprops(wb.Props, opts)); if (wb.Custprops) o$10.push(xlml_write_custprops(wb.Props, wb.Custprops, opts)); return o$10.join(""); } function write_wb_xlml(wb) { if ((((wb || {}).Workbook || {}).WBProps || {}).date1904) return ""; return ""; } function write_sty_xlml(wb, opts) { var styles$1 = [""]; opts.cellXfs.forEach(function(xf, id) { var payload = []; payload.push(writextag("NumberFormat", null, { "ss:Format": escapexml(table_fmt[xf.numFmtId]) })); var o$10 = { "ss:ID": "s" + (21 + id) }; styles$1.push(writextag("Style", payload.join(""), o$10)); }); return writextag("Styles", styles$1.join("")); } function write_name_xlml(n$9) { return writextag("NamedRange", null, { "ss:Name": n$9.Name.slice(0, 6) == "_xlnm." ? n$9.Name.slice(6) : n$9.Name, "ss:RefersTo": "=" + a1_to_rc(n$9.Ref, { r: 0, c: 0 }) }); } function write_names_xlml(wb) { if (!((wb || {}).Workbook || {}).Names) return ""; var names = wb.Workbook.Names; var out = []; for (var i$7 = 0; i$7 < names.length; ++i$7) { var n$9 = names[i$7]; if (n$9.Sheet != null) continue; if (n$9.Name.match(/^_xlfn\./)) continue; out.push(write_name_xlml(n$9)); } return writextag("Names", out.join("")); } function write_ws_xlml_names(ws, opts, idx, wb) { if (!ws) return ""; if (!((wb || {}).Workbook || {}).Names) return ""; var names = wb.Workbook.Names; var out = []; for (var i$7 = 0; i$7 < names.length; ++i$7) { var n$9 = names[i$7]; if (n$9.Sheet != idx) continue; if (n$9.Name.match(/^_xlfn\./)) continue; out.push(write_name_xlml(n$9)); } return out.join(""); } function write_ws_xlml_wsopts(ws, opts, idx, wb) { if (!ws) return ""; var o$10 = []; if (ws["!margins"]) { o$10.push(""); if (ws["!margins"].header) o$10.push(writextag("Header", null, { "x:Margin": ws["!margins"].header })); if (ws["!margins"].footer) o$10.push(writextag("Footer", null, { "x:Margin": ws["!margins"].footer })); o$10.push(writextag("PageMargins", null, { "x:Bottom": ws["!margins"].bottom || "0.75", "x:Left": ws["!margins"].left || "0.7", "x:Right": ws["!margins"].right || "0.7", "x:Top": ws["!margins"].top || "0.75" })); o$10.push(""); } if (wb && wb.Workbook && wb.Workbook.Sheets && wb.Workbook.Sheets[idx]) { if (wb.Workbook.Sheets[idx].Hidden) o$10.push(writextag("Visible", wb.Workbook.Sheets[idx].Hidden == 1 ? "SheetHidden" : "SheetVeryHidden", {})); else { for (var i$7 = 0; i$7 < idx; ++i$7) if (wb.Workbook.Sheets[i$7] && !wb.Workbook.Sheets[i$7].Hidden) break; if (i$7 == idx) o$10.push(""); } } if (((((wb || {}).Workbook || {}).Views || [])[0] || {}).RTL) o$10.push(""); if (ws["!protect"]) { o$10.push(writetag("ProtectContents", "True")); if (ws["!protect"].objects) o$10.push(writetag("ProtectObjects", "True")); if (ws["!protect"].scenarios) o$10.push(writetag("ProtectScenarios", "True")); if (ws["!protect"].selectLockedCells != null && !ws["!protect"].selectLockedCells) o$10.push(writetag("EnableSelection", "NoSelection")); else if (ws["!protect"].selectUnlockedCells != null && !ws["!protect"].selectUnlockedCells) o$10.push(writetag("EnableSelection", "UnlockedCells")); [ ["formatCells", "AllowFormatCells"], ["formatColumns", "AllowSizeCols"], ["formatRows", "AllowSizeRows"], ["insertColumns", "AllowInsertCols"], ["insertRows", "AllowInsertRows"], ["insertHyperlinks", "AllowInsertHyperlinks"], ["deleteColumns", "AllowDeleteCols"], ["deleteRows", "AllowDeleteRows"], ["sort", "AllowSort"], ["autoFilter", "AllowFilter"], ["pivotTables", "AllowUsePivotTables"] ].forEach(function(x$2) { if (ws["!protect"][x$2[0]]) o$10.push("<" + x$2[1] + "/>"); }); } if (o$10.length == 0) return ""; return writextag("WorksheetOptions", o$10.join(""), { xmlns: XLMLNS.x }); } function write_ws_xlml_comment(comments) { return comments.map(function(c$7) { var t$6 = xlml_unfixstr(c$7.t || ""); var d$5 = writextag("ss:Data", t$6, { "xmlns": "http://www.w3.org/TR/REC-html40" }); var p$3 = {}; if (c$7.a) p$3["ss:Author"] = c$7.a; if (!comments.hidden) p$3["ss:ShowAlways"] = "1"; return writextag("Comment", d$5, p$3); }).join(""); } function write_ws_xlml_cell(cell, ref, ws, opts, idx, wb, addr) { if (!cell || cell.v == undefined && cell.f == undefined) return ""; var attr = {}; if (cell.f) attr["ss:Formula"] = "=" + escapexml(a1_to_rc(cell.f, addr)); if (cell.F && cell.F.slice(0, ref.length) == ref) { var end = decode_cell(cell.F.slice(ref.length + 1)); attr["ss:ArrayRange"] = "RC:R" + (end.r == addr.r ? "" : "[" + (end.r - addr.r) + "]") + "C" + (end.c == addr.c ? "" : "[" + (end.c - addr.c) + "]"); } if (cell.l && cell.l.Target) { attr["ss:HRef"] = escapexml(cell.l.Target); if (cell.l.Tooltip) attr["x:HRefScreenTip"] = escapexml(cell.l.Tooltip); } if (ws["!merges"]) { var marr = ws["!merges"]; for (var mi = 0; mi != marr.length; ++mi) { if (marr[mi].s.c != addr.c || marr[mi].s.r != addr.r) continue; if (marr[mi].e.c > marr[mi].s.c) attr["ss:MergeAcross"] = marr[mi].e.c - marr[mi].s.c; if (marr[mi].e.r > marr[mi].s.r) attr["ss:MergeDown"] = marr[mi].e.r - marr[mi].s.r; } } var t$6 = "", p$3 = ""; switch (cell.t) { case "z": if (!opts.sheetStubs) return ""; break; case "n": { if (!isFinite(cell.v)) { t$6 = "Error"; p$3 = BErr[isNaN(cell.v) ? 36 : 7]; } else { t$6 = "Number"; p$3 = String(cell.v); } } break; case "b": t$6 = "Boolean"; p$3 = cell.v ? "1" : "0"; break; case "e": t$6 = "Error"; p$3 = BErr[cell.v]; break; case "d": t$6 = "DateTime"; p$3 = new Date(cell.v).toISOString(); if (cell.z == null) cell.z = cell.z || table_fmt[14]; break; case "s": t$6 = "String"; p$3 = escapexlml(cell.v || ""); break; } var os = get_cell_style(opts.cellXfs, cell, opts); attr["ss:StyleID"] = "s" + (21 + os); attr["ss:Index"] = addr.c + 1; var _v = cell.v != null ? p$3 : ""; var m$3 = cell.t == "z" ? "" : "" + _v + ""; if ((cell.c || []).length > 0) m$3 += write_ws_xlml_comment(cell.c); return writextag("Cell", m$3, attr); } function write_ws_xlml_row(R$1, row) { var o$10 = ""; } function write_ws_xlml_table(ws, opts, idx, wb) { if (!ws["!ref"]) return ""; var range = safe_decode_range(ws["!ref"]); var marr = ws["!merges"] || [], mi = 0; var o$10 = []; if (ws["!cols"]) ws["!cols"].forEach(function(n$9, i$7) { process_col(n$9); var w$2 = !!n$9.width; var p$3 = col_obj_w(i$7, n$9); var k$2 = { "ss:Index": i$7 + 1 }; if (w$2) k$2["ss:Width"] = width2px(p$3.width); if (n$9.hidden) k$2["ss:Hidden"] = "1"; o$10.push(writextag("Column", null, k$2)); }); var dense = ws["!data"] != null; var addr = { r: 0, c: 0 }; for (var R$1 = range.s.r; R$1 <= range.e.r; ++R$1) { var row = [write_ws_xlml_row(R$1, (ws["!rows"] || [])[R$1])]; addr.r = R$1; for (var C$2 = range.s.c; C$2 <= range.e.c; ++C$2) { addr.c = C$2; var skip = false; for (mi = 0; mi != marr.length; ++mi) { if (marr[mi].s.c > C$2) continue; if (marr[mi].s.r > R$1) continue; if (marr[mi].e.c < C$2) continue; if (marr[mi].e.r < R$1) continue; if (marr[mi].s.c != C$2 || marr[mi].s.r != R$1) skip = true; break; } if (skip) continue; var ref = encode_col(C$2) + encode_row(R$1), cell = dense ? (ws["!data"][R$1] || [])[C$2] : ws[ref]; row.push(write_ws_xlml_cell(cell, ref, ws, opts, idx, wb, addr)); } row.push(""); if (row.length > 2) o$10.push(row.join("")); } return o$10.join(""); } function write_ws_xlml(idx, opts, wb) { var o$10 = []; var s$5 = wb.SheetNames[idx]; var ws = wb.Sheets[s$5]; var t$6 = ws ? write_ws_xlml_names(ws, opts, idx, wb) : ""; if (t$6.length > 0) o$10.push("" + t$6 + ""); t$6 = ws ? write_ws_xlml_table(ws, opts, idx, wb) : ""; if (t$6.length > 0) o$10.push("" + t$6 + "
"); o$10.push(write_ws_xlml_wsopts(ws, opts, idx, wb)); if (ws && ws["!autofilter"]) o$10.push(""); return o$10.join(""); } function write_xlml(wb, opts) { if (!opts) opts = {}; if (!wb.SSF) wb.SSF = dup(table_fmt); if (wb.SSF) { make_ssf(); SSF_load_table(wb.SSF); opts.revssf = evert_num(wb.SSF); opts.revssf[wb.SSF[65535]] = 0; opts.ssf = wb.SSF; opts.cellXfs = []; get_cell_style(opts.cellXfs, {}, { revssf: { "General": 0 } }); } var d$5 = []; d$5.push(write_props_xlml(wb, opts)); d$5.push(write_wb_xlml(wb, opts)); d$5.push(""); d$5.push(write_names_xlml(wb, opts)); for (var i$7 = 0; i$7 < wb.SheetNames.length; ++i$7) d$5.push(writextag("Worksheet", write_ws_xlml(i$7, opts, wb), { "ss:Name": escapexml(wb.SheetNames[i$7]) })); d$5[2] = write_sty_xlml(wb, opts); return XML_HEADER + writextag("Workbook", d$5.join(""), { "xmlns": XLMLNS.ss, "xmlns:o": XLMLNS.o, "xmlns:x": XLMLNS.x, "xmlns:ss": XLMLNS.ss, "xmlns:dt": XLMLNS.dt, "xmlns:html": XLMLNS.html }); } function parse_compobj(obj) { var v$3 = {}; var o$10 = obj.content; o$10.l = 28; v$3.AnsiUserType = o$10.read_shift(0, "lpstr-ansi"); v$3.AnsiClipboardFormat = parse_ClipboardFormatOrAnsiString(o$10); if (o$10.length - o$10.l <= 4) return v$3; var m$3 = o$10.read_shift(4); if (m$3 == 0 || m$3 > 40) return v$3; o$10.l -= 4; v$3.Reserved1 = o$10.read_shift(0, "lpstr-ansi"); if (o$10.length - o$10.l <= 4) return v$3; m$3 = o$10.read_shift(4); if (m$3 !== 1907505652) return v$3; v$3.UnicodeClipboardFormat = parse_ClipboardFormatOrUnicodeString(o$10); m$3 = o$10.read_shift(4); if (m$3 == 0 || m$3 > 40) return v$3; o$10.l -= 4; v$3.Reserved2 = o$10.read_shift(0, "lpwstr"); } function slurp(RecordType, R$1, blob, length, opts) { var l$3 = length; var bufs = []; var d$5 = blob.slice(blob.l, blob.l + l$3); if (opts && opts.enc && opts.enc.insitu && d$5.length > 0) switch (RecordType) { case 9: case 521: case 1033: case 2057: case 47: case 405: case 225: case 406: case 312: case 404: case 10: break; case 133: break; default: opts.enc.insitu(d$5); } bufs.push(d$5); blob.l += l$3; var nextrt = __readUInt16LE(blob, blob.l), next = XLSRecordEnum[nextrt]; var start = 0; while (next != null && CONTINUE_RT.indexOf(nextrt) > -1) { l$3 = __readUInt16LE(blob, blob.l + 2); start = blob.l + 4; if (nextrt == 2066) start += 4; else if (nextrt == 2165 || nextrt == 2175) { start += 12; } d$5 = blob.slice(start, blob.l + 4 + l$3); bufs.push(d$5); blob.l += 4 + l$3; next = XLSRecordEnum[nextrt = __readUInt16LE(blob, blob.l)]; } var b$3 = bconcat(bufs); prep_blob(b$3, 0); var ll = 0; b$3.lens = []; for (var j$2 = 0; j$2 < bufs.length; ++j$2) { b$3.lens.push(ll); ll += bufs[j$2].length; } if (b$3.length < length) throw "XLS Record 0x" + RecordType.toString(16) + " Truncated: " + b$3.length + " < " + length; return R$1.f(b$3, b$3.length, opts); } function safe_format_xf(p$3, opts, date1904) { if (p$3.t === "z") return; if (!p$3.XF) return; var fmtid = 0; try { fmtid = p$3.z || p$3.XF.numFmtId || 0; if (opts.cellNF && p$3.z == null) p$3.z = table_fmt[fmtid]; } catch (e$10) { if (opts.WTF) throw e$10; } if (!opts || opts.cellText !== false) try { if (p$3.t === "e") { p$3.w = p$3.w || BErr[p$3.v]; } else if (fmtid === 0 || fmtid == "General") { if (p$3.t === "n") { if ((p$3.v | 0) === p$3.v) p$3.w = p$3.v.toString(10); else p$3.w = SSF_general_num(p$3.v); } else p$3.w = SSF_general(p$3.v); } else p$3.w = SSF_format(fmtid, p$3.v, { date1904: !!date1904, dateNF: opts && opts.dateNF }); } catch (e$10) { if (opts.WTF) throw e$10; } if (opts.cellDates && fmtid && p$3.t == "n" && fmt_is_date(table_fmt[fmtid] || String(fmtid))) { var _d = SSF_parse_date_code(p$3.v + (date1904 ? 1462 : 0)); if (_d) { p$3.t = "d"; p$3.v = new Date(Date.UTC(_d.y, _d.m - 1, _d.d, _d.H, _d.M, _d.S, _d.u)); } } } function make_cell(val$1, ixfe, t$6) { return { v: val$1, ixfe, t: t$6 }; } function parse_workbook(blob, options) { var wb = { opts: {} }; var Sheets = {}; if (DENSE != null && options.dense == null) options.dense = DENSE; var out = {}; if (options.dense) out["!data"] = []; var Directory = {}; var range = {}; var last_formula = null; var sst = []; var cur_sheet = ""; var Preamble = {}; var lastcell, last_cell = "", cc, cmnt, rngC, rngR; var sharedf = {}; var arrayf = []; var temp_val; var country; var XFs = []; var palette$1 = []; var Workbook = { Sheets: [], WBProps: { date1904: false }, Views: [{}] }, wsprops = {}; var biff4w = false; var get_rgb = function getrgb(icv) { if (icv < 8) return XLSIcv[icv]; if (icv < 64) return palette$1[icv - 8] || XLSIcv[icv]; return XLSIcv[icv]; }; var process_cell_style = function pcs(line, options$1) { var xfd = line.XF.data; if (!xfd || !xfd.patternType || !options$1 || !options$1.cellStyles) return; line.s = {}; line.s.patternType = xfd.patternType; var t$6; if (t$6 = rgb2Hex(get_rgb(xfd.icvFore))) { line.s.fgColor = { rgb: t$6 }; } if (t$6 = rgb2Hex(get_rgb(xfd.icvBack))) { line.s.bgColor = { rgb: t$6 }; } }; var addcell = function addcell$1(cell, line, options$1) { if (!biff4w && file_depth > 1) return; if (options$1.sheetRows && cell.r >= options$1.sheetRows) return; if (options$1.cellStyles && line.XF && line.XF.data) process_cell_style(line, options$1); delete line.ixfe; delete line.XF; lastcell = cell; last_cell = encode_cell(cell); if (!range || !range.s || !range.e) range = { s: { r: 0, c: 0 }, e: { r: 0, c: 0 } }; if (cell.r < range.s.r) range.s.r = cell.r; if (cell.c < range.s.c) range.s.c = cell.c; if (cell.r + 1 > range.e.r) range.e.r = cell.r + 1; if (cell.c + 1 > range.e.c) range.e.c = cell.c + 1; if (options$1.cellFormula && line.f) { for (var afi = 0; afi < arrayf.length; ++afi) { if (arrayf[afi][0].s.c > cell.c || arrayf[afi][0].s.r > cell.r) continue; if (arrayf[afi][0].e.c < cell.c || arrayf[afi][0].e.r < cell.r) continue; line.F = encode_range(arrayf[afi][0]); if (arrayf[afi][0].s.c != cell.c || arrayf[afi][0].s.r != cell.r) delete line.f; if (line.f) line.f = "" + stringify_formula(arrayf[afi][1], range, cell, supbooks, opts); break; } } { if (options$1.dense) { if (!out["!data"][cell.r]) out["!data"][cell.r] = []; out["!data"][cell.r][cell.c] = line; } else out[last_cell] = line; } }; var opts = { enc: false, sbcch: 0, snames: [], sharedf, arrayf, rrtabid: [], lastuser: "", biff: 8, codepage: 0, winlocked: 0, cellStyles: !!options && !!options.cellStyles, WTF: !!options && !!options.wtf }; if (options.password) opts.password = options.password; var themes; var merges = []; var objects = []; var colinfo = [], rowinfo = []; var seencol = false; var supbooks = []; supbooks.SheetNames = opts.snames; supbooks.sharedf = opts.sharedf; supbooks.arrayf = opts.arrayf; supbooks.names = []; supbooks.XTI = []; var last_RT = 0; var file_depth = 0; var BIFF2Fmt = 0, BIFF2FmtTable = []; var FilterDatabases = []; var last_lbl; opts.codepage = 1200; set_cp(1200); var seen_codepage = false; while (blob.l < blob.length - 1) { var s$5 = blob.l; var RecordType = blob.read_shift(2); if (RecordType === 0 && last_RT === 10) break; var length = blob.l === blob.length ? 0 : blob.read_shift(2); var R$1 = XLSRecordEnum[RecordType]; if (file_depth == 0 && [ 9, 521, 1033, 2057 ].indexOf(RecordType) == -1) break; if (R$1 && R$1.f) { if (options.bookSheets) { if (last_RT === 133 && RecordType !== 133) break; } last_RT = RecordType; if (R$1.r === 2 || R$1.r == 12) { var rt = blob.read_shift(2); length -= 2; if (!opts.enc && rt !== RecordType && ((rt & 255) << 8 | rt >> 8) !== RecordType) throw new Error("rt mismatch: " + rt + "!=" + RecordType); if (R$1.r == 12) { blob.l += 10; length -= 10; } } var val$1 = {}; if (RecordType === 10) val$1 = R$1.f(blob, length, opts); else val$1 = slurp(RecordType, R$1, blob, length, opts); if (file_depth == 0 && [ 9, 521, 1033, 2057 ].indexOf(last_RT) === -1) continue; switch (RecordType) { case 34: wb.opts.Date1904 = Workbook.WBProps.date1904 = val$1; break; case 134: wb.opts.WriteProtect = true; break; case 47: if (!opts.enc) blob.l = 0; opts.enc = val$1; if (!options.password) throw new Error("File is password-protected"); if (val$1.valid == null) throw new Error("Encryption scheme unsupported"); if (!val$1.valid) throw new Error("Password is incorrect"); break; case 92: opts.lastuser = val$1; break; case 66: var cpval = Number(val$1); switch (cpval) { case 21010: cpval = 1200; break; case 32768: cpval = 1e4; break; case 32769: cpval = 1252; break; } set_cp(opts.codepage = cpval); seen_codepage = true; break; case 317: opts.rrtabid = val$1; break; case 25: opts.winlocked = val$1; break; case 439: wb.opts["RefreshAll"] = val$1; break; case 12: wb.opts["CalcCount"] = val$1; break; case 16: wb.opts["CalcDelta"] = val$1; break; case 17: wb.opts["CalcIter"] = val$1; break; case 13: wb.opts["CalcMode"] = val$1; break; case 14: wb.opts["CalcPrecision"] = val$1; break; case 95: wb.opts["CalcSaveRecalc"] = val$1; break; case 15: opts.CalcRefMode = val$1; break; case 2211: wb.opts.FullCalc = val$1; break; case 129: if (val$1.fDialog) out["!type"] = "dialog"; if (!val$1.fBelow) (out["!outline"] || (out["!outline"] = {})).above = true; if (!val$1.fRight) (out["!outline"] || (out["!outline"] = {})).left = true; break; case 67: case 579: case 1091: case 224: XFs.push(val$1); break; case 430: supbooks.push([val$1]); supbooks[supbooks.length - 1].XTI = []; break; case 35: case 547: supbooks[supbooks.length - 1].push(val$1); break; case 24: case 536: last_lbl = { Name: val$1.Name, Ref: stringify_formula(val$1.rgce, range, null, supbooks, opts) }; if (val$1.itab > 0) last_lbl.Sheet = val$1.itab - 1; supbooks.names.push(last_lbl); if (!supbooks[0]) { supbooks[0] = []; supbooks[0].XTI = []; } supbooks[supbooks.length - 1].push(val$1); if (val$1.Name == "_xlnm._FilterDatabase" && val$1.itab > 0) { if (val$1.rgce && val$1.rgce[0] && val$1.rgce[0][0] && val$1.rgce[0][0][0] == "PtgArea3d") FilterDatabases[val$1.itab - 1] = { ref: encode_range(val$1.rgce[0][0][1][2]) }; } break; case 22: opts.ExternCount = val$1; break; case 23: if (supbooks.length == 0) { supbooks[0] = []; supbooks[0].XTI = []; } supbooks[supbooks.length - 1].XTI = supbooks[supbooks.length - 1].XTI.concat(val$1); supbooks.XTI = supbooks.XTI.concat(val$1); break; case 2196: if (opts.biff < 8) break; if (last_lbl != null) last_lbl.Comment = val$1[1]; break; case 18: out["!protect"] = val$1; break; case 19: if (val$1 !== 0 && opts.WTF) console.error("Password verifier: " + val$1); break; case 133: { Directory[opts.biff == 4 ? opts.snames.length : val$1.pos] = val$1; opts.snames.push(val$1.name); } break; case 10: { if (--file_depth ? !biff4w : biff4w) break; if (range.e) { if (range.e.r > 0 && range.e.c > 0) { range.e.r--; range.e.c--; out["!ref"] = encode_range(range); if (options.sheetRows && options.sheetRows <= range.e.r) { var tmpri = range.e.r; range.e.r = options.sheetRows - 1; out["!fullref"] = out["!ref"]; out["!ref"] = encode_range(range); range.e.r = tmpri; } range.e.r++; range.e.c++; } if (merges.length > 0) out["!merges"] = merges; if (objects.length > 0) out["!objects"] = objects; if (colinfo.length > 0) out["!cols"] = colinfo; if (rowinfo.length > 0) out["!rows"] = rowinfo; Workbook.Sheets.push(wsprops); } if (cur_sheet === "") Preamble = out; else Sheets[cur_sheet] = out; out = {}; if (options.dense) out["!data"] = []; } break; case 9: case 521: case 1033: case 2057: { if (opts.biff === 8) opts.biff = { 9: 2, 521: 3, 1033: 4 }[RecordType] || { 512: 2, 768: 3, 1024: 4, 1280: 5, 1536: 8, 2: 2, 7: 2 }[val$1.BIFFVer] || 8; opts.biffguess = val$1.BIFFVer == 0; if (val$1.BIFFVer == 0 && val$1.dt == 4096) { opts.biff = 5; seen_codepage = true; set_cp(opts.codepage = 28591); } if (opts.biff == 4 && val$1.dt & 256) biff4w = true; if (opts.biff == 8 && val$1.BIFFVer == 0 && val$1.dt == 16) opts.biff = 2; if (file_depth++ && !biff4w) break; out = {}; if (options.dense) out["!data"] = []; if (opts.biff < 8 && !seen_codepage) { seen_codepage = true; set_cp(opts.codepage = options.codepage || 1252); } if (opts.biff == 4 && biff4w) { cur_sheet = (Directory[opts.snames.indexOf(cur_sheet) + 1] || { name: "" }).name; } else if (opts.biff < 5 || val$1.BIFFVer == 0 && val$1.dt == 4096) { if (cur_sheet === "") cur_sheet = "Sheet1"; range = { s: { r: 0, c: 0 }, e: { r: 0, c: 0 } }; var fakebs8 = { pos: blob.l - length, name: cur_sheet }; Directory[fakebs8.pos] = fakebs8; opts.snames.push(cur_sheet); } else cur_sheet = (Directory[s$5] || { name: "" }).name; if (val$1.dt == 32) out["!type"] = "chart"; if (val$1.dt == 64) out["!type"] = "macro"; merges = []; objects = []; opts.arrayf = arrayf = []; colinfo = []; rowinfo = []; seencol = false; wsprops = { Hidden: (Directory[s$5] || { hs: 0 }).hs, name: cur_sheet }; } break; case 515: case 3: case 2: { if (out["!type"] == "chart") { if (options.dense ? (out["!data"][val$1.r] || [])[val$1.c] : out[encode_col(val$1.c) + encode_row(val$1.r)]) ++val$1.c; } temp_val = { ixfe: val$1.ixfe, XF: XFs[val$1.ixfe] || {}, v: val$1.val, t: "n" }; if (BIFF2Fmt > 0) temp_val.z = temp_val.XF && temp_val.XF.numFmtId && BIFF2FmtTable[temp_val.XF.numFmtId] || BIFF2FmtTable[temp_val.ixfe >> 8 & 63]; safe_format_xf(temp_val, options, wb.opts.Date1904); addcell({ c: val$1.c, r: val$1.r }, temp_val, options); } break; case 5: case 517: { temp_val = { ixfe: val$1.ixfe, XF: XFs[val$1.ixfe], v: val$1.val, t: val$1.t }; if (BIFF2Fmt > 0) temp_val.z = temp_val.XF && temp_val.XF.numFmtId && BIFF2FmtTable[temp_val.XF.numFmtId] || BIFF2FmtTable[temp_val.ixfe >> 8 & 63]; safe_format_xf(temp_val, options, wb.opts.Date1904); addcell({ c: val$1.c, r: val$1.r }, temp_val, options); } break; case 638: { temp_val = { ixfe: val$1.ixfe, XF: XFs[val$1.ixfe], v: val$1.rknum, t: "n" }; if (BIFF2Fmt > 0) temp_val.z = temp_val.XF && temp_val.XF.numFmtId && BIFF2FmtTable[temp_val.XF.numFmtId] || BIFF2FmtTable[temp_val.ixfe >> 8 & 63]; safe_format_xf(temp_val, options, wb.opts.Date1904); addcell({ c: val$1.c, r: val$1.r }, temp_val, options); } break; case 189: { for (var j$2 = val$1.c; j$2 <= val$1.C; ++j$2) { var ixfe = val$1.rkrec[j$2 - val$1.c][0]; temp_val = { ixfe, XF: XFs[ixfe], v: val$1.rkrec[j$2 - val$1.c][1], t: "n" }; if (BIFF2Fmt > 0) temp_val.z = temp_val.XF && temp_val.XF.numFmtId && BIFF2FmtTable[temp_val.XF.numFmtId] || BIFF2FmtTable[temp_val.ixfe >> 8 & 63]; safe_format_xf(temp_val, options, wb.opts.Date1904); addcell({ c: j$2, r: val$1.r }, temp_val, options); } } break; case 6: case 518: case 1030: { if (val$1.val == "String") { last_formula = val$1; break; } temp_val = make_cell(val$1.val, val$1.cell.ixfe, val$1.tt); temp_val.XF = XFs[temp_val.ixfe]; if (options.cellFormula) { var _f = val$1.formula; if (_f && _f[0] && _f[0][0] && _f[0][0][0] == "PtgExp") { var _fr = _f[0][0][1][0], _fc = _f[0][0][1][1]; var _fe = encode_cell({ r: _fr, c: _fc }); if (sharedf[_fe]) temp_val.f = "" + stringify_formula(val$1.formula, range, val$1.cell, supbooks, opts); else temp_val.F = ((options.dense ? (out["!data"][_fr] || [])[_fc] : out[_fe]) || {}).F; } else temp_val.f = "" + stringify_formula(val$1.formula, range, val$1.cell, supbooks, opts); } if (BIFF2Fmt > 0) temp_val.z = temp_val.XF && temp_val.XF.numFmtId && BIFF2FmtTable[temp_val.XF.numFmtId] || BIFF2FmtTable[temp_val.ixfe >> 8 & 63]; safe_format_xf(temp_val, options, wb.opts.Date1904); addcell(val$1.cell, temp_val, options); last_formula = val$1; } break; case 7: case 519: { if (last_formula) { last_formula.val = val$1; temp_val = make_cell(val$1, last_formula.cell.ixfe, "s"); temp_val.XF = XFs[temp_val.ixfe]; if (options.cellFormula) { temp_val.f = "" + stringify_formula(last_formula.formula, range, last_formula.cell, supbooks, opts); } if (BIFF2Fmt > 0) temp_val.z = temp_val.XF && temp_val.XF.numFmtId && BIFF2FmtTable[temp_val.XF.numFmtId] || BIFF2FmtTable[temp_val.ixfe >> 8 & 63]; safe_format_xf(temp_val, options, wb.opts.Date1904); addcell(last_formula.cell, temp_val, options); last_formula = null; } else throw new Error("String record expects Formula"); } break; case 33: case 545: { arrayf.push(val$1); var _arraystart = encode_cell(val$1[0].s); cc = options.dense ? (out["!data"][val$1[0].s.r] || [])[val$1[0].s.c] : out[_arraystart]; if (options.cellFormula && cc) { if (!last_formula) break; if (!_arraystart || !cc) break; cc.f = "" + stringify_formula(val$1[1], range, val$1[0], supbooks, opts); cc.F = encode_range(val$1[0]); } } break; case 1212: { if (!options.cellFormula) break; if (last_cell) { if (!last_formula) break; sharedf[encode_cell(last_formula.cell)] = val$1[0]; cc = options.dense ? (out["!data"][last_formula.cell.r] || [])[last_formula.cell.c] : out[encode_cell(last_formula.cell)]; (cc || {}).f = "" + stringify_formula(val$1[0], range, lastcell, supbooks, opts); } } break; case 253: temp_val = make_cell(sst[val$1.isst].t, val$1.ixfe, "s"); if (sst[val$1.isst].h) temp_val.h = sst[val$1.isst].h; temp_val.XF = XFs[temp_val.ixfe]; if (BIFF2Fmt > 0) temp_val.z = temp_val.XF && temp_val.XF.numFmtId && BIFF2FmtTable[temp_val.XF.numFmtId] || BIFF2FmtTable[temp_val.ixfe >> 8 & 63]; safe_format_xf(temp_val, options, wb.opts.Date1904); addcell({ c: val$1.c, r: val$1.r }, temp_val, options); break; case 513: if (options.sheetStubs) { temp_val = { ixfe: val$1.ixfe, XF: XFs[val$1.ixfe], t: "z" }; if (BIFF2Fmt > 0) temp_val.z = temp_val.XF && temp_val.XF.numFmtId && BIFF2FmtTable[temp_val.XF.numFmtId] || BIFF2FmtTable[temp_val.ixfe >> 8 & 63]; safe_format_xf(temp_val, options, wb.opts.Date1904); addcell({ c: val$1.c, r: val$1.r }, temp_val, options); } break; case 190: if (options.sheetStubs) { for (var _j = val$1.c; _j <= val$1.C; ++_j) { var _ixfe = val$1.ixfe[_j - val$1.c]; temp_val = { ixfe: _ixfe, XF: XFs[_ixfe], t: "z" }; if (BIFF2Fmt > 0) temp_val.z = temp_val.XF && temp_val.XF.numFmtId && BIFF2FmtTable[temp_val.XF.numFmtId] || BIFF2FmtTable[temp_val.ixfe >> 8 & 63]; safe_format_xf(temp_val, options, wb.opts.Date1904); addcell({ c: _j, r: val$1.r }, temp_val, options); } } break; case 214: case 516: case 4: temp_val = make_cell(val$1.val, val$1.ixfe, "s"); temp_val.XF = XFs[temp_val.ixfe]; if (BIFF2Fmt > 0) temp_val.z = temp_val.XF && temp_val.XF.numFmtId && BIFF2FmtTable[temp_val.XF.numFmtId] || BIFF2FmtTable[temp_val.ixfe >> 8 & 63]; safe_format_xf(temp_val, options, wb.opts.Date1904); addcell({ c: val$1.c, r: val$1.r }, temp_val, options); break; case 0: case 512: { if (file_depth === 1) range = val$1; } break; case 252: { sst = val$1; } break; case 1054: { if (opts.biff >= 3 && opts.biff <= 4) { BIFF2FmtTable[BIFF2Fmt++] = val$1[1]; for (var b4idx = 0; b4idx < BIFF2Fmt + 163; ++b4idx) if (table_fmt[b4idx] == val$1[1]) break; if (b4idx >= 163) SSF__load(val$1[1], BIFF2Fmt + 163); } else SSF__load(val$1[1], val$1[0]); } break; case 30: { BIFF2FmtTable[BIFF2Fmt++] = val$1; for (var b2idx = 0; b2idx < BIFF2Fmt + 163; ++b2idx) if (table_fmt[b2idx] == val$1) break; if (b2idx >= 163) SSF__load(val$1, BIFF2Fmt + 163); } break; case 229: merges = merges.concat(val$1); break; case 93: objects[val$1.cmo[0]] = opts.lastobj = val$1; break; case 438: opts.lastobj.TxO = val$1; break; case 127: opts.lastobj.ImData = val$1; break; case 440: { for (rngR = val$1[0].s.r; rngR <= val$1[0].e.r; ++rngR) for (rngC = val$1[0].s.c; rngC <= val$1[0].e.c; ++rngC) { cc = options.dense ? (out["!data"][rngR] || [])[rngC] : out[encode_cell({ c: rngC, r: rngR })]; if (cc) cc.l = val$1[1]; } } break; case 2048: { for (rngR = val$1[0].s.r; rngR <= val$1[0].e.r; ++rngR) for (rngC = val$1[0].s.c; rngC <= val$1[0].e.c; ++rngC) { cc = options.dense ? (out["!data"][rngR] || [])[rngC] : out[encode_cell({ c: rngC, r: rngR })]; if (cc && cc.l) cc.l.Tooltip = val$1[1]; } } break; case 28: { cc = options.dense ? (out["!data"][val$1[0].r] || [])[val$1[0].c] : out[encode_cell(val$1[0])]; if (!cc) { if (options.dense) { if (!out["!data"][val$1[0].r]) out["!data"][val$1[0].r] = []; cc = out["!data"][val$1[0].r][val$1[0].c] = { t: "z" }; } else { cc = out[encode_cell(val$1[0])] = { t: "z" }; } range.e.r = Math.max(range.e.r, val$1[0].r); range.s.r = Math.min(range.s.r, val$1[0].r); range.e.c = Math.max(range.e.c, val$1[0].c); range.s.c = Math.min(range.s.c, val$1[0].c); } if (!cc.c) cc.c = []; if (opts.biff <= 5 && opts.biff >= 2) cmnt = { a: "SheetJ5", t: val$1[1] }; else { var noteobj = objects[val$1[2]]; cmnt = { a: val$1[1], t: noteobj.TxO.t }; if (val$1[3] != null && !(val$1[3] & 2)) cc.c.hidden = true; } cc.c.push(cmnt); } break; case 2173: update_xfext(XFs[val$1.ixfe], val$1.ext); break; case 125: { if (!opts.cellStyles) break; while (val$1.e >= val$1.s) { colinfo[val$1.e--] = { width: val$1.w / 256, level: val$1.level || 0, hidden: !!(val$1.flags & 1) }; if (!seencol) { seencol = true; find_mdw_colw(val$1.w / 256); } process_col(colinfo[val$1.e + 1]); } } break; case 520: { var rowobj = {}; if (val$1.level != null) { rowinfo[val$1.r] = rowobj; rowobj.level = val$1.level; } if (val$1.hidden) { rowinfo[val$1.r] = rowobj; rowobj.hidden = true; } if (val$1.hpt) { rowinfo[val$1.r] = rowobj; rowobj.hpt = val$1.hpt; rowobj.hpx = pt2px(val$1.hpt); } } break; case 38: case 39: case 40: case 41: if (!out["!margins"]) default_margins(out["!margins"] = {}); out["!margins"][{ 38: "left", 39: "right", 40: "top", 41: "bottom" }[RecordType]] = val$1; break; case 161: if (!out["!margins"]) default_margins(out["!margins"] = {}); out["!margins"].header = val$1.header; out["!margins"].footer = val$1.footer; break; case 574: if (val$1.RTL) Workbook.Views[0].RTL = true; break; case 146: palette$1 = val$1; break; case 2198: themes = val$1; break; case 140: country = val$1; break; case 442: { if (!cur_sheet) Workbook.WBProps.CodeName = val$1 || "ThisWorkbook"; else wsprops.CodeName = val$1 || wsprops.name; } break; } } else { if (!R$1) console.error("Missing Info for XLS Record 0x" + RecordType.toString(16)); blob.l += length; } } wb.SheetNames = keys(Directory).sort(function(a$2, b$3) { return Number(a$2) - Number(b$3); }).map(function(x$2) { return Directory[x$2].name; }); if (!options.bookSheets) wb.Sheets = Sheets; if (!wb.SheetNames.length && Preamble["!ref"]) { wb.SheetNames.push("Sheet1"); if (wb.Sheets) wb.Sheets["Sheet1"] = Preamble; } else wb.Preamble = Preamble; if (wb.Sheets) FilterDatabases.forEach(function(r$10, i$7) { wb.Sheets[wb.SheetNames[i$7]]["!autofilter"] = r$10; }); wb.Strings = sst; wb.SSF = dup(table_fmt); if (opts.enc) wb.Encryption = opts.enc; if (themes) wb.Themes = themes; wb.Metadata = {}; if (country !== undefined) wb.Metadata.Country = country; if (supbooks.names.length > 0) Workbook.Names = supbooks.names; wb.Workbook = Workbook; return wb; } function parse_xls_props(cfb, props, o$10) { var DSI = CFB.find(cfb, "/!DocumentSummaryInformation"); if (DSI && DSI.size > 0) try { var DocSummary = parse_PropertySetStream(DSI, DocSummaryPIDDSI, PSCLSID.DSI); for (var d$5 in DocSummary) props[d$5] = DocSummary[d$5]; } catch (e$10) { if (o$10.WTF) throw e$10; } var SI = CFB.find(cfb, "/!SummaryInformation"); if (SI && SI.size > 0) try { var Summary = parse_PropertySetStream(SI, SummaryPIDSI, PSCLSID.SI); for (var s$5 in Summary) if (props[s$5] == null) props[s$5] = Summary[s$5]; } catch (e$10) { if (o$10.WTF) throw e$10; } if (props.HeadingPairs && props.TitlesOfParts) { load_props_pairs(props.HeadingPairs, props.TitlesOfParts, props, o$10); delete props.HeadingPairs; delete props.TitlesOfParts; } } function write_xls_props(wb, cfb) { var DSEntries = [], SEntries = [], CEntries = []; var i$7 = 0, Keys; var DocSummaryRE = evert_key(DocSummaryPIDDSI, "n"); var SummaryRE = evert_key(SummaryPIDSI, "n"); if (wb.Props) { Keys = keys(wb.Props); for (i$7 = 0; i$7 < Keys.length; ++i$7) (Object.prototype.hasOwnProperty.call(DocSummaryRE, Keys[i$7]) ? DSEntries : Object.prototype.hasOwnProperty.call(SummaryRE, Keys[i$7]) ? SEntries : CEntries).push([Keys[i$7], wb.Props[Keys[i$7]]]); } if (wb.Custprops) { Keys = keys(wb.Custprops); for (i$7 = 0; i$7 < Keys.length; ++i$7) if (!Object.prototype.hasOwnProperty.call(wb.Props || {}, Keys[i$7])) (Object.prototype.hasOwnProperty.call(DocSummaryRE, Keys[i$7]) ? DSEntries : Object.prototype.hasOwnProperty.call(SummaryRE, Keys[i$7]) ? SEntries : CEntries).push([Keys[i$7], wb.Custprops[Keys[i$7]]]); } var CEntries2 = []; for (i$7 = 0; i$7 < CEntries.length; ++i$7) { if (XLSPSSkip.indexOf(CEntries[i$7][0]) > -1 || PseudoPropsPairs.indexOf(CEntries[i$7][0]) > -1) continue; if (CEntries[i$7][1] == null) continue; CEntries2.push(CEntries[i$7]); } if (SEntries.length) CFB.utils.cfb_add(cfb, "/SummaryInformation", write_PropertySetStream(SEntries, PSCLSID.SI, SummaryRE, SummaryPIDSI)); if (DSEntries.length || CEntries2.length) CFB.utils.cfb_add(cfb, "/DocumentSummaryInformation", write_PropertySetStream(DSEntries, PSCLSID.DSI, DocSummaryRE, DocSummaryPIDDSI, CEntries2.length ? CEntries2 : null, PSCLSID.UDI)); } function parse_xlscfb(cfb, options) { if (!options) options = {}; fix_read_opts(options); reset_cp(); if (options.codepage) set_ansi(options.codepage); var CompObj, WB; if (cfb.FullPaths) { if (CFB.find(cfb, "/encryption")) throw new Error("File is password-protected"); CompObj = CFB.find(cfb, "!CompObj"); WB = CFB.find(cfb, "/Workbook") || CFB.find(cfb, "/Book"); } else { switch (options.type) { case "base64": cfb = s2a(Base64_decode(cfb)); break; case "binary": cfb = s2a(cfb); break; case "buffer": break; case "array": if (!Array.isArray(cfb)) cfb = Array.prototype.slice.call(cfb); break; } prep_blob(cfb, 0); WB = { content: cfb }; } var WorkbookP; var _data; if (CompObj) parse_compobj(CompObj); if (options.bookProps && !options.bookSheets) WorkbookP = {}; else { var T$3 = has_buf ? "buffer" : "array"; if (WB && WB.content) WorkbookP = parse_workbook(WB.content, options); else if ((_data = CFB.find(cfb, "PerfectOffice_MAIN")) && _data.content) WorkbookP = WK_.to_workbook(_data.content, (options.type = T$3, options)); else if ((_data = CFB.find(cfb, "NativeContent_MAIN")) && _data.content) WorkbookP = WK_.to_workbook(_data.content, (options.type = T$3, options)); else if ((_data = CFB.find(cfb, "MN0")) && _data.content) throw new Error("Unsupported Works 4 for Mac file"); else throw new Error("Cannot find Workbook stream"); if (options.bookVBA && cfb.FullPaths && CFB.find(cfb, "/_VBA_PROJECT_CUR/VBA/dir")) WorkbookP.vbaraw = make_vba_xls(cfb); } var props = {}; if (cfb.FullPaths) parse_xls_props(cfb, props, options); WorkbookP.Props = WorkbookP.Custprops = props; if (options.bookFiles) WorkbookP.cfb = cfb; return WorkbookP; } function write_xlscfb(wb, opts) { var o$10 = opts || {}; var cfb = CFB.utils.cfb_new({ root: "R" }); var wbpath = "/Workbook"; switch (o$10.bookType || "xls") { case "xls": o$10.bookType = "biff8"; case "xla": if (!o$10.bookType) o$10.bookType = "xla"; case "biff8": wbpath = "/Workbook"; o$10.biff = 8; break; case "biff5": wbpath = "/Book"; o$10.biff = 5; break; default: throw new Error("invalid type " + o$10.bookType + " for XLS CFB"); } CFB.utils.cfb_add(cfb, wbpath, write_biff_buf(wb, o$10)); if (o$10.biff == 8 && (wb.Props || wb.Custprops)) write_xls_props(wb, cfb); if (o$10.biff == 8 && wb.vbaraw) fill_vba_xls(cfb, CFB.read(wb.vbaraw, { type: typeof wb.vbaraw == "string" ? "binary" : "buffer" })); return cfb; } function write_biff_rec(ba, type, payload, length) { var t$6 = type; if (isNaN(t$6)) return; var len = length || (payload || []).length || 0; var o$10 = ba.next(4); o$10.write_shift(2, t$6); o$10.write_shift(2, len); if (len > 0 && is_buf(payload)) ba.push(payload); } function write_biff_continue(ba, type, payload, length) { var len = length || (payload || []).length || 0; if (len <= 8224) return write_biff_rec(ba, type, payload, len); var t$6 = type; if (isNaN(t$6)) return; var parts = payload.parts || [], sidx = 0; var i$7 = 0, w$2 = 0; while (w$2 + (parts[sidx] || 8224) <= 8224) { w$2 += parts[sidx] || 8224; sidx++; } var o$10 = ba.next(4); o$10.write_shift(2, t$6); o$10.write_shift(2, w$2); ba.push(payload.slice(i$7, i$7 + w$2)); i$7 += w$2; while (i$7 < len) { o$10 = ba.next(4); o$10.write_shift(2, 60); w$2 = 0; while (w$2 + (parts[sidx] || 8224) <= 8224) { w$2 += parts[sidx] || 8224; sidx++; } o$10.write_shift(2, w$2); ba.push(payload.slice(i$7, i$7 + w$2)); i$7 += w$2; } } function write_BIFF2BERR(r$10, c$7, val$1, t$6) { var out = new_buf(9); write_BIFF2Cell(out, r$10, c$7); write_Bes(val$1, t$6 || "b", out); return out; } function write_BIFF2LABEL(r$10, c$7, val$1) { var out = new_buf(8 + 2 * val$1.length); write_BIFF2Cell(out, r$10, c$7); out.write_shift(1, val$1.length); out.write_shift(val$1.length, val$1, "sbcs"); return out.l < out.length ? out.slice(0, out.l) : out; } function write_comments_biff2(ba, comments) { comments.forEach(function(data) { var text$2 = data[0].map(function(cc) { return cc.t; }).join(""); if (text$2.length <= 2048) return write_biff_rec(ba, 28, write_NOTE_BIFF2(text$2, data[1], data[2])); write_biff_rec(ba, 28, write_NOTE_BIFF2(text$2.slice(0, 2048), data[1], data[2], text$2.length)); for (var i$7 = 2048; i$7 < text$2.length; i$7 += 2048) write_biff_rec(ba, 28, write_NOTE_BIFF2(text$2.slice(i$7, Math.min(i$7 + 2048, text$2.length)), -1, -1, Math.min(2048, text$2.length - i$7))); }); } function write_ws_biff2_cell(ba, cell, R$1, C$2, opts, date1904) { var ifmt = 0; if (cell.z != null) { ifmt = opts._BIFF2FmtTable.indexOf(cell.z); if (ifmt == -1) { opts._BIFF2FmtTable.push(cell.z); ifmt = opts._BIFF2FmtTable.length - 1; } } var ixfe = 0; if (cell.z != null) { for (; ixfe < opts.cellXfs.length; ++ixfe) if (opts.cellXfs[ixfe].numFmtId == ifmt) break; if (ixfe == opts.cellXfs.length) opts.cellXfs.push({ numFmtId: ifmt }); } if (cell.v != null) switch (cell.t) { case "d": case "n": var v$3 = cell.t == "d" ? datenum(parseDate(cell.v, date1904), date1904) : cell.v; if (opts.biff == 2 && v$3 == (v$3 | 0) && v$3 >= 0 && v$3 < 65536) write_biff_rec(ba, 2, write_BIFF2INT(R$1, C$2, v$3, ixfe, ifmt)); else if (isNaN(v$3)) write_biff_rec(ba, 5, write_BIFF2BERR(R$1, C$2, 36, "e")); else if (!isFinite(v$3)) write_biff_rec(ba, 5, write_BIFF2BERR(R$1, C$2, 7, "e")); else write_biff_rec(ba, 3, write_BIFF2NUM(R$1, C$2, v$3, ixfe, ifmt)); return; case "b": case "e": write_biff_rec(ba, 5, write_BIFF2BERR(R$1, C$2, cell.v, cell.t)); return; case "s": case "str": write_biff_rec(ba, 4, write_BIFF2LABEL(R$1, C$2, cell.v == null ? "" : String(cell.v).slice(0, 255))); return; } write_biff_rec(ba, 1, write_BIFF2Cell(null, R$1, C$2)); } function write_ws_biff2(ba, ws, idx, opts, wb) { var dense = ws["!data"] != null; var range = safe_decode_range(ws["!ref"] || "A1"), rr = "", cols = []; if (range.e.c > 255 || range.e.r > 16383) { if (opts.WTF) throw new Error("Range " + (ws["!ref"] || "A1") + " exceeds format limit A1:IV16384"); range.e.c = Math.min(range.e.c, 255); range.e.r = Math.min(range.e.r, 16383); } var date1904 = (((wb || {}).Workbook || {}).WBProps || {}).date1904; var row = [], comments = []; for (var C$2 = range.s.c; C$2 <= range.e.c; ++C$2) cols[C$2] = encode_col(C$2); for (var R$1 = range.s.r; R$1 <= range.e.r; ++R$1) { if (dense) row = ws["!data"][R$1] || []; rr = encode_row(R$1); for (C$2 = range.s.c; C$2 <= range.e.c; ++C$2) { var cell = dense ? row[C$2] : ws[cols[C$2] + rr]; if (!cell) continue; write_ws_biff2_cell(ba, cell, R$1, C$2, opts, date1904); if (cell.c) comments.push([ cell.c, R$1, C$2 ]); } } write_comments_biff2(ba, comments); } function write_biff2_buf(wb, opts) { var o$10 = opts || {}; var ba = buf_array(); var idx = 0; for (var i$7 = 0; i$7 < wb.SheetNames.length; ++i$7) if (wb.SheetNames[i$7] == o$10.sheet) idx = i$7; if (idx == 0 && !!o$10.sheet && wb.SheetNames[0] != o$10.sheet) throw new Error("Sheet not found: " + o$10.sheet); write_biff_rec(ba, o$10.biff == 4 ? 1033 : o$10.biff == 3 ? 521 : 9, write_BOF(wb, 16, o$10)); if (((wb.Workbook || {}).WBProps || {}).date1904) write_biff_rec(ba, 34, writebool(true)); o$10.cellXfs = [{ numFmtId: 0 }]; o$10._BIFF2FmtTable = ["General"]; o$10._Fonts = []; var body = buf_array(); write_ws_biff2(body, wb.Sheets[wb.SheetNames[idx]], idx, o$10, wb); o$10._BIFF2FmtTable.forEach(function(f$4) { if (o$10.biff <= 3) write_biff_rec(ba, 30, write_BIFF2Format(f$4)); else write_biff_rec(ba, 1054, write_BIFF4Format(f$4)); }); o$10.cellXfs.forEach(function(xf) { switch (o$10.biff) { case 2: write_biff_rec(ba, 67, write_BIFF2XF(xf)); break; case 3: write_biff_rec(ba, 579, write_BIFF3XF(xf)); break; case 4: write_biff_rec(ba, 1091, write_BIFF4XF(xf)); break; } }); delete o$10._BIFF2FmtTable; delete o$10.cellXfs; delete o$10._Fonts; ba.push(body.end()); write_biff_rec(ba, 10); return ba.end(); } function write_MsoDrawingGroup() { var buf = new_buf(82 + 8 * b8ocnts.length); buf.write_shift(2, 15); buf.write_shift(2, 61440); buf.write_shift(4, 74 + 8 * b8ocnts.length); { buf.write_shift(2, 0); buf.write_shift(2, 61446); buf.write_shift(4, 16 + 8 * b8ocnts.length); { buf.write_shift(4, b8oid); buf.write_shift(4, b8ocnts.length + 1); var acc = 0; for (var i$7 = 0; i$7 < b8ocnts.length; ++i$7) acc += b8ocnts[i$7] && b8ocnts[i$7][1] || 0; buf.write_shift(4, acc); buf.write_shift(4, b8ocnts.length); } b8ocnts.forEach(function(b8) { buf.write_shift(4, b8[0]); buf.write_shift(4, b8[2]); }); } { buf.write_shift(2, 51); buf.write_shift(2, 61451); buf.write_shift(4, 18); buf.write_shift(2, 191); buf.write_shift(4, 524296); buf.write_shift(2, 385); buf.write_shift(4, 134217793); buf.write_shift(2, 448); buf.write_shift(4, 134217792); } { buf.write_shift(2, 64); buf.write_shift(2, 61726); buf.write_shift(4, 16); buf.write_shift(4, 134217741); buf.write_shift(4, 134217740); buf.write_shift(4, 134217751); buf.write_shift(4, 268435703); } return buf; } function write_comments_biff8(ba, comments) { var notes = [], sz = 0, pl = buf_array(), baseid = b8oid; var _oasc; comments.forEach(function(c$7, ci) { var author = ""; var text$2 = c$7[0].map(function(t$6) { if (t$6.a && !author) author = t$6.a; return t$6.t; }).join(""); ++b8oid; { var oasc = new_buf(150); oasc.write_shift(2, 15); oasc.write_shift(2, 61444); oasc.write_shift(4, 150); { oasc.write_shift(2, 3234); oasc.write_shift(2, 61450); oasc.write_shift(4, 8); oasc.write_shift(4, b8oid); oasc.write_shift(4, 2560); } { oasc.write_shift(2, 227); oasc.write_shift(2, 61451); oasc.write_shift(4, 84); oasc.write_shift(2, 128); oasc.write_shift(4, 0); oasc.write_shift(2, 139); oasc.write_shift(4, 2); oasc.write_shift(2, 191); oasc.write_shift(4, 524296); oasc.write_shift(2, 344); oasc.l += 4; oasc.write_shift(2, 385); oasc.write_shift(4, 134217808); oasc.write_shift(2, 387); oasc.write_shift(4, 134217808); oasc.write_shift(2, 389); oasc.write_shift(4, 268435700); oasc.write_shift(2, 447); oasc.write_shift(4, 1048592); oasc.write_shift(2, 448); oasc.write_shift(4, 134217809); oasc.write_shift(2, 451); oasc.write_shift(4, 268435700); oasc.write_shift(2, 513); oasc.write_shift(4, 134217809); oasc.write_shift(2, 515); oasc.write_shift(4, 268435700); oasc.write_shift(2, 575); oasc.write_shift(4, 196609); oasc.write_shift(2, 959); oasc.write_shift(4, 131072 | (c$7[0].hidden ? 2 : 0)); } { oasc.l += 2; oasc.write_shift(2, 61456); oasc.write_shift(4, 18); oasc.write_shift(2, 3); oasc.write_shift(2, c$7[2] + 2); oasc.l += 2; oasc.write_shift(2, c$7[1] + 1); oasc.l += 2; oasc.write_shift(2, c$7[2] + 4); oasc.l += 2; oasc.write_shift(2, c$7[1] + 5); oasc.l += 2; } { oasc.l += 2; oasc.write_shift(2, 61457); oasc.l += 4; } oasc.l = 150; if (ci == 0) _oasc = oasc; else write_biff_rec(pl, 236, oasc); } sz += 150; { var obj = new_buf(52); obj.write_shift(2, 21); obj.write_shift(2, 18); obj.write_shift(2, 25); obj.write_shift(2, b8oid); obj.write_shift(2, 0); obj.l = 22; obj.write_shift(2, 13); obj.write_shift(2, 22); obj.write_shift(4, 1651663474); obj.write_shift(4, 2503426821); obj.write_shift(4, 2150634280); obj.write_shift(4, 1768515844 + b8oid * 256); obj.write_shift(2, 0); obj.write_shift(4, 0); obj.l += 4; write_biff_rec(pl, 93, obj); } { var oact = new_buf(8); oact.l += 2; oact.write_shift(2, 61453); oact.l += 4; write_biff_rec(pl, 236, oact); } sz += 8; { var txo = new_buf(18); txo.write_shift(2, 18); txo.l += 8; txo.write_shift(2, text$2.length); txo.write_shift(2, 16); txo.l += 4; write_biff_rec(pl, 438, txo); { var cont = new_buf(1 + text$2.length); cont.write_shift(1, 0); cont.write_shift(text$2.length, text$2, "sbcs"); write_biff_rec(pl, 60, cont); } { var conf = new_buf(16); conf.l += 8; conf.write_shift(2, text$2.length); conf.l += 6; write_biff_rec(pl, 60, conf); } } { var notesh = new_buf(12 + author.length); notesh.write_shift(2, c$7[1]); notesh.write_shift(2, c$7[2]); notesh.write_shift(2, 0 | (c$7[0].hidden ? 0 : 2)); notesh.write_shift(2, b8oid); notesh.write_shift(2, author.length); notesh.write_shift(1, 0); notesh.write_shift(author.length, author, "sbcs"); notesh.l++; notes.push(notesh); } }); { var hdr = new_buf(80); hdr.write_shift(2, 15); hdr.write_shift(2, 61442); hdr.write_shift(4, sz + hdr.length - 8); { hdr.write_shift(2, 16); hdr.write_shift(2, 61448); hdr.write_shift(4, 8); hdr.write_shift(4, comments.length + 1); hdr.write_shift(4, b8oid); } { hdr.write_shift(2, 15); hdr.write_shift(2, 61443); hdr.write_shift(4, sz + 48); { hdr.write_shift(2, 15); hdr.write_shift(2, 61444); hdr.write_shift(4, 40); { hdr.write_shift(2, 1); hdr.write_shift(2, 61449); hdr.write_shift(4, 16); hdr.l += 16; } { hdr.write_shift(2, 2); hdr.write_shift(2, 61450); hdr.write_shift(4, 8); hdr.write_shift(4, baseid); hdr.write_shift(4, 5); } } } write_biff_rec(ba, 236, _oasc ? bconcat([hdr, _oasc]) : hdr); } ba.push(pl.end()); notes.forEach(function(n$9) { write_biff_rec(ba, 28, n$9); }); b8ocnts.push([ baseid, comments.length + 1, b8oid ]); ++b8oid; } function write_FONTS_biff8(ba, data, opts) { write_biff_rec(ba, 49, write_Font({ sz: 12, color: { theme: 1 }, name: "Arial", family: 2, scheme: "minor" }, opts)); } function write_FMTS_biff8(ba, NF, opts) { if (!NF) return; [ [5, 8], [23, 26], [41, 44], [50, 392] ].forEach(function(r$10) { for (var i$7 = r$10[0]; i$7 <= r$10[1]; ++i$7) if (NF[i$7] != null) write_biff_rec(ba, 1054, write_Format(i$7, NF[i$7], opts)); }); } function write_FEAT(ba, ws) { var o$10 = new_buf(19); o$10.write_shift(4, 2151); o$10.write_shift(4, 0); o$10.write_shift(4, 0); o$10.write_shift(2, 3); o$10.write_shift(1, 1); o$10.write_shift(4, 0); write_biff_rec(ba, 2151, o$10); o$10 = new_buf(39); o$10.write_shift(4, 2152); o$10.write_shift(4, 0); o$10.write_shift(4, 0); o$10.write_shift(2, 3); o$10.write_shift(1, 0); o$10.write_shift(4, 0); o$10.write_shift(2, 1); o$10.write_shift(4, 4); o$10.write_shift(2, 0); write_Ref8U(safe_decode_range(ws["!ref"] || "A1"), o$10); o$10.write_shift(4, 4); write_biff_rec(ba, 2152, o$10); } function write_CELLXFS_biff8(ba, opts) { for (var i$7 = 0; i$7 < 16; ++i$7) write_biff_rec(ba, 224, write_XF({ numFmtId: 0, style: true }, 0, opts)); opts.cellXfs.forEach(function(c$7) { write_biff_rec(ba, 224, write_XF(c$7, 0, opts)); }); } function write_ws_biff8_hlinks(ba, ws) { for (var R$1 = 0; R$1 < ws["!links"].length; ++R$1) { var HL = ws["!links"][R$1]; write_biff_rec(ba, 440, write_HLink(HL)); if (HL[1].Tooltip) write_biff_rec(ba, 2048, write_HLinkTooltip(HL)); } delete ws["!links"]; } function write_ws_cols_biff8(ba, cols) { if (!cols) return; var cnt = 0; cols.forEach(function(col, idx) { if (++cnt <= 256 && col) { write_biff_rec(ba, 125, write_ColInfo(col_obj_w(idx, col), idx)); } }); } function write_ws_biff8_cell(ba, cell, R$1, C$2, opts, date1904) { var os = 16 + get_cell_style(opts.cellXfs, cell, opts); if (cell.v == null && !cell.bf) { write_biff_rec(ba, 513, write_XLSCell(R$1, C$2, os)); return; } if (cell.bf) write_biff_rec(ba, 6, write_Formula(cell, R$1, C$2, opts, os)); else switch (cell.t) { case "d": case "n": var v$3 = cell.t == "d" ? datenum(parseDate(cell.v, date1904), date1904) : cell.v; if (isNaN(v$3)) write_biff_rec(ba, 517, write_BoolErr(R$1, C$2, 36, os, opts, "e")); else if (!isFinite(v$3)) write_biff_rec(ba, 517, write_BoolErr(R$1, C$2, 7, os, opts, "e")); else write_biff_rec(ba, 515, write_Number(R$1, C$2, v$3, os, opts)); break; case "b": case "e": write_biff_rec(ba, 517, write_BoolErr(R$1, C$2, cell.v, os, opts, cell.t)); break; case "s": case "str": if (opts.bookSST) { var isst = get_sst_id(opts.Strings, cell.v == null ? "" : String(cell.v), opts.revStrings); write_biff_rec(ba, 253, write_LabelSst(R$1, C$2, isst, os, opts)); } else write_biff_rec(ba, 516, write_Label(R$1, C$2, (cell.v == null ? "" : String(cell.v)).slice(0, 255), os, opts)); break; default: write_biff_rec(ba, 513, write_XLSCell(R$1, C$2, os)); } } function write_ws_biff8(idx, opts, wb) { var ba = buf_array(); var s$5 = wb.SheetNames[idx], ws = wb.Sheets[s$5] || {}; var _WB = (wb || {}).Workbook || {}; var _sheet = (_WB.Sheets || [])[idx] || {}; var dense = ws["!data"] != null; var b8 = opts.biff == 8; var ref, rr = "", cols = []; var range = safe_decode_range(ws["!ref"] || "A1"); var MAX_ROWS = b8 ? 65536 : 16384; if (range.e.c > 255 || range.e.r >= MAX_ROWS) { if (opts.WTF) throw new Error("Range " + (ws["!ref"] || "A1") + " exceeds format limit A1:IV" + MAX_ROWS); range.e.c = Math.min(range.e.c, 255); range.e.r = Math.min(range.e.r, MAX_ROWS - 1); } write_biff_rec(ba, 2057, write_BOF(wb, 16, opts)); write_biff_rec(ba, 13, writeuint16(1)); write_biff_rec(ba, 12, writeuint16(100)); write_biff_rec(ba, 15, writebool(true)); write_biff_rec(ba, 17, writebool(false)); write_biff_rec(ba, 16, write_Xnum(.001)); write_biff_rec(ba, 95, writebool(true)); write_biff_rec(ba, 42, writebool(false)); write_biff_rec(ba, 43, writebool(false)); write_biff_rec(ba, 130, writeuint16(1)); write_biff_rec(ba, 128, write_Guts([0, 0])); write_biff_rec(ba, 131, writebool(false)); write_biff_rec(ba, 132, writebool(false)); if (b8) write_ws_cols_biff8(ba, ws["!cols"]); write_biff_rec(ba, 512, write_Dimensions(range, opts)); var date1904 = (((wb || {}).Workbook || {}).WBProps || {}).date1904; if (b8) ws["!links"] = []; for (var C$2 = range.s.c; C$2 <= range.e.c; ++C$2) cols[C$2] = encode_col(C$2); var comments = []; var row = []; for (var R$1 = range.s.r; R$1 <= range.e.r; ++R$1) { if (dense) row = ws["!data"][R$1] || []; rr = encode_row(R$1); for (C$2 = range.s.c; C$2 <= range.e.c; ++C$2) { var cell = dense ? row[C$2] : ws[cols[C$2] + rr]; if (!cell) continue; write_ws_biff8_cell(ba, cell, R$1, C$2, opts, date1904); if (b8 && cell.l) ws["!links"].push([cols[C$2] + rr, cell.l]); if (cell.c) comments.push([ cell.c, R$1, C$2 ]); } } var cname = _sheet.CodeName || _sheet.name || s$5; if (b8) write_comments_biff8(ba, comments); else write_comments_biff2(ba, comments); if (b8) write_biff_rec(ba, 574, write_Window2((_WB.Views || [])[0])); if (b8 && (ws["!merges"] || []).length) write_biff_rec(ba, 229, write_MergeCells(ws["!merges"])); if (b8) write_ws_biff8_hlinks(ba, ws); write_biff_rec(ba, 442, write_XLUnicodeString(cname, opts)); if (b8) write_FEAT(ba, ws); write_biff_rec(ba, 10); return ba.end(); } function write_biff8_global(wb, bufs, opts) { var A$1 = buf_array(); var _WB = (wb || {}).Workbook || {}; var _sheets = _WB.Sheets || []; var _wb = _WB.WBProps || {}; var b8 = opts.biff == 8, b5 = opts.biff == 5; write_biff_rec(A$1, 2057, write_BOF(wb, 5, opts)); if (opts.bookType == "xla") write_biff_rec(A$1, 135); write_biff_rec(A$1, 225, b8 ? writeuint16(1200) : null); write_biff_rec(A$1, 193, writezeroes(2)); if (b5) write_biff_rec(A$1, 191); if (b5) write_biff_rec(A$1, 192); write_biff_rec(A$1, 226); write_biff_rec(A$1, 92, write_WriteAccess("SheetJS", opts)); write_biff_rec(A$1, 66, writeuint16(b8 ? 1200 : 1252)); if (b8) write_biff_rec(A$1, 353, writeuint16(0)); if (b8) write_biff_rec(A$1, 448); write_biff_rec(A$1, 317, write_RRTabId(wb.SheetNames.length)); if (b8 && wb.vbaraw) write_biff_rec(A$1, 211); if (b8 && wb.vbaraw) { var cname = _wb.CodeName || "ThisWorkbook"; write_biff_rec(A$1, 442, write_XLUnicodeString(cname, opts)); } write_biff_rec(A$1, 156, writeuint16(17)); write_biff_rec(A$1, 25, writebool(false)); write_biff_rec(A$1, 18, writebool(false)); write_biff_rec(A$1, 19, writeuint16(0)); if (b8) write_biff_rec(A$1, 431, writebool(false)); if (b8) write_biff_rec(A$1, 444, writeuint16(0)); write_biff_rec(A$1, 61, write_Window1(opts)); write_biff_rec(A$1, 64, writebool(false)); write_biff_rec(A$1, 141, writeuint16(0)); write_biff_rec(A$1, 34, writebool(safe1904(wb) == "true")); write_biff_rec(A$1, 14, writebool(true)); if (b8) write_biff_rec(A$1, 439, writebool(false)); write_biff_rec(A$1, 218, writeuint16(0)); write_FONTS_biff8(A$1, wb, opts); write_FMTS_biff8(A$1, wb.SSF, opts); write_CELLXFS_biff8(A$1, opts); if (b8) write_biff_rec(A$1, 352, writebool(false)); var a$2 = A$1.end(); var C$2 = buf_array(); if (b8) write_biff_rec(C$2, 140, write_Country()); if (b8 && b8ocnts.length) write_biff_rec(C$2, 235, write_MsoDrawingGroup()); if (b8 && opts.Strings) write_biff_continue(C$2, 252, write_SST(opts.Strings, opts)); write_biff_rec(C$2, 10); var c$7 = C$2.end(); var B$2 = buf_array(); var blen = 0, j$2 = 0; for (j$2 = 0; j$2 < wb.SheetNames.length; ++j$2) blen += (b8 ? 12 : 11) + (b8 ? 2 : 1) * wb.SheetNames[j$2].length; var start = a$2.length + blen + c$7.length; for (j$2 = 0; j$2 < wb.SheetNames.length; ++j$2) { var _sheet = _sheets[j$2] || {}; write_biff_rec(B$2, 133, write_BoundSheet8({ pos: start, hs: _sheet.Hidden || 0, dt: 0, name: wb.SheetNames[j$2] }, opts)); start += bufs[j$2].length; } var b$3 = B$2.end(); if (blen != b$3.length) throw new Error("BS8 " + blen + " != " + b$3.length); var out = []; if (a$2.length) out.push(a$2); if (b$3.length) out.push(b$3); if (c$7.length) out.push(c$7); return bconcat(out); } function write_biff8_buf(wb, opts) { var o$10 = opts || {}; var bufs = []; if (wb && !wb.SSF) { wb.SSF = dup(table_fmt); } if (wb && wb.SSF) { make_ssf(); SSF_load_table(wb.SSF); o$10.revssf = evert_num(wb.SSF); o$10.revssf[wb.SSF[65535]] = 0; o$10.ssf = wb.SSF; } b8oid = 1; b8ocnts = []; o$10.Strings = []; o$10.Strings.Count = 0; o$10.Strings.Unique = 0; fix_write_opts(o$10); o$10.cellXfs = []; get_cell_style(o$10.cellXfs, {}, { revssf: { "General": 0 } }); if (!wb.Props) wb.Props = {}; for (var i$7 = 0; i$7 < wb.SheetNames.length; ++i$7) bufs[bufs.length] = write_ws_biff8(i$7, o$10, wb); bufs.unshift(write_biff8_global(wb, bufs, o$10)); return bconcat(bufs); } function write_biff_buf(wb, opts) { for (var i$7 = 0; i$7 <= wb.SheetNames.length; ++i$7) { var ws = wb.Sheets[wb.SheetNames[i$7]]; if (!ws || !ws["!ref"]) continue; var range = decode_range(ws["!ref"]); if (range.e.c > 255) { if (typeof console != "undefined" && console.error) console.error("Worksheet '" + wb.SheetNames[i$7] + "' extends beyond column IV (255). Data may be lost."); } if (range.e.r > 65535) { if (typeof console != "undefined" && console.error) console.error("Worksheet '" + wb.SheetNames[i$7] + "' extends beyond row 65536. Data may be lost."); } } var o$10 = opts || {}; switch (o$10.biff || 2) { case 8: case 5: return write_biff8_buf(wb, opts); case 4: case 3: case 2: return write_biff2_buf(wb, opts); } throw new Error("invalid type " + o$10.bookType + " for BIFF"); } function html_to_sheet(str, _opts) { var opts = _opts || {}; var dense = opts.dense != null ? opts.dense : DENSE; var ws = {}; if (dense) ws["!data"] = []; str = str_remove_ng(str, ""); var mtch = str.match(/"); var mtch2 = str.match(/<\/table/i); var i$7 = mtch.index, j$2 = mtch2 && mtch2.index || str.length; var rows = split_regex(str.slice(i$7, j$2), /(:?]*>)/i, ""); var R$1 = -1, C$2 = 0, RS = 0, CS = 0; var range = { s: { r: 1e7, c: 1e7 }, e: { r: 0, c: 0 } }; var merges = []; for (i$7 = 0; i$7 < rows.length; ++i$7) { var row = rows[i$7].trim(); var hd = row.slice(0, 3).toLowerCase(); if (hd == "/i); for (j$2 = 0; j$2 < cells.length; ++j$2) { var cell = cells[j$2].trim(); if (!cell.match(/")) > -1) m$3 = m$3.slice(cc + 1); for (var midx = 0; midx < merges.length; ++midx) { var _merge = merges[midx]; if (_merge.s.c == C$2 && _merge.s.r < R$1 && R$1 <= _merge.e.r) { C$2 = _merge.e.c + 1; midx = -1; } } var tag = parsexmltag(cell.slice(0, cell.indexOf(">"))); CS = tag.colspan ? +tag.colspan : 1; if ((RS = +tag.rowspan) > 1 || CS > 1) merges.push({ s: { r: R$1, c: C$2 }, e: { r: R$1 + (RS || 1) - 1, c: C$2 + CS - 1 } }); var _t = tag.t || tag["data-t"] || ""; if (!m$3.length) { C$2 += CS; continue; } m$3 = htmldecode(m$3); if (range.s.r > R$1) range.s.r = R$1; if (range.e.r < R$1) range.e.r = R$1; if (range.s.c > C$2) range.s.c = C$2; if (range.e.c < C$2) range.e.c = C$2; if (!m$3.length) { C$2 += CS; continue; } var o$10 = { t: "s", v: m$3 }; if (opts.raw || !m$3.trim().length || _t == "s") {} else if (m$3 === "TRUE") o$10 = { t: "b", v: true }; else if (m$3 === "FALSE") o$10 = { t: "b", v: false }; else if (!isNaN(fuzzynum(m$3))) o$10 = { t: "n", v: fuzzynum(m$3) }; else if (!isNaN(fuzzydate(m$3).getDate())) { o$10 = { t: "d", v: parseDate(m$3) }; if (opts.UTC === false) o$10.v = utc_to_local(o$10.v); if (!opts.cellDates) o$10 = { t: "n", v: datenum(o$10.v) }; o$10.z = opts.dateNF || table_fmt[14]; } else if (m$3.charCodeAt(0) == 35 && RBErr[m$3] != null) { o$10.t = "e"; o$10.w = m$3; o$10.v = RBErr[m$3]; } if (o$10.cellText !== false) o$10.w = m$3; if (dense) { if (!ws["!data"][R$1]) ws["!data"][R$1] = []; ws["!data"][R$1][C$2] = o$10; } else ws[encode_cell({ r: R$1, c: C$2 })] = o$10; C$2 += CS; } } ws["!ref"] = encode_range(range); if (merges.length) ws["!merges"] = merges; return ws; } function make_html_row(ws, r$10, R$1, o$10) { var M$3 = ws["!merges"] || []; var oo = []; var sp = {}; var dense = ws["!data"] != null; for (var C$2 = r$10.s.c; C$2 <= r$10.e.c; ++C$2) { var RS = 0, CS = 0; for (var j$2 = 0; j$2 < M$3.length; ++j$2) { if (M$3[j$2].s.r > R$1 || M$3[j$2].s.c > C$2) continue; if (M$3[j$2].e.r < R$1 || M$3[j$2].e.c < C$2) continue; if (M$3[j$2].s.r < R$1 || M$3[j$2].s.c < C$2) { RS = -1; break; } RS = M$3[j$2].e.r - M$3[j$2].s.r + 1; CS = M$3[j$2].e.c - M$3[j$2].s.c + 1; break; } if (RS < 0) continue; var coord = encode_col(C$2) + encode_row(R$1); var cell = dense ? (ws["!data"][R$1] || [])[C$2] : ws[coord]; if (cell && cell.t == "n" && cell.v != null && !isFinite(cell.v)) { if (isNaN(cell.v)) cell = { t: "e", v: 36, w: BErr[36] }; else cell = { t: "e", v: 7, w: BErr[7] }; } var w$2 = cell && cell.v != null && (cell.h || escapehtml(cell.w || (format_cell(cell), cell.w) || "")) || ""; sp = {}; if (RS > 1) sp.rowspan = RS; if (CS > 1) sp.colspan = CS; if (o$10.editable) w$2 = "" + w$2 + ""; else if (cell) { sp["data-t"] = cell && cell.t || "z"; if (cell.v != null) sp["data-v"] = escapehtml(cell.v instanceof Date ? cell.v.toISOString() : cell.v); if (cell.z != null) sp["data-z"] = cell.z; if (cell.l && (cell.l.Target || "#").charAt(0) != "#") w$2 = "" + w$2 + ""; } sp.id = (o$10.id || "sjs") + "-" + coord; oo.push(writextag("td", w$2, sp)); } var preamble = ""; return preamble + oo.join("") + ""; } function html_to_workbook(str, opts) { var mtch = str_match_xml_ig(str, "table"); if (!mtch || mtch.length == 0) throw new Error("Invalid HTML: could not find
"); if (mtch.length == 1) { var w$2 = sheet_to_workbook(html_to_sheet(mtch[0], opts), opts); w$2.bookType = "html"; return w$2; } var wb = book_new(); mtch.forEach(function(s$5, idx) { book_append_sheet(wb, html_to_sheet(s$5, opts), "Sheet" + (idx + 1)); }); wb.bookType = "html"; return wb; } function make_html_preamble(ws, R$1, o$10) { var out = []; return out.join("") + ""; } function sheet_to_html(ws, opts) { var o$10 = opts || {}; var header = o$10.header != null ? o$10.header : HTML_BEGIN; var footer = o$10.footer != null ? o$10.footer : HTML_END; var out = [header]; var r$10 = decode_range(ws["!ref"] || "A1"); out.push(make_html_preamble(ws, r$10, o$10)); if (ws["!ref"]) for (var R$1 = r$10.s.r; R$1 <= r$10.e.r; ++R$1) out.push(make_html_row(ws, r$10, R$1, o$10)); out.push("
" + footer); return out.join(""); } function sheet_add_dom(ws, table, _opts) { var rows = table.rows; if (!rows) { throw "Unsupported origin when " + table.tagName + " is not a TABLE"; } var opts = _opts || {}; var dense = ws["!data"] != null; var or_R = 0, or_C = 0; if (opts.origin != null) { if (typeof opts.origin == "number") or_R = opts.origin; else { var _origin = typeof opts.origin == "string" ? decode_cell(opts.origin) : opts.origin; or_R = _origin.r; or_C = _origin.c; } } var sheetRows = Math.min(opts.sheetRows || 1e7, rows.length); var range = { s: { r: 0, c: 0 }, e: { r: or_R, c: or_C } }; if (ws["!ref"]) { var _range = decode_range(ws["!ref"]); range.s.r = Math.min(range.s.r, _range.s.r); range.s.c = Math.min(range.s.c, _range.s.c); range.e.r = Math.max(range.e.r, _range.e.r); range.e.c = Math.max(range.e.c, _range.e.c); if (or_R == -1) range.e.r = or_R = _range.e.r + 1; } var merges = [], midx = 0; var rowinfo = ws["!rows"] || (ws["!rows"] = []); var _R = 0, R$1 = 0, _C = 0, C$2 = 0, RS = 0, CS = 0; if (!ws["!cols"]) ws["!cols"] = []; for (; _R < rows.length && R$1 < sheetRows; ++_R) { var row = rows[_R]; if (is_dom_element_hidden(row)) { if (opts.display) continue; rowinfo[R$1] = { hidden: true }; } var elts = row.cells; for (_C = C$2 = 0; _C < elts.length; ++_C) { var elt = elts[_C]; if (opts.display && is_dom_element_hidden(elt)) continue; var v$3 = elt.hasAttribute("data-v") ? elt.getAttribute("data-v") : elt.hasAttribute("v") ? elt.getAttribute("v") : htmldecode(elt.innerHTML); var z$2 = elt.getAttribute("data-z") || elt.getAttribute("z"); for (midx = 0; midx < merges.length; ++midx) { var m$3 = merges[midx]; if (m$3.s.c == C$2 + or_C && m$3.s.r < R$1 + or_R && R$1 + or_R <= m$3.e.r) { C$2 = m$3.e.c + 1 - or_C; midx = -1; } } CS = +elt.getAttribute("colspan") || 1; if ((RS = +elt.getAttribute("rowspan") || 1) > 1 || CS > 1) merges.push({ s: { r: R$1 + or_R, c: C$2 + or_C }, e: { r: R$1 + or_R + (RS || 1) - 1, c: C$2 + or_C + (CS || 1) - 1 } }); var o$10 = { t: "s", v: v$3 }; var _t = elt.getAttribute("data-t") || elt.getAttribute("t") || ""; if (v$3 != null) { if (v$3.length == 0) o$10.t = _t || "z"; else if (opts.raw || v$3.trim().length == 0 || _t == "s") {} else if (_t == "e" && BErr[+v$3]) o$10 = { t: "e", v: +v$3, w: BErr[+v$3] }; else if (v$3 === "TRUE") o$10 = { t: "b", v: true }; else if (v$3 === "FALSE") o$10 = { t: "b", v: false }; else if (!isNaN(fuzzynum(v$3))) o$10 = { t: "n", v: fuzzynum(v$3) }; else if (!isNaN(fuzzydate(v$3).getDate())) { o$10 = { t: "d", v: parseDate(v$3) }; if (opts.UTC) o$10.v = local_to_utc(o$10.v); if (!opts.cellDates) o$10 = { t: "n", v: datenum(o$10.v) }; o$10.z = opts.dateNF || table_fmt[14]; } else if (v$3.charCodeAt(0) == 35 && RBErr[v$3] != null) o$10 = { t: "e", v: RBErr[v$3], w: v$3 }; } if (o$10.z === undefined && z$2 != null) o$10.z = z$2; var l$3 = "", Aelts = elt.getElementsByTagName("A"); if (Aelts && Aelts.length) { for (var Aelti = 0; Aelti < Aelts.length; ++Aelti) if (Aelts[Aelti].hasAttribute("href")) { l$3 = Aelts[Aelti].getAttribute("href"); if (l$3.charAt(0) != "#") break; } } if (l$3 && l$3.charAt(0) != "#" && l$3.slice(0, 11).toLowerCase() != "javascript:") o$10.l = { Target: l$3 }; if (dense) { if (!ws["!data"][R$1 + or_R]) ws["!data"][R$1 + or_R] = []; ws["!data"][R$1 + or_R][C$2 + or_C] = o$10; } else ws[encode_cell({ c: C$2 + or_C, r: R$1 + or_R })] = o$10; if (range.e.c < C$2 + or_C) range.e.c = C$2 + or_C; C$2 += CS; } ++R$1; } if (merges.length) ws["!merges"] = (ws["!merges"] || []).concat(merges); range.e.r = Math.max(range.e.r, R$1 - 1 + or_R); ws["!ref"] = encode_range(range); if (R$1 >= sheetRows) ws["!fullref"] = encode_range((range.e.r = rows.length - _R + R$1 - 1 + or_R, range)); return ws; } function parse_dom_table(table, _opts) { var opts = _opts || {}; var ws = {}; if (opts.dense) ws["!data"] = []; return sheet_add_dom(ws, table, _opts); } function table_to_book(table, opts) { var o$10 = sheet_to_workbook(parse_dom_table(table, opts), opts); return o$10; } function is_dom_element_hidden(element) { var display = ""; var get_computed_style = get_get_computed_style_function(element); if (get_computed_style) display = get_computed_style(element).getPropertyValue("display"); if (!display) display = element.style && element.style.display; return display === "none"; } function get_get_computed_style_function(element) { if (element.ownerDocument.defaultView && typeof element.ownerDocument.defaultView.getComputedStyle === "function") return element.ownerDocument.defaultView.getComputedStyle; if (typeof getComputedStyle === "function") return getComputedStyle; return null; } function parse_text_p(text$2) { var fixed = text$2.replace(/[\t\r\n]/g, " ").trim().replace(/ +/g, " ").replace(//g, " ").replace(//g, function($$, $1) { return Array(parseInt($1, 10) + 1).join(" "); }).replace(/]*\/>/g, " ").replace(//g, "\n"); var v$3 = unescapexml(fixed.replace(/<[^<>]*>/g, "")); return [v$3]; } function parse_ods_styles(d$5, _opts, _nfm) { var number_format_map = _nfm || {}; var str = xlml_normalize(d$5); xlmlregex.lastIndex = 0; str = remove_doctype(str_remove_ng(str, "")); var Rn, NFtag, NF = "", tNF = "", y$3, etpos = 0, tidx = -1, infmt = false, payload = ""; while (Rn = xlmlregex.exec(str)) { switch (Rn[3] = Rn[3].replace(/_[\s\S]*$/, "")) { case "number-style": case "currency-style": case "percentage-style": case "date-style": case "time-style": case "text-style": if (Rn[1] === "/") { infmt = false; if (NFtag["truncate-on-overflow"] == "false") { if (NF.match(/h/)) NF = NF.replace(/h+/, "[$&]"); else if (NF.match(/m/)) NF = NF.replace(/m+/, "[$&]"); else if (NF.match(/s/)) NF = NF.replace(/s+/, "[$&]"); } number_format_map[NFtag.name] = NF; NF = ""; } else if (Rn[0].charAt(Rn[0].length - 2) !== "/") { infmt = true; NF = ""; NFtag = parsexmltag(Rn[0], false); } break; case "boolean-style": if (Rn[1] === "/") { infmt = false; number_format_map[NFtag.name] = "General"; NF = ""; } else if (Rn[0].charAt(Rn[0].length - 2) !== "/") { infmt = true; NF = ""; NFtag = parsexmltag(Rn[0], false); } break; case "boolean": NF += "General"; break; case "text": if (Rn[1] === "/") { payload = str.slice(tidx, xlmlregex.lastIndex - Rn[0].length); if (payload == "%" && NFtag[0] == "=0") NF = number_format_map[y$3["apply-style-name"]] + ";" + NF; else console.error("ODS number format may be incorrect: " + y$3["condition"]); break; case "number": if (Rn[1] === "/") break; y$3 = parsexmltag(Rn[0], false); tNF = ""; tNF += fill("0", +y$3["min-integer-digits"] || 1); if (parsexmlbool(y$3["grouping"])) tNF = commaify(fill("#", Math.max(0, 4 - tNF.length)) + tNF); if (+y$3["min-decimal-places"] || +y$3["decimal-places"]) tNF += "."; if (+y$3["min-decimal-places"]) tNF += fill("0", +y$3["min-decimal-places"] || 1); if (+y$3["decimal-places"] - (+y$3["min-decimal-places"] || 0)) tNF += fill("0", +y$3["decimal-places"] - (+y$3["min-decimal-places"] || 0)); NF += tNF; break; case "embedded-text": if (Rn[1] === "/") { if (etpos == 0) NF += "\"" + str.slice(tidx, xlmlregex.lastIndex - Rn[0].length).replace(/"/g, "\"\"") + "\""; else NF = NF.slice(0, etpos) + "\"" + str.slice(tidx, xlmlregex.lastIndex - Rn[0].length).replace(/"/g, "\"\"") + "\"" + NF.slice(etpos); } else if (Rn[0].charAt(Rn[0].length - 2) !== "/") { tidx = xlmlregex.lastIndex; etpos = -+parsexmltag(Rn[0], false)["position"] || 0; } break; } } return number_format_map; } function parse_content_xml(d$5, _opts, _nfm) { var opts = _opts || {}; if (DENSE != null && opts.dense == null) opts.dense = DENSE; var str = xlml_normalize(d$5); var state$1 = [], tmp; var tag; var nfidx, NF = "", pidx = 0; var sheetag; var rowtag; var Sheets = {}, SheetNames = []; var ws = {}; if (opts.dense) ws["!data"] = []; var Rn, q$2; var ctag = { value: "" }, ctag2 = {}; var textp = "", textpidx = 0, textptag, oldtextp = "", oldtextpidx = 0; var textR = [], oldtextR = []; var R$1 = -1, C$2 = -1, range = { s: { r: 1e6, c: 1e7 }, e: { r: 0, c: 0 } }; var row_ol = 0; var number_format_map = _nfm || {}, styles$1 = {}; var merges = [], mrange = {}, mR = 0, mC = 0; var rowinfo = [], rowpeat = 1, colpeat = 1; var arrayf = []; var WB = { Names: [], WBProps: {} }; var atag = {}; var _Ref = ["", ""]; var comments = [], comment = {}; var creator = "", creatoridx = 0; var isstub = false, intable = false; var i$7 = 0; xlmlregex.lastIndex = 0; str = remove_doctype(str_remove_ng(str, "")); while (Rn = xlmlregex.exec(str)) switch (Rn[3] = Rn[3].replace(/_[\s\S]*$/, "")) { case "table": case "工作表": if (Rn[1] === "/") { if (range.e.c >= range.s.c && range.e.r >= range.s.r) ws["!ref"] = encode_range(range); else ws["!ref"] = "A1:A1"; if (opts.sheetRows > 0 && opts.sheetRows <= range.e.r) { ws["!fullref"] = ws["!ref"]; range.e.r = opts.sheetRows - 1; ws["!ref"] = encode_range(range); } if (merges.length) ws["!merges"] = merges; if (rowinfo.length) ws["!rows"] = rowinfo; sheetag.name = sheetag["名称"] || sheetag.name; if (typeof JSON !== "undefined") JSON.stringify(sheetag); SheetNames.push(sheetag.name); Sheets[sheetag.name] = ws; intable = false; } else if (Rn[0].charAt(Rn[0].length - 2) !== "/") { sheetag = parsexmltag(Rn[0], false); R$1 = C$2 = -1; range.s.r = range.s.c = 1e7; range.e.r = range.e.c = 0; ws = {}; if (opts.dense) ws["!data"] = []; merges = []; rowinfo = []; intable = true; } break; case "table-row-group": if (Rn[1] === "/") --row_ol; else ++row_ol; break; case "table-row": case "行": if (Rn[1] === "/") { R$1 += rowpeat; rowpeat = 1; break; } rowtag = parsexmltag(Rn[0], false); if (rowtag["行号"]) R$1 = rowtag["行号"] - 1; else if (R$1 == -1) R$1 = 0; rowpeat = +rowtag["number-rows-repeated"] || 1; if (rowpeat < 10) { for (i$7 = 0; i$7 < rowpeat; ++i$7) if (row_ol > 0) rowinfo[R$1 + i$7] = { level: row_ol }; } C$2 = -1; break; case "covered-table-cell": if (Rn[1] !== "/") { ++C$2; ctag = parsexmltag(Rn[0], false); colpeat = parseInt(ctag["number-columns-repeated"] || "1", 10) || 1; if (opts.sheetStubs) { while (colpeat-- > 0) { if (opts.dense) { if (!ws["!data"][R$1]) ws["!data"][R$1] = []; ws["!data"][R$1][C$2] = { t: "z" }; } else ws[encode_cell({ r: R$1, c: C$2 })] = { t: "z" }; ++C$2; } --C$2; } else C$2 += colpeat - 1; } textp = ""; textR = []; break; case "table-cell": case "数据": if (Rn[0].charAt(Rn[0].length - 2) === "/") { ++C$2; ctag = parsexmltag(Rn[0], false); colpeat = parseInt(ctag["number-columns-repeated"] || "1", 10) || 1; q$2 = { t: "z", v: null }; if (ctag.formula && opts.cellFormula != false) q$2.f = ods_to_csf_formula(unescapexml(ctag.formula)); if (ctag["style-name"] && styles$1[ctag["style-name"]]) q$2.z = styles$1[ctag["style-name"]]; if ((ctag["数据类型"] || ctag["value-type"]) == "string") { q$2.t = "s"; q$2.v = unescapexml(ctag["string-value"] || ""); if (opts.dense) { if (!ws["!data"][R$1]) ws["!data"][R$1] = []; ws["!data"][R$1][C$2] = q$2; } else { ws[encode_col(C$2) + encode_row(R$1)] = q$2; } } C$2 += colpeat - 1; } else if (Rn[1] !== "/") { ++C$2; textp = oldtextp = ""; textpidx = oldtextpidx = 0; textR = []; oldtextR = []; colpeat = 1; var rptR = rowpeat ? R$1 + rowpeat - 1 : R$1; if (C$2 > range.e.c) range.e.c = C$2; if (C$2 < range.s.c) range.s.c = C$2; if (R$1 < range.s.r) range.s.r = R$1; if (rptR > range.e.r) range.e.r = rptR; ctag = parsexmltag(Rn[0], false); ctag2 = parsexmltagraw(Rn[0], true); comments = []; comment = {}; q$2 = { t: ctag["数据类型"] || ctag["value-type"], v: null }; if (ctag["style-name"] && styles$1[ctag["style-name"]]) q$2.z = styles$1[ctag["style-name"]]; if (opts.cellFormula) { if (ctag.formula) ctag.formula = unescapexml(ctag.formula); if (ctag["number-matrix-columns-spanned"] && ctag["number-matrix-rows-spanned"]) { mR = parseInt(ctag["number-matrix-rows-spanned"], 10) || 0; mC = parseInt(ctag["number-matrix-columns-spanned"], 10) || 0; mrange = { s: { r: R$1, c: C$2 }, e: { r: R$1 + mR - 1, c: C$2 + mC - 1 } }; q$2.F = encode_range(mrange); arrayf.push([mrange, q$2.F]); } if (ctag.formula) q$2.f = ods_to_csf_formula(ctag.formula); else for (i$7 = 0; i$7 < arrayf.length; ++i$7) if (R$1 >= arrayf[i$7][0].s.r && R$1 <= arrayf[i$7][0].e.r) { if (C$2 >= arrayf[i$7][0].s.c && C$2 <= arrayf[i$7][0].e.c) q$2.F = arrayf[i$7][1]; } } if (ctag["number-columns-spanned"] || ctag["number-rows-spanned"]) { mR = parseInt(ctag["number-rows-spanned"] || "1", 10) || 1; mC = parseInt(ctag["number-columns-spanned"] || "1", 10) || 1; if (mR * mC > 1) { mrange = { s: { r: R$1, c: C$2 }, e: { r: R$1 + mR - 1, c: C$2 + mC - 1 } }; merges.push(mrange); } } if (ctag["number-columns-repeated"]) colpeat = parseInt(ctag["number-columns-repeated"], 10); switch (q$2.t) { case "boolean": q$2.t = "b"; q$2.v = parsexmlbool(ctag["boolean-value"]) || +ctag["boolean-value"] >= 1; break; case "float": q$2.t = "n"; q$2.v = parseFloat(ctag.value); if (opts.cellDates && q$2.z && fmt_is_date(q$2.z)) { q$2.v = numdate(q$2.v + (WB.WBProps.date1904 ? 1462 : 0)); q$2.t = typeof q$2.v == "number" ? "n" : "d"; } break; case "percentage": q$2.t = "n"; q$2.v = parseFloat(ctag.value); break; case "currency": q$2.t = "n"; q$2.v = parseFloat(ctag.value); break; case "date": q$2.t = "d"; q$2.v = parseDate(ctag["date-value"], WB.WBProps.date1904); if (!opts.cellDates) { q$2.t = "n"; q$2.v = datenum(q$2.v, WB.WBProps.date1904); } if (!q$2.z) q$2.z = "m/d/yy"; break; case "time": q$2.t = "n"; q$2.v = parse_isodur(ctag["time-value"]) / 86400; if (opts.cellDates) { q$2.v = numdate(q$2.v); q$2.t = typeof q$2.v == "number" ? "n" : "d"; } if (!q$2.z) q$2.z = "HH:MM:SS"; break; case "number": q$2.t = "n"; q$2.v = parseFloat(ctag["数据数值"]); break; default: if (q$2.t === "string" || q$2.t === "text" || !q$2.t) { q$2.t = "s"; if (ctag["string-value"] != null) { textp = unescapexml(ctag["string-value"]); textR = []; } } else throw new Error("Unsupported value type " + q$2.t); } } else { isstub = false; if (ctag2["calcext:value-type"] == "error" && RBErr[textp] != null) { q$2.t = "e"; q$2.w = textp; q$2.v = RBErr[textp]; } if (q$2.t === "s") { q$2.v = textp || ""; if (textR.length) q$2.R = textR; isstub = textpidx == 0; } if (atag.Target) q$2.l = atag; if (comments.length > 0) { q$2.c = comments; comments = []; } if (textp && opts.cellText !== false) q$2.w = textp; if (isstub) { q$2.t = "z"; delete q$2.v; } if (!isstub || opts.sheetStubs) { if (!(opts.sheetRows && opts.sheetRows <= R$1)) { for (var rpt = 0; rpt < rowpeat; ++rpt) { colpeat = parseInt(ctag["number-columns-repeated"] || "1", 10); if (opts.dense) { if (!ws["!data"][R$1 + rpt]) ws["!data"][R$1 + rpt] = []; ws["!data"][R$1 + rpt][C$2] = rpt == 0 ? q$2 : dup(q$2); while (--colpeat > 0) ws["!data"][R$1 + rpt][C$2 + colpeat] = dup(q$2); } else { ws[encode_cell({ r: R$1 + rpt, c: C$2 })] = q$2; while (--colpeat > 0) ws[encode_cell({ r: R$1 + rpt, c: C$2 + colpeat })] = dup(q$2); } if (range.e.c <= C$2) range.e.c = C$2; } } } colpeat = parseInt(ctag["number-columns-repeated"] || "1", 10); C$2 += colpeat - 1; colpeat = 0; q$2 = {}; textp = ""; textR = []; } atag = {}; break; case "document": case "document-content": case "电子表格文档": case "spreadsheet": case "主体": case "scripts": case "styles": case "font-face-decls": case "master-styles": if (Rn[1] === "/") { if ((tmp = state$1.pop())[0] !== Rn[3]) throw "Bad state: " + tmp; } else if (Rn[0].charAt(Rn[0].length - 2) !== "/") state$1.push([Rn[3], true]); break; case "annotation": if (Rn[1] === "/") { if ((tmp = state$1.pop())[0] !== Rn[3]) throw "Bad state: " + tmp; comment.t = textp; if (textR.length) comment.R = textR; comment.a = creator; comments.push(comment); textp = oldtextp; textpidx = oldtextpidx; textR = oldtextR; } else if (Rn[0].charAt(Rn[0].length - 2) !== "/") { state$1.push([Rn[3], false]); var annotag = parsexmltag(Rn[0], true); if (!(annotag["display"] && parsexmlbool(annotag["display"]))) comments.hidden = true; oldtextp = textp; oldtextpidx = textpidx; oldtextR = textR; textp = ""; textpidx = 0; textR = []; } creator = ""; creatoridx = 0; break; case "creator": if (Rn[1] === "/") { creator = str.slice(creatoridx, Rn.index); } else creatoridx = Rn.index + Rn[0].length; break; case "meta": case "元数据": case "settings": case "config-item-set": case "config-item-map-indexed": case "config-item-map-entry": case "config-item-map-named": case "shapes": case "frame": case "text-box": case "image": case "data-pilot-tables": case "list-style": case "form": case "dde-links": case "event-listeners": case "chart": if (Rn[1] === "/") { if ((tmp = state$1.pop())[0] !== Rn[3]) throw "Bad state: " + tmp; } else if (Rn[0].charAt(Rn[0].length - 2) !== "/") state$1.push([Rn[3], false]); textp = ""; textpidx = 0; textR = []; break; case "scientific-number": case "currency-symbol": case "fill-character": break; case "text-style": case "boolean-style": case "number-style": case "currency-style": case "percentage-style": case "date-style": case "time-style": if (Rn[1] === "/") { var xlmlidx = xlmlregex.lastIndex; parse_ods_styles(str.slice(nfidx, xlmlregex.lastIndex), _opts, number_format_map); xlmlregex.lastIndex = xlmlidx; } else if (Rn[0].charAt(Rn[0].length - 2) !== "/") { nfidx = xlmlregex.lastIndex - Rn[0].length; } break; case "script": break; case "libraries": break; case "automatic-styles": break; case "default-style": case "page-layout": break; case "style": { var styletag = parsexmltag(Rn[0], false); if (styletag["family"] == "table-cell" && number_format_map[styletag["data-style-name"]]) styles$1[styletag["name"]] = number_format_map[styletag["data-style-name"]]; } break; case "map": break; case "font-face": break; case "paragraph-properties": break; case "table-properties": break; case "table-column-properties": break; case "table-row-properties": break; case "table-cell-properties": break; case "number": break; case "fraction": break; case "day": case "month": case "year": case "era": case "day-of-week": case "week-of-year": case "quarter": case "hours": case "minutes": case "seconds": case "am-pm": break; case "boolean": break; case "text": if (Rn[0].slice(-2) === "/>") break; else if (Rn[1] === "/") switch (state$1[state$1.length - 1][0]) { case "number-style": case "date-style": case "time-style": NF += str.slice(pidx, Rn.index); break; } else pidx = Rn.index + Rn[0].length; break; case "named-range": tag = parsexmltag(Rn[0], false); _Ref = ods_to_csf_3D(tag["cell-range-address"]); var nrange = { Name: tag.name, Ref: _Ref[0] + "!" + _Ref[1] }; if (intable) nrange.Sheet = SheetNames.length; WB.Names.push(nrange); break; case "text-content": break; case "text-properties": break; case "embedded-text": break; case "body": case "电子表格": break; case "forms": break; case "table-column": break; case "table-header-rows": break; case "table-rows": break; case "table-column-group": break; case "table-header-columns": break; case "table-columns": break; case "null-date": tag = parsexmltag(Rn[0], false); switch (tag["date-value"]) { case "1904-01-01": WB.WBProps.date1904 = true; break; } break; case "graphic-properties": break; case "calculation-settings": break; case "named-expressions": break; case "label-range": break; case "label-ranges": break; case "named-expression": break; case "sort": break; case "sort-by": break; case "sort-groups": break; case "tab": break; case "line-break": break; case "span": break; case "p": case "文本串": if (["master-styles"].indexOf(state$1[state$1.length - 1][0]) > -1) break; if (Rn[1] === "/" && (!ctag || !ctag["string-value"])) { var ptp = parse_text_p(str.slice(textpidx, Rn.index), textptag); textp = (textp.length > 0 ? textp + "\n" : "") + ptp[0]; } else if (Rn[0].slice(-2) == "/>") { textp += "\n"; } else { textptag = parsexmltag(Rn[0], false); textpidx = Rn.index + Rn[0].length; } break; case "s": break; case "database-range": if (Rn[1] === "/") break; try { _Ref = ods_to_csf_3D(parsexmltag(Rn[0])["target-range-address"]); Sheets[_Ref[0]]["!autofilter"] = { ref: _Ref[1] }; } catch (e$10) {} break; case "date": break; case "object": break; case "title": case "标题": break; case "desc": break; case "binary-data": break; case "table-source": break; case "scenario": break; case "iteration": break; case "content-validations": break; case "content-validation": break; case "help-message": break; case "error-message": break; case "database-ranges": break; case "filter": break; case "filter-and": break; case "filter-or": break; case "filter-condition": break; case "filter-set-item": break; case "list-level-style-bullet": break; case "list-level-style-number": break; case "list-level-properties": break; case "sender-firstname": case "sender-lastname": case "sender-initials": case "sender-title": case "sender-position": case "sender-email": case "sender-phone-private": case "sender-fax": case "sender-company": case "sender-phone-work": case "sender-street": case "sender-city": case "sender-postal-code": case "sender-country": case "sender-state-or-province": case "author-name": case "author-initials": case "chapter": case "file-name": case "template-name": case "sheet-name": break; case "event-listener": break; case "initial-creator": case "creation-date": case "print-date": case "generator": case "document-statistic": case "user-defined": case "editing-duration": case "editing-cycles": break; case "config-item": break; case "page-number": break; case "page-count": break; case "time": break; case "cell-range-source": break; case "detective": break; case "operation": break; case "highlighted-range": break; case "data-pilot-table": case "source-cell-range": case "source-service": case "data-pilot-field": case "data-pilot-level": case "data-pilot-subtotals": case "data-pilot-subtotal": case "data-pilot-members": case "data-pilot-member": case "data-pilot-display-info": case "data-pilot-sort-info": case "data-pilot-layout-info": case "data-pilot-field-reference": case "data-pilot-groups": case "data-pilot-group": case "data-pilot-group-member": break; case "rect": break; case "dde-connection-decls": case "dde-connection-decl": case "dde-link": case "dde-source": break; case "properties": break; case "property": break; case "a": if (Rn[1] !== "/") { atag = parsexmltag(Rn[0], false); if (!atag.href) break; atag.Target = unescapexml(atag.href); delete atag.href; if (atag.Target.charAt(0) == "#" && atag.Target.indexOf(".") > -1) { _Ref = ods_to_csf_3D(atag.Target.slice(1)); atag.Target = "#" + _Ref[0] + "!" + _Ref[1]; } else if (atag.Target.match(/^\.\.[\\\/]/)) atag.Target = atag.Target.slice(3); } break; case "table-protection": break; case "data-pilot-grand-total": break; case "office-document-common-attrs": break; default: switch (Rn[2]) { case "dc:": case "calcext:": case "loext:": case "ooo:": case "chartooo:": case "draw:": case "style:": case "chart:": case "form:": case "uof:": case "表:": case "字:": break; default: if (opts.WTF) throw new Error(Rn); } } var out = { Sheets, SheetNames, Workbook: WB }; if (opts.bookSheets) delete out.Sheets; return out; } function parse_ods(zip, opts) { opts = opts || {}; if (safegetzipfile(zip, "META-INF/manifest.xml")) parse_manifest(getzipdata(zip, "META-INF/manifest.xml"), opts); var styles$1 = getzipstr(zip, "styles.xml"); var Styles = styles$1 && parse_ods_styles(utf8read(styles$1), opts); var content = getzipstr(zip, "content.xml"); if (!content) throw new Error("Missing content.xml in ODS / UOF file"); var wb = parse_content_xml(utf8read(content), opts, Styles); if (safegetzipfile(zip, "meta.xml")) wb.Props = parse_core_props(getzipdata(zip, "meta.xml")); wb.bookType = "ods"; return wb; } function parse_fods(data, opts) { var wb = parse_content_xml(data, opts); wb.bookType = "fods"; return wb; } function write_number_format_ods(nf, nfidx) { var type = "number", payload = "", nopts = { "style:name": nfidx }, c$7 = "", i$7 = 0; nf = nf.replace(/"[$]"/g, "$"); j: { if (nf.indexOf(";") > -1) { console.error("Unsupported ODS Style Map exported. Using first branch of " + nf); nf = nf.slice(0, nf.indexOf(";")); } if (nf == "@") { type = "text"; payload = ""; break j; } if (nf.indexOf(/\$/) > -1) { type = "currency"; } if (nf[i$7] == "\"") { c$7 = ""; while (nf[++i$7] != "\"" || nf[++i$7] == "\"") c$7 += nf[i$7]; --i$7; if (nf[i$7 + 1] == "*") { i$7++; payload += "" + escapexml(c$7.replace(/""/g, "\"")) + ""; } else { payload += "" + escapexml(c$7.replace(/""/g, "\"")) + ""; } nf = nf.slice(i$7 + 1); i$7 = 0; } var t$6 = nf.match(/# (\?+)\/(\?+)/); if (t$6) { payload += writextag("number:fraction", null, { "number:min-integer-digits": 0, "number:min-numerator-digits": t$6[1].length, "number:max-denominator-value": Math.max(+t$6[1].replace(/./g, "9"), +t$6[2].replace(/./g, "9")) }); break j; } if (t$6 = nf.match(/# (\?+)\/(\d+)/)) { payload += writextag("number:fraction", null, { "number:min-integer-digits": 0, "number:min-numerator-digits": t$6[1].length, "number:denominator-value": +t$6[2] }); break j; } if (t$6 = nf.match(/\b(\d+)(|\.\d+)%/)) { type = "percentage"; payload += writextag("number:number", null, { "number:decimal-places": t$6[2] && t$6.length - 1 || 0, "number:min-decimal-places": t$6[2] && t$6.length - 1 || 0, "number:min-integer-digits": t$6[1].length }) + "%"; break j; } var has_time = false; if ([ "y", "m", "d" ].indexOf(nf[0]) > -1) { type = "date"; k: for (; i$7 < nf.length; ++i$7) switch (c$7 = nf[i$7].toLowerCase()) { case "h": case "s": has_time = true; --i$7; break k; case "m": l: for (var h$5 = i$7 + 1; h$5 < nf.length; ++h$5) switch (nf[h$5]) { case "y": case "d": break l; case "h": case "s": has_time = true; --i$7; break k; } case "y": case "d": while ((nf[++i$7] || "").toLowerCase() == c$7[0]) c$7 += c$7[0]; --i$7; switch (c$7) { case "y": case "yy": payload += ""; break; case "yyy": case "yyyy": payload += ""; break; case "mmmmm": console.error("ODS has no equivalent of format |mmmmm|"); case "m": case "mm": case "mmm": case "mmmm": payload += "= 3 ? "true" : "false") + "\"/>"; break; case "d": case "dd": payload += ""; break; case "ddd": case "dddd": payload += ""; break; } break; case "\"": while (nf[++i$7] != "\"" || nf[++i$7] == "\"") c$7 += nf[i$7]; --i$7; payload += "" + escapexml(c$7.slice(1).replace(/""/g, "\"")) + ""; break; case "\\": c$7 = nf[++i$7]; payload += "" + escapexml(c$7) + ""; break; case "/": case ":": payload += "" + escapexml(c$7) + ""; break; default: console.error("unrecognized character " + c$7 + " in ODF format " + nf); } if (!has_time) break j; nf = nf.slice(i$7 + 1); i$7 = 0; } if (nf.match(/^\[?[hms]/)) { if (type == "number") type = "time"; if (nf.match(/\[/)) { nf = nf.replace(/[\[\]]/g, ""); nopts["number:truncate-on-overflow"] = "false"; } for (; i$7 < nf.length; ++i$7) switch (c$7 = nf[i$7].toLowerCase()) { case "h": case "m": case "s": while ((nf[++i$7] || "").toLowerCase() == c$7[0]) c$7 += c$7[0]; --i$7; switch (c$7) { case "h": case "hh": payload += ""; break; case "m": case "mm": payload += ""; break; case "s": case "ss": if (nf[i$7 + 1] == ".") do { c$7 += nf[i$7 + 1]; ++i$7; } while (nf[i$7 + 1] == "0"); payload += ""; break; } break; case "\"": while (nf[++i$7] != "\"" || nf[++i$7] == "\"") c$7 += nf[i$7]; --i$7; payload += "" + escapexml(c$7.slice(1).replace(/""/g, "\"")) + ""; break; case "/": case ":": payload += "" + escapexml(c$7) + ""; break; case "a": if (nf.slice(i$7, i$7 + 3).toLowerCase() == "a/p") { payload += ""; i$7 += 2; break; } if (nf.slice(i$7, i$7 + 5).toLowerCase() == "am/pm") { payload += ""; i$7 += 4; break; } default: console.error("unrecognized character " + c$7 + " in ODF format " + nf); } break j; } if (nf.indexOf(/\$/) > -1) { type = "currency"; } if (nf[0] == "$") { payload += "$"; nf = nf.slice(1); i$7 = 0; } i$7 = 0; if (nf[i$7] == "\"") { while (nf[++i$7] != "\"" || nf[++i$7] == "\"") c$7 += nf[i$7]; --i$7; if (nf[i$7 + 1] == "*") { i$7++; payload += "" + escapexml(c$7.replace(/""/g, "\"")) + ""; } else { payload += "" + escapexml(c$7.replace(/""/g, "\"")) + ""; } nf = nf.slice(i$7 + 1); i$7 = 0; } var np = nf.match(/([#0][0#,]*)(\.[0#]*|)(E[+]?0*|)/i); if (!np || !np[0]) console.error("Could not find numeric part of " + nf); else { var base = np[1].replace(/,/g, ""); payload += " -1 ? " number:grouping=\"true\"" : "") + (np[2] && " number:decimal-places=\"" + (np[2].length - 1) + "\"" || " number:decimal-places=\"0\"") + (np[3] && np[3].indexOf("+") > -1 ? " number:forced-exponent-sign=\"true\"" : "") + (np[3] ? " number:min-exponent-digits=\"" + np[3].match(/0+/)[0].length + "\"" : "") + ">" + ""; i$7 = np.index + np[0].length; } if (nf[i$7] == "\"") { c$7 = ""; while (nf[++i$7] != "\"" || nf[++i$7] == "\"") c$7 += nf[i$7]; --i$7; payload += "" + escapexml(c$7.replace(/""/g, "\"")) + ""; } } if (!payload) { console.error("Could not generate ODS number format for |" + nf + "|"); return ""; } return writextag("number:" + type + "-style", payload, nopts); } function write_names_ods(Names, SheetNames, idx) { var scoped = []; for (var namei = 0; namei < Names.length; ++namei) { var name = Names[namei]; if (!name) continue; if (name.Sheet == (idx == -1 ? null : idx)) scoped.push(name); } if (!scoped.length) return ""; return " \n" + scoped.map(function(name$1) { var odsref = (idx == -1 ? "$" : "") + csf_to_ods_3D(name$1.Ref); return " " + writextag("table:named-range", null, { "table:name": name$1.Name, "table:cell-range-address": odsref, "table:base-cell-address": odsref.replace(/[\.][^\.]*$/, ".$A$1") }); }).join("\n") + "\n \n"; } function write_ods(wb, opts) { if (opts.bookType == "fods") return write_content_ods(wb, opts); var zip = zip_new(); var f$4 = ""; var manifest = []; var rdf = []; f$4 = "mimetype"; zip_add_file(zip, f$4, "application/vnd.oasis.opendocument.spreadsheet"); f$4 = "content.xml"; zip_add_file(zip, f$4, write_content_ods(wb, opts)); manifest.push([f$4, "text/xml"]); rdf.push([f$4, "ContentFile"]); f$4 = "styles.xml"; zip_add_file(zip, f$4, write_styles_ods(wb, opts)); manifest.push([f$4, "text/xml"]); rdf.push([f$4, "StylesFile"]); f$4 = "meta.xml"; zip_add_file(zip, f$4, XML_HEADER + write_meta_ods()); manifest.push([f$4, "text/xml"]); rdf.push([f$4, "MetadataFile"]); f$4 = "manifest.rdf"; zip_add_file(zip, f$4, write_rdf(rdf)); manifest.push([f$4, "application/rdf+xml"]); f$4 = "META-INF/manifest.xml"; zip_add_file(zip, f$4, write_manifest(manifest)); return zip; } function u8_to_dataview(array) { return new DataView(array.buffer, array.byteOffset, array.byteLength); } function u8str(u8) { return typeof TextDecoder != "undefined" ? new TextDecoder().decode(u8) : utf8read(a2s(u8)); } function stru8(str) { return typeof TextEncoder != "undefined" ? new TextEncoder().encode(str) : s2a(utf8write(str)); } function u8concat(u8a) { var len = 0; for (var i$7 = 0; i$7 < u8a.length; ++i$7) len += u8a[i$7].length; var out = new Uint8Array(len); var off = 0; for (i$7 = 0; i$7 < u8a.length; ++i$7) { var u8 = u8a[i$7], L$2 = u8.length; if (L$2 < 250) { for (var j$2 = 0; j$2 < L$2; ++j$2) out[off++] = u8[j$2]; } else { out.set(u8, off); off += L$2; } } return out; } function popcnt(x$2) { x$2 -= x$2 >> 1 & 1431655765; x$2 = (x$2 & 858993459) + (x$2 >> 2 & 858993459); return (x$2 + (x$2 >> 4) & 252645135) * 16843009 >>> 24; } function readDecimal128LE(buf, offset) { var exp = (buf[offset + 15] & 127) << 7 | buf[offset + 14] >> 1; var mantissa = buf[offset + 14] & 1; for (var j$2 = offset + 13; j$2 >= offset; --j$2) mantissa = mantissa * 256 + buf[j$2]; return (buf[offset + 15] & 128 ? -mantissa : mantissa) * Math.pow(10, exp - 6176); } function writeDecimal128LE(buf, offset, value) { var exp = Math.floor(value == 0 ? 0 : Math.LOG10E * Math.log(Math.abs(value))) + 6176 - 16; var mantissa = value / Math.pow(10, exp - 6176); buf[offset + 15] |= exp >> 7; buf[offset + 14] |= (exp & 127) << 1; for (var i$7 = 0; mantissa >= 1; ++i$7, mantissa /= 256) buf[offset + i$7] = mantissa & 255; buf[offset + 15] |= value >= 0 ? 0 : 128; } function parse_varint49(buf, ptr) { var l$3 = ptr.l; var usz = buf[l$3] & 127; varint: if (buf[l$3++] >= 128) { usz |= (buf[l$3] & 127) << 7; if (buf[l$3++] < 128) break varint; usz |= (buf[l$3] & 127) << 14; if (buf[l$3++] < 128) break varint; usz |= (buf[l$3] & 127) << 21; if (buf[l$3++] < 128) break varint; usz += (buf[l$3] & 127) * Math.pow(2, 28); ++l$3; if (buf[l$3++] < 128) break varint; usz += (buf[l$3] & 127) * Math.pow(2, 35); ++l$3; if (buf[l$3++] < 128) break varint; usz += (buf[l$3] & 127) * Math.pow(2, 42); ++l$3; if (buf[l$3++] < 128) break varint; } ptr.l = l$3; return usz; } function write_varint49(v$3) { var usz = new Uint8Array(7); usz[0] = v$3 & 127; var L$2 = 1; sz: if (v$3 > 127) { usz[L$2 - 1] |= 128; usz[L$2] = v$3 >> 7 & 127; ++L$2; if (v$3 <= 16383) break sz; usz[L$2 - 1] |= 128; usz[L$2] = v$3 >> 14 & 127; ++L$2; if (v$3 <= 2097151) break sz; usz[L$2 - 1] |= 128; usz[L$2] = v$3 >> 21 & 127; ++L$2; if (v$3 <= 268435455) break sz; usz[L$2 - 1] |= 128; usz[L$2] = v$3 / 256 >>> 21 & 127; ++L$2; if (v$3 <= 34359738367) break sz; usz[L$2 - 1] |= 128; usz[L$2] = v$3 / 65536 >>> 21 & 127; ++L$2; if (v$3 <= 4398046511103) break sz; usz[L$2 - 1] |= 128; usz[L$2] = v$3 / 16777216 >>> 21 & 127; ++L$2; } return usz[subarray](0, L$2); } function parse_packed_varints(buf) { var ptr = { l: 0 }; var out = []; while (ptr.l < buf.length) out.push(parse_varint49(buf, ptr)); return out; } function write_packed_varints(nums) { return u8concat(nums.map(function(x$2) { return write_varint49(x$2); })); } function varint_to_i32(buf) { var l$3 = 0, i32 = buf[l$3] & 127; if (buf[l$3++] < 128) return i32; i32 |= (buf[l$3] & 127) << 7; if (buf[l$3++] < 128) return i32; i32 |= (buf[l$3] & 127) << 14; if (buf[l$3++] < 128) return i32; i32 |= (buf[l$3] & 127) << 21; if (buf[l$3++] < 128) return i32; i32 |= (buf[l$3] & 15) << 28; return i32; } function varint_to_u64(buf) { var l$3 = 0, lo = buf[l$3] & 127, hi = 0; varint: if (buf[l$3++] >= 128) { lo |= (buf[l$3] & 127) << 7; if (buf[l$3++] < 128) break varint; lo |= (buf[l$3] & 127) << 14; if (buf[l$3++] < 128) break varint; lo |= (buf[l$3] & 127) << 21; if (buf[l$3++] < 128) break varint; lo |= (buf[l$3] & 127) << 28; hi = buf[l$3] >> 4 & 7; if (buf[l$3++] < 128) break varint; hi |= (buf[l$3] & 127) << 3; if (buf[l$3++] < 128) break varint; hi |= (buf[l$3] & 127) << 10; if (buf[l$3++] < 128) break varint; hi |= (buf[l$3] & 127) << 17; if (buf[l$3++] < 128) break varint; hi |= (buf[l$3] & 127) << 24; if (buf[l$3++] < 128) break varint; hi |= (buf[l$3] & 127) << 31; } return [lo >>> 0, hi >>> 0]; } function parse_shallow(buf) { var out = [], ptr = { l: 0 }; while (ptr.l < buf.length) { var off = ptr.l; var num = parse_varint49(buf, ptr); var type = num & 7; num = num / 8 | 0; var data; var l$3 = ptr.l; switch (type) { case 0: { while (buf[l$3++] >= 128); data = buf[subarray](ptr.l, l$3); ptr.l = l$3; } break; case 1: { data = buf[subarray](l$3, l$3 + 8); ptr.l = l$3 + 8; } break; case 2: { var len = parse_varint49(buf, ptr); data = buf[subarray](ptr.l, ptr.l + len); ptr.l += len; } break; case 5: { data = buf[subarray](l$3, l$3 + 4); ptr.l = l$3 + 4; } break; default: throw new Error("PB Type ".concat(type, " for Field ").concat(num, " at offset ").concat(off)); } var v$3 = { data, type }; if (out[num] == null) out[num] = []; out[num].push(v$3); } return out; } function write_shallow(proto) { var out = []; proto.forEach(function(field, idx) { if (idx == 0) return; field.forEach(function(item) { if (!item.data) return; out.push(write_varint49(idx * 8 + item.type)); if (item.type == 2) out.push(write_varint49(item.data.length)); out.push(item.data); }); }); return u8concat(out); } function mappa(data, cb) { return (data == null ? void 0 : data.map(function(d$5) { return cb(d$5.data); })) || []; } function parse_iwa_file(buf) { var _a; var out = [], ptr = { l: 0 }; while (ptr.l < buf.length) { var len = parse_varint49(buf, ptr); var ai = parse_shallow(buf[subarray](ptr.l, ptr.l + len)); ptr.l += len; var res = { id: varint_to_i32(ai[1][0].data), messages: [] }; ai[2].forEach(function(b$3) { var mi = parse_shallow(b$3.data); var fl = varint_to_i32(mi[3][0].data); res.messages.push({ meta: mi, data: buf[subarray](ptr.l, ptr.l + fl) }); ptr.l += fl; }); if ((_a = ai[3]) == null ? void 0 : _a[0]) res.merge = varint_to_i32(ai[3][0].data) >>> 0 > 0; out.push(res); } return out; } function write_iwa_file(ias) { var bufs = []; ias.forEach(function(ia) { var ai = [ [], [{ data: write_varint49(ia.id), type: 0 }], [] ]; if (ia.merge != null) ai[3] = [{ data: write_varint49(+!!ia.merge), type: 0 }]; var midata = []; ia.messages.forEach(function(mi) { midata.push(mi.data); mi.meta[3] = [{ type: 0, data: write_varint49(mi.data.length) }]; ai[2].push({ data: write_shallow(mi.meta), type: 2 }); }); var aipayload = write_shallow(ai); bufs.push(write_varint49(aipayload.length)); bufs.push(aipayload); midata.forEach(function(mid) { return bufs.push(mid); }); }); return u8concat(bufs); } function parse_snappy_chunk(type, buf) { if (type != 0) throw new Error("Unexpected Snappy chunk type ".concat(type)); var ptr = { l: 0 }; var usz = parse_varint49(buf, ptr); var chunks = []; var l$3 = ptr.l; while (l$3 < buf.length) { var tag = buf[l$3] & 3; if (tag == 0) { var len = buf[l$3++] >> 2; if (len < 60) ++len; else { var c$7 = len - 59; len = buf[l$3]; if (c$7 > 1) len |= buf[l$3 + 1] << 8; if (c$7 > 2) len |= buf[l$3 + 2] << 16; if (c$7 > 3) len |= buf[l$3 + 3] << 24; len >>>= 0; len++; l$3 += c$7; } chunks.push(buf[subarray](l$3, l$3 + len)); l$3 += len; continue; } else { var offset = 0, length = 0; if (tag == 1) { length = (buf[l$3] >> 2 & 7) + 4; offset = (buf[l$3++] & 224) << 3; offset |= buf[l$3++]; } else { length = (buf[l$3++] >> 2) + 1; if (tag == 2) { offset = buf[l$3] | buf[l$3 + 1] << 8; l$3 += 2; } else { offset = (buf[l$3] | buf[l$3 + 1] << 8 | buf[l$3 + 2] << 16 | buf[l$3 + 3] << 24) >>> 0; l$3 += 4; } } if (offset == 0) throw new Error("Invalid offset 0"); var j$2 = chunks.length - 1, off = offset; while (j$2 >= 0 && off >= chunks[j$2].length) { off -= chunks[j$2].length; --j$2; } if (j$2 < 0) { if (off == 0) off = chunks[j$2 = 0].length; else throw new Error("Invalid offset beyond length"); } if (length < off) chunks.push(chunks[j$2][subarray](chunks[j$2].length - off, chunks[j$2].length - off + length)); else { if (off > 0) { chunks.push(chunks[j$2][subarray](chunks[j$2].length - off)); length -= off; } ++j$2; while (length >= chunks[j$2].length) { chunks.push(chunks[j$2]); length -= chunks[j$2].length; ++j$2; } if (length) chunks.push(chunks[j$2][subarray](0, length)); } if (chunks.length > 25) chunks = [u8concat(chunks)]; } } var clen = 0; for (var u8i = 0; u8i < chunks.length; ++u8i) clen += chunks[u8i].length; if (clen != usz) throw new Error("Unexpected length: ".concat(clen, " != ").concat(usz)); return chunks; } function decompress_iwa_file(buf) { if (Array.isArray(buf)) buf = new Uint8Array(buf); var out = []; var l$3 = 0; while (l$3 < buf.length) { var t$6 = buf[l$3++]; var len = buf[l$3] | buf[l$3 + 1] << 8 | buf[l$3 + 2] << 16; l$3 += 3; out.push.apply(out, parse_snappy_chunk(t$6, buf[subarray](l$3, l$3 + len))); l$3 += len; } if (l$3 !== buf.length) throw new Error("data is not a valid framed stream!"); return out.length == 1 ? out[0] : u8concat(out); } function compress_iwa_file(buf) { var out = []; var l$3 = 0; while (l$3 < buf.length) { var c$7 = Math.min(buf.length - l$3, 268435455); var frame = new Uint8Array(4); out.push(frame); var usz = write_varint49(c$7); var L$2 = usz.length; out.push(usz); if (c$7 <= 60) { L$2++; out.push(new Uint8Array([c$7 - 1 << 2])); } else if (c$7 <= 256) { L$2 += 2; out.push(new Uint8Array([240, c$7 - 1 & 255])); } else if (c$7 <= 65536) { L$2 += 3; out.push(new Uint8Array([ 244, c$7 - 1 & 255, c$7 - 1 >> 8 & 255 ])); } else if (c$7 <= 16777216) { L$2 += 4; out.push(new Uint8Array([ 248, c$7 - 1 & 255, c$7 - 1 >> 8 & 255, c$7 - 1 >> 16 & 255 ])); } else if (c$7 <= 4294967296) { L$2 += 5; out.push(new Uint8Array([ 252, c$7 - 1 & 255, c$7 - 1 >> 8 & 255, c$7 - 1 >> 16 & 255, c$7 - 1 >>> 24 & 255 ])); } out.push(buf[subarray](l$3, l$3 + c$7)); L$2 += c$7; frame[0] = 0; frame[1] = L$2 & 255; frame[2] = L$2 >> 8 & 255; frame[3] = L$2 >> 16 & 255; l$3 += c$7; } return u8concat(out); } function numbers_format_cell(cell, t$6, flags, ofmt, nfmt) { var _a, _b, _c, _d; var ctype = t$6 & 255, ver = t$6 >> 8; var fmt = ver >= 5 ? nfmt : ofmt; dur: if (flags & (ver > 4 ? 8 : 4) && cell.t == "n" && ctype == 7) { var dstyle = ((_a = fmt[7]) == null ? void 0 : _a[0]) ? varint_to_i32(fmt[7][0].data) : -1; if (dstyle == -1) break dur; var dmin = ((_b = fmt[15]) == null ? void 0 : _b[0]) ? varint_to_i32(fmt[15][0].data) : -1; var dmax = ((_c = fmt[16]) == null ? void 0 : _c[0]) ? varint_to_i32(fmt[16][0].data) : -1; var auto = ((_d = fmt[40]) == null ? void 0 : _d[0]) ? varint_to_i32(fmt[40][0].data) : -1; var d$5 = cell.v, dd = d$5; autodur: if (auto) { if (d$5 == 0) { dmin = dmax = 2; break autodur; } if (d$5 >= 604800) dmin = 1; else if (d$5 >= 86400) dmin = 2; else if (d$5 >= 3600) dmin = 4; else if (d$5 >= 60) dmin = 8; else if (d$5 >= 1) dmin = 16; else dmin = 32; if (Math.floor(d$5) != d$5) dmax = 32; else if (d$5 % 60) dmax = 16; else if (d$5 % 3600) dmax = 8; else if (d$5 % 86400) dmax = 4; else if (d$5 % 604800) dmax = 2; if (dmax < dmin) dmax = dmin; } if (dmin == -1 || dmax == -1) break dur; var dstr = [], zstr = []; if (dmin == 1) { dd = d$5 / 604800; if (dmax == 1) { zstr.push("d\"d\""); } else { dd |= 0; d$5 -= 604800 * dd; } dstr.push(dd + (dstyle == 2 ? " week" + (dd == 1 ? "" : "s") : dstyle == 1 ? "w" : "")); } if (dmin <= 2 && dmax >= 2) { dd = d$5 / 86400; if (dmax > 2) { dd |= 0; d$5 -= 86400 * dd; } zstr.push("d\"d\""); dstr.push(dd + (dstyle == 2 ? " day" + (dd == 1 ? "" : "s") : dstyle == 1 ? "d" : "")); } if (dmin <= 4 && dmax >= 4) { dd = d$5 / 3600; if (dmax > 4) { dd |= 0; d$5 -= 3600 * dd; } zstr.push((dmin >= 4 ? "[h]" : "h") + "\"h\""); dstr.push(dd + (dstyle == 2 ? " hour" + (dd == 1 ? "" : "s") : dstyle == 1 ? "h" : "")); } if (dmin <= 8 && dmax >= 8) { dd = d$5 / 60; if (dmax > 8) { dd |= 0; d$5 -= 60 * dd; } zstr.push((dmin >= 8 ? "[m]" : "m") + "\"m\""); if (dstyle == 0) dstr.push((dmin == 8 && dmax == 8 || dd >= 10 ? "" : "0") + dd); else dstr.push(dd + (dstyle == 2 ? " minute" + (dd == 1 ? "" : "s") : dstyle == 1 ? "m" : "")); } if (dmin <= 16 && dmax >= 16) { dd = d$5; if (dmax > 16) { dd |= 0; d$5 -= dd; } zstr.push((dmin >= 16 ? "[s]" : "s") + "\"s\""); if (dstyle == 0) dstr.push((dmax == 16 && dmin == 16 || dd >= 10 ? "" : "0") + dd); else dstr.push(dd + (dstyle == 2 ? " second" + (dd == 1 ? "" : "s") : dstyle == 1 ? "s" : "")); } if (dmax >= 32) { dd = Math.round(1e3 * d$5); if (dmin < 32) zstr.push(".000\"ms\""); if (dstyle == 0) dstr.push((dd >= 100 ? "" : dd >= 10 ? "0" : "00") + dd); else dstr.push(dd + (dstyle == 2 ? " millisecond" + (dd == 1 ? "" : "s") : dstyle == 1 ? "ms" : "")); } cell.w = dstr.join(dstyle == 0 ? ":" : " "); cell.z = zstr.join(dstyle == 0 ? "\":\"" : " "); if (dstyle == 0) cell.w = cell.w.replace(/:(\d\d\d)$/, ".$1"); } } function parse_old_storage(buf, lut, v$3, opts) { var dv = u8_to_dataview(buf); var flags = dv.getUint32(4, true); var ridx = -1, sidx = -1, zidx = -1, ieee = NaN, dc = 0, dt = new Date(Date.UTC(2001, 0, 1)); var doff = v$3 > 1 ? 12 : 8; if (flags & 2) { zidx = dv.getUint32(doff, true); doff += 4; } doff += popcnt(flags & (v$3 > 1 ? 3468 : 396)) * 4; if (flags & 512) { ridx = dv.getUint32(doff, true); doff += 4; } doff += popcnt(flags & (v$3 > 1 ? 12288 : 4096)) * 4; if (flags & 16) { sidx = dv.getUint32(doff, true); doff += 4; } if (flags & 32) { ieee = dv.getFloat64(doff, true); doff += 8; } if (flags & 64) { dt.setTime(dt.getTime() + (dc = dv.getFloat64(doff, true)) * 1e3); doff += 8; } if (v$3 > 1) { flags = dv.getUint32(8, true) >>> 16; if (flags & 255) { if (zidx == -1) zidx = dv.getUint32(doff, true); doff += 4; } } var ret; var t$6 = buf[v$3 >= 4 ? 1 : 2]; switch (t$6) { case 0: return void 0; case 2: ret = { t: "n", v: ieee }; break; case 3: ret = { t: "s", v: lut.sst[sidx] }; break; case 5: { if (opts == null ? void 0 : opts.cellDates) ret = { t: "d", v: dt }; else ret = { t: "n", v: dc / 86400 + 35430, z: table_fmt[14] }; } break; case 6: ret = { t: "b", v: ieee > 0 }; break; case 7: ret = { t: "n", v: ieee }; break; case 8: ret = { t: "e", v: 0 }; break; case 9: { if (ridx > -1) { var rts = lut.rsst[ridx]; ret = { t: "s", v: rts.v }; if (rts.l) ret.l = { Target: rts.l }; } else throw new Error("Unsupported cell type ".concat(buf[subarray](0, 4))); } break; default: throw new Error("Unsupported cell type ".concat(buf[subarray](0, 4))); } if (zidx > -1) numbers_format_cell(ret, t$6 | v$3 << 8, flags, lut.ofmt[zidx], lut.nfmt[zidx]); if (t$6 == 7) ret.v /= 86400; return ret; } function parse_new_storage(buf, lut, opts) { var dv = u8_to_dataview(buf); var flags = dv.getUint32(4, true); var fields = dv.getUint32(8, true); var doff = 12; var ridx = -1, sidx = -1, zidx = -1, d128 = NaN, ieee = NaN, dc = 0, dt = new Date(Date.UTC(2001, 0, 1)), eidx = -1, fidx = -1; if (fields & 1) { d128 = readDecimal128LE(buf, doff); doff += 16; } if (fields & 2) { ieee = dv.getFloat64(doff, true); doff += 8; } if (fields & 4) { dt.setTime(dt.getTime() + (dc = dv.getFloat64(doff, true)) * 1e3); doff += 8; } if (fields & 8) { sidx = dv.getUint32(doff, true); doff += 4; } if (fields & 16) { ridx = dv.getUint32(doff, true); doff += 4; } doff += popcnt(fields & 480) * 4; if (fields & 512) { fidx = dv.getUint32(doff, true); doff += 4; } doff += popcnt(fields & 1024) * 4; if (fields & 2048) { eidx = dv.getUint32(doff, true); doff += 4; } var ret; var t$6 = buf[1]; switch (t$6) { case 0: ret = { t: "z" }; break; case 2: ret = { t: "n", v: d128 }; break; case 3: ret = { t: "s", v: lut.sst[sidx] }; break; case 5: { if (opts == null ? void 0 : opts.cellDates) ret = { t: "d", v: dt }; else ret = { t: "n", v: dc / 86400 + 35430, z: table_fmt[14] }; } break; case 6: ret = { t: "b", v: ieee > 0 }; break; case 7: ret = { t: "n", v: ieee }; break; case 8: ret = { t: "e", v: 0 }; break; case 9: { if (ridx > -1) { var rts = lut.rsst[ridx]; ret = { t: "s", v: rts.v }; if (rts.l) ret.l = { Target: rts.l }; } else throw new Error("Unsupported cell type ".concat(buf[1], " : ").concat(fields & 31, " : ").concat(buf[subarray](0, 4))); } break; case 10: ret = { t: "n", v: d128 }; break; default: throw new Error("Unsupported cell type ".concat(buf[1], " : ").concat(fields & 31, " : ").concat(buf[subarray](0, 4))); } doff += popcnt(fields & 4096) * 4; if (fields & 516096) { if (zidx == -1) zidx = dv.getUint32(doff, true); doff += 4; } if (fields & 524288) { var cmntidx = dv.getUint32(doff, true); doff += 4; if (lut.cmnt[cmntidx]) ret.c = iwa_to_s5s_comment(lut.cmnt[cmntidx]); } if (zidx > -1) numbers_format_cell(ret, t$6 | 5 << 8, fields >> 13, lut.ofmt[zidx], lut.nfmt[zidx]); if (t$6 == 7) ret.v /= 86400; return ret; } function write_new_storage(cell, lut) { var out = new Uint8Array(32), dv = u8_to_dataview(out), l$3 = 12, fields = 0; out[0] = 5; switch (cell.t) { case "n": if (cell.z && fmt_is_date(cell.z)) { out[1] = 5; dv.setFloat64(l$3, (numdate(cell.v + 1462).getTime() - Date.UTC(2001, 0, 1)) / 1e3, true); fields |= 4; l$3 += 8; break; } else { out[1] = 2; writeDecimal128LE(out, l$3, cell.v); fields |= 1; l$3 += 16; } break; case "b": out[1] = 6; dv.setFloat64(l$3, cell.v ? 1 : 0, true); fields |= 2; l$3 += 8; break; case "s": { var s$5 = cell.v == null ? "" : String(cell.v); if (cell.l) { var irsst = lut.rsst.findIndex(function(v$3) { var _a; return v$3.v == s$5 && v$3.l == ((_a = cell.l) == null ? void 0 : _a.Target); }); if (irsst == -1) lut.rsst[irsst = lut.rsst.length] = { v: s$5, l: cell.l.Target }; out[1] = 9; dv.setUint32(l$3, irsst, true); fields |= 16; l$3 += 4; } else { var isst = lut.sst.indexOf(s$5); if (isst == -1) lut.sst[isst = lut.sst.length] = s$5; out[1] = 3; dv.setUint32(l$3, isst, true); fields |= 8; l$3 += 4; } } break; case "d": out[1] = 5; dv.setFloat64(l$3, (cell.v.getTime() - Date.UTC(2001, 0, 1)) / 1e3, true); fields |= 4; l$3 += 8; break; case "z": out[1] = 0; break; default: throw "unsupported cell type " + cell.t; } if (cell.c) { lut.cmnt.push(s5s_to_iwa_comment(cell.c)); dv.setUint32(l$3, lut.cmnt.length - 1, true); fields |= 524288; l$3 += 4; } dv.setUint32(8, fields, true); return out[subarray](0, l$3); } function write_old_storage(cell, lut) { var out = new Uint8Array(32), dv = u8_to_dataview(out), l$3 = 12, fields = 0, s$5 = ""; out[0] = 4; switch (cell.t) { case "n": break; case "b": break; case "s": { s$5 = cell.v == null ? "" : String(cell.v); if (cell.l) { var irsst = lut.rsst.findIndex(function(v$3) { var _a; return v$3.v == s$5 && v$3.l == ((_a = cell.l) == null ? void 0 : _a.Target); }); if (irsst == -1) lut.rsst[irsst = lut.rsst.length] = { v: s$5, l: cell.l.Target }; out[1] = 9; dv.setUint32(l$3, irsst, true); fields |= 512; l$3 += 4; } else {} } break; case "d": break; case "e": break; case "z": break; default: throw "unsupported cell type " + cell.t; } if (cell.c) { dv.setUint32(l$3, lut.cmnt.length - 1, true); fields |= 4096; l$3 += 4; } switch (cell.t) { case "n": out[1] = 2; dv.setFloat64(l$3, cell.v, true); fields |= 32; l$3 += 8; break; case "b": out[1] = 6; dv.setFloat64(l$3, cell.v ? 1 : 0, true); fields |= 32; l$3 += 8; break; case "s": { s$5 = cell.v == null ? "" : String(cell.v); if (cell.l) {} else { var isst = lut.sst.indexOf(s$5); if (isst == -1) lut.sst[isst = lut.sst.length] = s$5; out[1] = 3; dv.setUint32(l$3, isst, true); fields |= 16; l$3 += 4; } } break; case "d": out[1] = 5; dv.setFloat64(l$3, (cell.v.getTime() - Date.UTC(2001, 0, 1)) / 1e3, true); fields |= 64; l$3 += 8; break; case "z": out[1] = 0; break; default: throw "unsupported cell type " + cell.t; } dv.setUint32(8, fields, true); return out[subarray](0, l$3); } function parse_cell_storage(buf, lut, opts) { switch (buf[0]) { case 0: case 1: case 2: case 3: case 4: return parse_old_storage(buf, lut, buf[0], opts); case 5: return parse_new_storage(buf, lut, opts); default: throw new Error("Unsupported payload version ".concat(buf[0])); } } function parse_TSP_Reference(buf) { var pb = parse_shallow(buf); return varint_to_i32(pb[1][0].data); } function write_TSP_Reference(idx) { return write_shallow([[], [{ type: 0, data: write_varint49(idx) }]]); } function numbers_add_oref(iwa, ref) { var _a; var orefs = ((_a = iwa.messages[0].meta[5]) == null ? void 0 : _a[0]) ? parse_packed_varints(iwa.messages[0].meta[5][0].data) : []; var orefidx = orefs.indexOf(ref); if (orefidx == -1) { orefs.push(ref); iwa.messages[0].meta[5] = [{ type: 2, data: write_packed_varints(orefs) }]; } } function numbers_del_oref(iwa, ref) { var _a; var orefs = ((_a = iwa.messages[0].meta[5]) == null ? void 0 : _a[0]) ? parse_packed_varints(iwa.messages[0].meta[5][0].data) : []; iwa.messages[0].meta[5] = [{ type: 2, data: write_packed_varints(orefs.filter(function(r$10) { return r$10 != ref; })) }]; } function parse_TST_TableDataList(M$3, root) { var pb = parse_shallow(root.data); var type = varint_to_i32(pb[1][0].data); var entries = pb[3]; var data = []; (entries || []).forEach(function(entry) { var _a, _b; var le$1 = parse_shallow(entry.data); if (!le$1[1]) return; var key = varint_to_i32(le$1[1][0].data) >>> 0; switch (type) { case 1: data[key] = u8str(le$1[3][0].data); break; case 8: { var rt = M$3[parse_TSP_Reference(le$1[9][0].data)][0]; var rtp = parse_shallow(rt.data); var rtpref = M$3[parse_TSP_Reference(rtp[1][0].data)][0]; var mtype = varint_to_i32(rtpref.meta[1][0].data); if (mtype != 2001) throw new Error("2000 unexpected reference to ".concat(mtype)); var tswpsa = parse_shallow(rtpref.data); var richtext = { v: tswpsa[3].map(function(x$2) { return u8str(x$2.data); }).join("") }; data[key] = richtext; sfields: if ((_a = tswpsa == null ? void 0 : tswpsa[11]) == null ? void 0 : _a[0]) { var smartfields = (_b = parse_shallow(tswpsa[11][0].data)) == null ? void 0 : _b[1]; if (!smartfields) break sfields; smartfields.forEach(function(sf) { var _a2, _b2, _c; var attr = parse_shallow(sf.data); if ((_a2 = attr[2]) == null ? void 0 : _a2[0]) { var obj = M$3[parse_TSP_Reference((_b2 = attr[2]) == null ? void 0 : _b2[0].data)][0]; var objtype = varint_to_i32(obj.meta[1][0].data); switch (objtype) { case 2032: var hlink = parse_shallow(obj.data); if (((_c = hlink == null ? void 0 : hlink[2]) == null ? void 0 : _c[0]) && !richtext.l) richtext.l = u8str(hlink[2][0].data); break; case 2039: break; default: console.log("unrecognized ObjectAttribute type ".concat(objtype)); } } }); } } break; case 2: data[key] = parse_shallow(le$1[6][0].data); break; case 3: data[key] = parse_shallow(le$1[5][0].data); break; case 10: { var cs = M$3[parse_TSP_Reference(le$1[10][0].data)][0]; data[key] = parse_TSD_CommentStorageArchive(M$3, cs.data); } break; default: throw type; } }); return data; } function parse_TST_TileRowInfo(u8, type) { var _a, _b, _c, _d, _e$1, _f, _g, _h, _i$1, _j, _k, _l, _m, _n; var pb = parse_shallow(u8); var R$1 = varint_to_i32(pb[1][0].data) >>> 0; var cnt = varint_to_i32(pb[2][0].data) >>> 0; var wide_offsets = ((_b = (_a = pb[8]) == null ? void 0 : _a[0]) == null ? void 0 : _b.data) && varint_to_i32(pb[8][0].data) > 0 || false; var used_storage_u8, used_storage; if (((_d = (_c = pb[7]) == null ? void 0 : _c[0]) == null ? void 0 : _d.data) && type != 0) { used_storage_u8 = (_f = (_e$1 = pb[7]) == null ? void 0 : _e$1[0]) == null ? void 0 : _f.data; used_storage = (_h = (_g = pb[6]) == null ? void 0 : _g[0]) == null ? void 0 : _h.data; } else if (((_j = (_i$1 = pb[4]) == null ? void 0 : _i$1[0]) == null ? void 0 : _j.data) && type != 1) { used_storage_u8 = (_l = (_k = pb[4]) == null ? void 0 : _k[0]) == null ? void 0 : _l.data; used_storage = (_n = (_m = pb[3]) == null ? void 0 : _m[0]) == null ? void 0 : _n.data; } else throw "NUMBERS Tile missing ".concat(type, " cell storage"); var width = wide_offsets ? 4 : 1; var used_storage_offsets = u8_to_dataview(used_storage_u8); var offsets = []; for (var C$2 = 0; C$2 < used_storage_u8.length / 2; ++C$2) { var off = used_storage_offsets.getUint16(C$2 * 2, true); if (off < 65535) offsets.push([C$2, off]); } if (offsets.length != cnt) throw "Expected ".concat(cnt, " cells, found ").concat(offsets.length); var cells = []; for (C$2 = 0; C$2 < offsets.length - 1; ++C$2) cells[offsets[C$2][0]] = used_storage[subarray](offsets[C$2][1] * width, offsets[C$2 + 1][1] * width); if (offsets.length >= 1) cells[offsets[offsets.length - 1][0]] = used_storage[subarray](offsets[offsets.length - 1][1] * width); return { R: R$1, cells }; } function parse_TST_Tile(M$3, root) { var _a; var pb = parse_shallow(root.data); var storage = -1; if ((_a = pb == null ? void 0 : pb[7]) == null ? void 0 : _a[0]) { if (varint_to_i32(pb[7][0].data) >>> 0) storage = 1; else storage = 0; } var ri = mappa(pb[5], function(u8) { return parse_TST_TileRowInfo(u8, storage); }); return { nrows: varint_to_i32(pb[4][0].data) >>> 0, data: ri.reduce(function(acc, x$2) { if (!acc[x$2.R]) acc[x$2.R] = []; x$2.cells.forEach(function(cell, C$2) { if (acc[x$2.R][C$2]) throw new Error("Duplicate cell r=".concat(x$2.R, " c=").concat(C$2)); acc[x$2.R][C$2] = cell; }); return acc; }, []) }; } function parse_TSD_CommentStorageArchive(M$3, data) { var _a, _b, _c, _d, _e$1, _f, _g, _h, _i$1, _j; var out = { t: "", a: "" }; var csp$1 = parse_shallow(data); if ((_b = (_a = csp$1 == null ? void 0 : csp$1[1]) == null ? void 0 : _a[0]) == null ? void 0 : _b.data) out.t = u8str((_d = (_c = csp$1 == null ? void 0 : csp$1[1]) == null ? void 0 : _c[0]) == null ? void 0 : _d.data) || ""; if ((_f = (_e$1 = csp$1 == null ? void 0 : csp$1[3]) == null ? void 0 : _e$1[0]) == null ? void 0 : _f.data) { var as = M$3[parse_TSP_Reference((_h = (_g = csp$1 == null ? void 0 : csp$1[3]) == null ? void 0 : _g[0]) == null ? void 0 : _h.data)][0]; var asp = parse_shallow(as.data); if ((_j = (_i$1 = asp[1]) == null ? void 0 : _i$1[0]) == null ? void 0 : _j.data) out.a = u8str(asp[1][0].data); } if (csp$1 == null ? void 0 : csp$1[4]) { out.replies = []; csp$1[4].forEach(function(pi) { var cs = M$3[parse_TSP_Reference(pi.data)][0]; out.replies.push(parse_TSD_CommentStorageArchive(M$3, cs.data)); }); } return out; } function iwa_to_s5s_comment(iwa) { var out = []; out.push({ t: iwa.t || "", a: iwa.a, T: iwa.replies && iwa.replies.length > 0 }); if (iwa.replies) iwa.replies.forEach(function(reply) { out.push({ t: reply.t || "", a: reply.a, T: true }); }); return out; } function s5s_to_iwa_comment(s5s) { var out = { a: "", t: "", replies: [] }; for (var i$7 = 0; i$7 < s5s.length; ++i$7) { if (i$7 == 0) { out.a = s5s[i$7].a; out.t = s5s[i$7].t; } else { out.replies.push({ a: s5s[i$7].a, t: s5s[i$7].t }); } } return out; } function parse_TST_TableModelArchive(M$3, root, ws, opts) { var _a, _b, _c, _d, _e$1, _f, _g, _h, _i$1, _j, _k, _l, _m, _n; var pb = parse_shallow(root.data); var range = { s: { r: 0, c: 0 }, e: { r: 0, c: 0 } }; range.e.r = (varint_to_i32(pb[6][0].data) >>> 0) - 1; if (range.e.r < 0) throw new Error("Invalid row varint ".concat(pb[6][0].data)); range.e.c = (varint_to_i32(pb[7][0].data) >>> 0) - 1; if (range.e.c < 0) throw new Error("Invalid col varint ".concat(pb[7][0].data)); ws["!ref"] = encode_range(range); var dense = ws["!data"] != null, dws = ws; var store = parse_shallow(pb[4][0].data); var lut = numbers_lut_new(); if ((_a = store[4]) == null ? void 0 : _a[0]) lut.sst = parse_TST_TableDataList(M$3, M$3[parse_TSP_Reference(store[4][0].data)][0]); if ((_b = store[6]) == null ? void 0 : _b[0]) lut.fmla = parse_TST_TableDataList(M$3, M$3[parse_TSP_Reference(store[6][0].data)][0]); if ((_c = store[11]) == null ? void 0 : _c[0]) lut.ofmt = parse_TST_TableDataList(M$3, M$3[parse_TSP_Reference(store[11][0].data)][0]); if ((_d = store[12]) == null ? void 0 : _d[0]) lut.ferr = parse_TST_TableDataList(M$3, M$3[parse_TSP_Reference(store[12][0].data)][0]); if ((_e$1 = store[17]) == null ? void 0 : _e$1[0]) lut.rsst = parse_TST_TableDataList(M$3, M$3[parse_TSP_Reference(store[17][0].data)][0]); if ((_f = store[19]) == null ? void 0 : _f[0]) lut.cmnt = parse_TST_TableDataList(M$3, M$3[parse_TSP_Reference(store[19][0].data)][0]); if ((_g = store[22]) == null ? void 0 : _g[0]) lut.nfmt = parse_TST_TableDataList(M$3, M$3[parse_TSP_Reference(store[22][0].data)][0]); var tile = parse_shallow(store[3][0].data); var _R = 0; if (!((_h = store[9]) == null ? void 0 : _h[0])) throw "NUMBERS file missing row tree"; var rtt = parse_shallow(store[9][0].data)[1].map(function(p$3) { return parse_shallow(p$3.data); }); rtt.forEach(function(kv) { _R = varint_to_i32(kv[1][0].data); var tidx = varint_to_i32(kv[2][0].data); var t$6 = tile[1][tidx]; if (!t$6) throw "NUMBERS missing tile " + tidx; var tl = parse_shallow(t$6.data); var ref2 = M$3[parse_TSP_Reference(tl[2][0].data)][0]; var mtype2 = varint_to_i32(ref2.meta[1][0].data); if (mtype2 != 6002) throw new Error("6001 unexpected reference to ".concat(mtype2)); var _tile = parse_TST_Tile(M$3, ref2); _tile.data.forEach(function(row, R$1) { row.forEach(function(buf, C$2) { var res = parse_cell_storage(buf, lut, opts); if (res) { if (dense) { if (!dws["!data"][_R + R$1]) dws["!data"][_R + R$1] = []; dws["!data"][_R + R$1][C$2] = res; } else { ws[encode_col(C$2) + encode_row(_R + R$1)] = res; } } }); }); _R += _tile.nrows; }); if ((_i$1 = store[13]) == null ? void 0 : _i$1[0]) { var ref = M$3[parse_TSP_Reference(store[13][0].data)][0]; var mtype = varint_to_i32(ref.meta[1][0].data); if (mtype != 6144) throw new Error("Expected merge type 6144, found ".concat(mtype)); ws["!merges"] = (_j = parse_shallow(ref.data)) == null ? void 0 : _j[1].map(function(pi) { var merge = parse_shallow(pi.data); var origin = u8_to_dataview(parse_shallow(merge[1][0].data)[1][0].data), size = u8_to_dataview(parse_shallow(merge[2][0].data)[1][0].data); return { s: { r: origin.getUint16(0, true), c: origin.getUint16(2, true) }, e: { r: origin.getUint16(0, true) + size.getUint16(0, true) - 1, c: origin.getUint16(2, true) + size.getUint16(2, true) - 1 } }; }); } if (!((_k = ws["!merges"]) == null ? void 0 : _k.length) && ((_l = pb[47]) == null ? void 0 : _l[0])) { var merge_owner = parse_shallow(pb[47][0].data); if ((_m = merge_owner[2]) == null ? void 0 : _m[0]) { var formula_store = parse_shallow(merge_owner[2][0].data); if ((_n = formula_store[3]) == null ? void 0 : _n[0]) { ws["!merges"] = mappa(formula_store[3], function(u$4) { var _a2, _b2, _c2, _d2, _e2; var formula_pair = parse_shallow(u$4); var formula = parse_shallow(formula_pair[2][0].data); var AST_node_array = parse_shallow(formula[1][0].data); if (!((_a2 = AST_node_array[1]) == null ? void 0 : _a2[0])) return; var AST_node0 = parse_shallow(AST_node_array[1][0].data); var AST_node_type = varint_to_i32(AST_node0[1][0].data); if (AST_node_type != 67) return; var AST_colon_tract = parse_shallow(AST_node0[40][0].data); if (!((_b2 = AST_colon_tract[3]) == null ? void 0 : _b2[0]) || !((_c2 = AST_colon_tract[4]) == null ? void 0 : _c2[0])) return; var colrange = parse_shallow(AST_colon_tract[3][0].data); var rowrange = parse_shallow(AST_colon_tract[4][0].data); var c$7 = varint_to_i32(colrange[1][0].data); var C$2 = ((_d2 = colrange[2]) == null ? void 0 : _d2[0]) ? varint_to_i32(colrange[2][0].data) : c$7; var r$10 = varint_to_i32(rowrange[1][0].data); var R$1 = ((_e2 = rowrange[2]) == null ? void 0 : _e2[0]) ? varint_to_i32(rowrange[2][0].data) : r$10; return { s: { r: r$10, c: c$7 }, e: { r: R$1, c: C$2 } }; }).filter(function(x$2) { return x$2 != null; }); } } } } function parse_TST_TableInfoArchive(M$3, root, opts) { var pb = parse_shallow(root.data); var out = { "!ref": "A1" }; if (opts == null ? void 0 : opts.dense) out["!data"] = []; var tableref = M$3[parse_TSP_Reference(pb[2][0].data)]; var mtype = varint_to_i32(tableref[0].meta[1][0].data); if (mtype != 6001) throw new Error("6000 unexpected reference to ".concat(mtype)); parse_TST_TableModelArchive(M$3, tableref[0], out, opts); return out; } function parse_TN_SheetArchive(M$3, root, opts) { var _a; var pb = parse_shallow(root.data); var out = { name: ((_a = pb[1]) == null ? void 0 : _a[0]) ? u8str(pb[1][0].data) : "", sheets: [] }; var shapeoffs = mappa(pb[2], parse_TSP_Reference); shapeoffs.forEach(function(off) { M$3[off].forEach(function(m$3) { var mtype = varint_to_i32(m$3.meta[1][0].data); if (mtype == 6e3) out.sheets.push(parse_TST_TableInfoArchive(M$3, m$3, opts)); }); }); return out; } function parse_TN_DocumentArchive(M$3, root, opts) { var _a; var out = book_new(); out.Workbook = { WBProps: { date1904: true } }; var pb = parse_shallow(root.data); if ((_a = pb[2]) == null ? void 0 : _a[0]) throw new Error("Keynote presentations are not supported"); var sheetoffs = mappa(pb[1], parse_TSP_Reference); sheetoffs.forEach(function(off) { M$3[off].forEach(function(m$3) { var mtype = varint_to_i32(m$3.meta[1][0].data); if (mtype == 2) { var root2 = parse_TN_SheetArchive(M$3, m$3, opts); root2.sheets.forEach(function(sheet, idx) { book_append_sheet(out, sheet, idx == 0 ? root2.name : root2.name + "_" + idx, true); }); } }); }); if (out.SheetNames.length == 0) throw new Error("Empty NUMBERS file"); out.bookType = "numbers"; return out; } function parse_numbers_iwa(cfb, opts) { var _a, _b, _c, _d, _e$1, _f, _g; var M$3 = {}, indices = []; cfb.FullPaths.forEach(function(p$3) { if (p$3.match(/\.iwpv2/)) throw new Error("Unsupported password protection"); }); cfb.FileIndex.forEach(function(s$5) { if (!s$5.name.match(/\.iwa$/)) return; if (s$5.content[0] != 0) return; var o$10; try { o$10 = decompress_iwa_file(s$5.content); } catch (e$10) { return console.log("?? " + s$5.content.length + " " + (e$10.message || e$10)); } var packets; try { packets = parse_iwa_file(o$10); } catch (e$10) { return console.log("## " + (e$10.message || e$10)); } packets.forEach(function(packet) { M$3[packet.id] = packet.messages; indices.push(packet.id); }); }); if (!indices.length) throw new Error("File has no messages"); if (((_c = (_b = (_a = M$3 == null ? void 0 : M$3[1]) == null ? void 0 : _a[0].meta) == null ? void 0 : _b[1]) == null ? void 0 : _c[0].data) && varint_to_i32(M$3[1][0].meta[1][0].data) == 1e4) throw new Error("Pages documents are not supported"); var docroot = ((_g = (_f = (_e$1 = (_d = M$3 == null ? void 0 : M$3[1]) == null ? void 0 : _d[0]) == null ? void 0 : _e$1.meta) == null ? void 0 : _f[1]) == null ? void 0 : _g[0].data) && varint_to_i32(M$3[1][0].meta[1][0].data) == 1 && M$3[1][0]; if (!docroot) indices.forEach(function(idx) { M$3[idx].forEach(function(iwam) { var mtype = varint_to_i32(iwam.meta[1][0].data) >>> 0; if (mtype == 1) { if (!docroot) docroot = iwam; else throw new Error("Document has multiple roots"); } }); }); if (!docroot) throw new Error("Cannot find Document root"); return parse_TN_DocumentArchive(M$3, docroot, opts); } function write_TST_TileRowInfo(data, lut, wide) { var _a, _b, _c; var tri = [ [], [{ type: 0, data: write_varint49(0) }], [{ type: 0, data: write_varint49(0) }], [{ type: 2, data: new Uint8Array([]) }], [{ type: 2, data: new Uint8Array(Array.from({ length: 510 }, function() { return 255; })) }], [{ type: 0, data: write_varint49(5) }], [{ type: 2, data: new Uint8Array([]) }], [{ type: 2, data: new Uint8Array(Array.from({ length: 510 }, function() { return 255; })) }], [{ type: 0, data: write_varint49(1) }] ]; if (!((_a = tri[6]) == null ? void 0 : _a[0]) || !((_b = tri[7]) == null ? void 0 : _b[0])) throw "Mutation only works on post-BNC storages!"; var cnt = 0; if (tri[7][0].data.length < 2 * data.length) { var new_7 = new Uint8Array(2 * data.length); new_7.set(tri[7][0].data); tri[7][0].data = new_7; } if (tri[4][0].data.length < 2 * data.length) { var new_4 = new Uint8Array(2 * data.length); new_4.set(tri[4][0].data); tri[4][0].data = new_4; } var dv = u8_to_dataview(tri[7][0].data), last_offset = 0, cell_storage = []; var _dv = u8_to_dataview(tri[4][0].data), _last_offset = 0, _cell_storage = []; var width = wide ? 4 : 1; for (var C$2 = 0; C$2 < data.length; ++C$2) { if (data[C$2] == null || data[C$2].t == "z" && !((_c = data[C$2].c) == null ? void 0 : _c.length) || data[C$2].t == "e") { dv.setUint16(C$2 * 2, 65535, true); _dv.setUint16(C$2 * 2, 65535); continue; } dv.setUint16(C$2 * 2, last_offset / width, true); _dv.setUint16(C$2 * 2, _last_offset / width, true); var celload, _celload; switch (data[C$2].t) { case "d": if (data[C$2].v instanceof Date) { celload = write_new_storage(data[C$2], lut); _celload = write_old_storage(data[C$2], lut); break; } celload = write_new_storage(data[C$2], lut); _celload = write_old_storage(data[C$2], lut); break; case "s": case "n": case "b": case "z": celload = write_new_storage(data[C$2], lut); _celload = write_old_storage(data[C$2], lut); break; default: throw new Error("Unsupported value " + data[C$2]); } cell_storage.push(celload); last_offset += celload.length; { _cell_storage.push(_celload); _last_offset += _celload.length; } ++cnt; } tri[2][0].data = write_varint49(cnt); tri[5][0].data = write_varint49(5); for (; C$2 < tri[7][0].data.length / 2; ++C$2) { dv.setUint16(C$2 * 2, 65535, true); _dv.setUint16(C$2 * 2, 65535, true); } tri[6][0].data = u8concat(cell_storage); tri[3][0].data = u8concat(_cell_storage); tri[8] = [{ type: 0, data: write_varint49(wide ? 1 : 0) }]; return tri; } function write_iwam(type, payload) { return { meta: [[], [{ type: 0, data: write_varint49(type) }]], data: payload }; } function get_unique_msgid(dep, dependents) { if (!dependents.last) dependents.last = 927262; for (var i$7 = dependents.last; i$7 < 2e6; ++i$7) if (!dependents[i$7]) { dependents[dependents.last = i$7] = dep; return i$7; } throw new Error("Too many messages"); } function build_numbers_deps(cfb) { var dependents = {}; var indices = []; cfb.FileIndex.map(function(fi, idx) { return [fi, cfb.FullPaths[idx]]; }).forEach(function(row) { var fi = row[0], fp = row[1]; if (fi.type != 2) return; if (!fi.name.match(/\.iwa/)) return; if (fi.content[0] != 0) return; parse_iwa_file(decompress_iwa_file(fi.content)).forEach(function(packet) { indices.push(packet.id); dependents[packet.id] = { deps: [], location: fp, type: varint_to_i32(packet.messages[0].meta[1][0].data) }; }); }); cfb.FileIndex.forEach(function(fi) { if (!fi.name.match(/\.iwa/)) return; if (fi.content[0] != 0) return; parse_iwa_file(decompress_iwa_file(fi.content)).forEach(function(ia) { ia.messages.forEach(function(mess) { [5, 6].forEach(function(f$4) { if (!mess.meta[f$4]) return; mess.meta[f$4].forEach(function(x$2) { dependents[ia.id].deps.push(varint_to_i32(x$2.data)); }); }); }); }); }); return dependents; } function write_TSP_Color_RGB(r$10, g$1, b$3) { return write_shallow([ [], [{ type: 0, data: write_varint49(1) }], [], [{ type: 5, data: new Uint8Array(Float32Array.from([r$10 / 255]).buffer) }], [{ type: 5, data: new Uint8Array(Float32Array.from([g$1 / 255]).buffer) }], [{ type: 5, data: new Uint8Array(Float32Array.from([b$3 / 255]).buffer) }], [{ type: 5, data: new Uint8Array(Float32Array.from([1]).buffer) }], [], [], [], [], [], [{ type: 0, data: write_varint49(1) }] ]); } function get_author_color(n$9) { switch (n$9) { case 0: return write_TSP_Color_RGB(99, 222, 171); case 1: return write_TSP_Color_RGB(162, 197, 240); case 2: return write_TSP_Color_RGB(255, 189, 189); } return write_TSP_Color_RGB(Math.random() * 255, Math.random() * 255, Math.random() * 255); } function write_numbers_iwa(wb, opts) { if (!opts || !opts.numbers) throw new Error("Must pass a `numbers` option -- check the README"); var cfb = CFB.read(opts.numbers, { type: "base64" }); var deps = build_numbers_deps(cfb); var docroot = numbers_iwa_find(cfb, deps, 1); if (docroot == null) throw "Could not find message ".concat(1, " in Numbers template"); var sheetrefs = mappa(parse_shallow(docroot.messages[0].data)[1], parse_TSP_Reference); if (sheetrefs.length > 1) throw new Error("Template NUMBERS file must have exactly one sheet"); wb.SheetNames.forEach(function(name, idx) { if (idx >= 1) { numbers_add_ws(cfb, deps, idx + 1); docroot = numbers_iwa_find(cfb, deps, 1); sheetrefs = mappa(parse_shallow(docroot.messages[0].data)[1], parse_TSP_Reference); } write_numbers_ws(cfb, deps, wb.Sheets[name], name, idx, sheetrefs[idx]); }); return cfb; } function numbers_iwa_doit(cfb, deps, id, cb) { var entry = CFB.find(cfb, deps[id].location); if (!entry) throw "Could not find ".concat(deps[id].location, " in Numbers template"); var x$2 = parse_iwa_file(decompress_iwa_file(entry.content)); var ainfo = x$2.find(function(packet) { return packet.id == id; }); cb(ainfo, x$2); entry.content = compress_iwa_file(write_iwa_file(x$2)); entry.size = entry.content.length; } function numbers_iwa_find(cfb, deps, id) { var entry = CFB.find(cfb, deps[id].location); if (!entry) throw "Could not find ".concat(deps[id].location, " in Numbers template"); var x$2 = parse_iwa_file(decompress_iwa_file(entry.content)); var ainfo = x$2.find(function(packet) { return packet.id == id; }); return ainfo; } function numbers_add_meta(mlist, newid, newloc) { mlist[3].push({ type: 2, data: write_shallow([ [], [{ type: 0, data: write_varint49(newid) }], [{ type: 2, data: stru8(newloc.replace(/-[\s\S]*$/, "")) }], [{ type: 2, data: stru8(newloc) }], [{ type: 2, data: new Uint8Array([ 2, 0, 0 ]) }], [{ type: 2, data: new Uint8Array([ 2, 0, 0 ]) }], [], [], [], [], [{ type: 0, data: write_varint49(0) }], [], [{ type: 0, data: write_varint49(0) }] ]) }); mlist[1] = [{ type: 0, data: write_varint49(Math.max(newid + 1, varint_to_i32(mlist[1][0].data))) }]; } function numbers_add_msg(cfb, type, msg, path$1, deps, id) { if (!id) id = get_unique_msgid({ deps: [], location: "", type }, deps); var loc = "".concat(path$1, "-").concat(id, ".iwa"); deps[id].location = "Root Entry" + loc; CFB.utils.cfb_add(cfb, loc, compress_iwa_file(write_iwa_file([{ id, messages: [write_iwam(type, write_shallow(msg))] }]))); var newloc = loc.replace(/^[\/]/, "").replace(/^Index\//, "").replace(/\.iwa$/, ""); numbers_iwa_doit(cfb, deps, 2, function(ai) { var mlist = parse_shallow(ai.messages[0].data); numbers_add_meta(mlist, id || 0, newloc); ai.messages[0].data = write_shallow(mlist); }); return id; } function numbers_meta_add_dep(mlist, deps, id, dep) { var loc = deps[id].location.replace(/^Root Entry\//, "").replace(/^Index\//, "").replace(/\.iwa$/, ""); var parentidx = mlist[3].findIndex(function(m$3) { var _a, _b; var mm = parse_shallow(m$3.data); if ((_a = mm[3]) == null ? void 0 : _a[0]) return u8str(mm[3][0].data) == loc; if (((_b = mm[2]) == null ? void 0 : _b[0]) && u8str(mm[2][0].data) == loc) return true; return false; }); var parent = parse_shallow(mlist[3][parentidx].data); if (!parent[6]) parent[6] = []; (Array.isArray(dep) ? dep : [dep]).forEach(function(dep2) { parent[6].push({ type: 2, data: write_shallow([[], [{ type: 0, data: write_varint49(dep2) }]]) }); }); mlist[3][parentidx].data = write_shallow(parent); } function numbers_meta_del_dep(mlist, deps, id, dep) { var loc = deps[id].location.replace(/^Root Entry\//, "").replace(/^Index\//, "").replace(/\.iwa$/, ""); var parentidx = mlist[3].findIndex(function(m$3) { var _a, _b; var mm = parse_shallow(m$3.data); if ((_a = mm[3]) == null ? void 0 : _a[0]) return u8str(mm[3][0].data) == loc; if (((_b = mm[2]) == null ? void 0 : _b[0]) && u8str(mm[2][0].data) == loc) return true; return false; }); var parent = parse_shallow(mlist[3][parentidx].data); if (!parent[6]) parent[6] = []; parent[6] = parent[6].filter(function(m$3) { return varint_to_i32(parse_shallow(m$3.data)[1][0].data) != dep; }); mlist[3][parentidx].data = write_shallow(parent); } function numbers_add_ws(cfb, deps, wsidx) { var sheetref = -1, newsheetref = -1; var remap = {}; numbers_iwa_doit(cfb, deps, 1, function(docroot, arch) { var doc = parse_shallow(docroot.messages[0].data); sheetref = parse_TSP_Reference(parse_shallow(docroot.messages[0].data)[1][0].data); newsheetref = get_unique_msgid({ deps: [1], location: deps[sheetref].location, type: 2 }, deps); remap[sheetref] = newsheetref; numbers_add_oref(docroot, newsheetref); doc[1].push({ type: 2, data: write_TSP_Reference(newsheetref) }); var sheet = numbers_iwa_find(cfb, deps, sheetref); sheet.id = newsheetref; if (deps[1].location == deps[newsheetref].location) arch.push(sheet); else numbers_iwa_doit(cfb, deps, newsheetref, function(_$2, x$2) { return x$2.push(sheet); }); docroot.messages[0].data = write_shallow(doc); }); var tiaref = -1; numbers_iwa_doit(cfb, deps, newsheetref, function(sheetroot, arch) { var sa = parse_shallow(sheetroot.messages[0].data); for (var i$7 = 3; i$7 <= 69; ++i$7) delete sa[i$7]; var drawables = mappa(sa[2], parse_TSP_Reference); drawables.forEach(function(n$9) { return numbers_del_oref(sheetroot, n$9); }); tiaref = get_unique_msgid({ deps: [newsheetref], location: deps[drawables[0]].location, type: deps[drawables[0]].type }, deps); numbers_add_oref(sheetroot, tiaref); remap[drawables[0]] = tiaref; sa[2] = [{ type: 2, data: write_TSP_Reference(tiaref) }]; var tia = numbers_iwa_find(cfb, deps, drawables[0]); tia.id = tiaref; if (deps[drawables[0]].location == deps[newsheetref].location) arch.push(tia); else { numbers_iwa_doit(cfb, deps, 2, function(ai) { var mlist = parse_shallow(ai.messages[0].data); numbers_meta_add_dep(mlist, deps, newsheetref, tiaref); ai.messages[0].data = write_shallow(mlist); }); numbers_iwa_doit(cfb, deps, tiaref, function(_$2, x$2) { return x$2.push(tia); }); } sheetroot.messages[0].data = write_shallow(sa); }); var tmaref = -1; numbers_iwa_doit(cfb, deps, tiaref, function(tiaroot, arch) { var tia = parse_shallow(tiaroot.messages[0].data); var da = parse_shallow(tia[1][0].data); for (var i$7 = 3; i$7 <= 69; ++i$7) delete da[i$7]; var dap = parse_TSP_Reference(da[2][0].data); da[2][0].data = write_TSP_Reference(remap[dap]); tia[1][0].data = write_shallow(da); var oldtmaref = parse_TSP_Reference(tia[2][0].data); numbers_del_oref(tiaroot, oldtmaref); tmaref = get_unique_msgid({ deps: [tiaref], location: deps[oldtmaref].location, type: deps[oldtmaref].type }, deps); numbers_add_oref(tiaroot, tmaref); remap[oldtmaref] = tmaref; tia[2][0].data = write_TSP_Reference(tmaref); var tma = numbers_iwa_find(cfb, deps, oldtmaref); tma.id = tmaref; if (deps[tiaref].location == deps[tmaref].location) arch.push(tma); else numbers_iwa_doit(cfb, deps, tmaref, function(_$2, x$2) { return x$2.push(tma); }); tiaroot.messages[0].data = write_shallow(tia); }); numbers_iwa_doit(cfb, deps, tmaref, function(tmaroot, arch) { var _a, _b; var tma = parse_shallow(tmaroot.messages[0].data); var uuid = u8str(tma[1][0].data), new_uuid = uuid.replace(/-[A-Z0-9]*/, "-".concat(("0000" + wsidx.toString(16)).slice(-4))); tma[1][0].data = stru8(new_uuid); [ 12, 13, 29, 31, 32, 33, 39, 44, 47, 81, 82, 84 ].forEach(function(n$9) { return delete tma[n$9]; }); if (tma[45]) { var srrta = parse_shallow(tma[45][0].data); var ref = parse_TSP_Reference(srrta[1][0].data); numbers_del_oref(tmaroot, ref); delete tma[45]; } if (tma[70]) { var hsoa = parse_shallow(tma[70][0].data); (_a = hsoa[2]) == null ? void 0 : _a.forEach(function(item) { var hsa = parse_shallow(item.data); [2, 3].map(function(n$9) { return hsa[n$9][0]; }).forEach(function(hseadata) { var hsea = parse_shallow(hseadata.data); if (!hsea[8]) return; var ref2 = parse_TSP_Reference(hsea[8][0].data); numbers_del_oref(tmaroot, ref2); }); }); delete tma[70]; } [ 46, 30, 34, 35, 36, 38, 48, 49, 60, 61, 62, 63, 64, 71, 72, 73, 74, 75, 85, 86, 87, 88, 89 ].forEach(function(n$9) { if (!tma[n$9]) return; var ref2 = parse_TSP_Reference(tma[n$9][0].data); delete tma[n$9]; numbers_del_oref(tmaroot, ref2); }); var store = parse_shallow(tma[4][0].data); { [ 2, 4, 5, 6, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22 ].forEach(function(n$9) { var _a2; if (!((_a2 = store[n$9]) == null ? void 0 : _a2[0])) return; var oldref = parse_TSP_Reference(store[n$9][0].data); var newref = get_unique_msgid({ deps: [tmaref], location: deps[oldref].location, type: deps[oldref].type }, deps); numbers_del_oref(tmaroot, oldref); numbers_add_oref(tmaroot, newref); remap[oldref] = newref; var msg = numbers_iwa_find(cfb, deps, oldref); msg.id = newref; if (deps[oldref].location == deps[tmaref].location) arch.push(msg); else { deps[newref].location = deps[oldref].location.replace(oldref.toString(), newref.toString()); if (deps[newref].location == deps[oldref].location) deps[newref].location = deps[newref].location.replace(/\.iwa/, "-".concat(newref, ".iwa")); CFB.utils.cfb_add(cfb, deps[newref].location, compress_iwa_file(write_iwa_file([msg]))); var newloc = deps[newref].location.replace(/^Root Entry\//, "").replace(/^Index\//, "").replace(/\.iwa$/, ""); numbers_iwa_doit(cfb, deps, 2, function(ai) { var mlist = parse_shallow(ai.messages[0].data); numbers_add_meta(mlist, newref, newloc); numbers_meta_add_dep(mlist, deps, tmaref, newref); ai.messages[0].data = write_shallow(mlist); }); } store[n$9][0].data = write_TSP_Reference(newref); }); var row_headers = parse_shallow(store[1][0].data); { (_b = row_headers[2]) == null ? void 0 : _b.forEach(function(tspref) { var oldref = parse_TSP_Reference(tspref.data); var newref = get_unique_msgid({ deps: [tmaref], location: deps[oldref].location, type: deps[oldref].type }, deps); numbers_del_oref(tmaroot, oldref); numbers_add_oref(tmaroot, newref); remap[oldref] = newref; var msg = numbers_iwa_find(cfb, deps, oldref); msg.id = newref; if (deps[oldref].location == deps[tmaref].location) { arch.push(msg); } else { deps[newref].location = deps[oldref].location.replace(oldref.toString(), newref.toString()); if (deps[newref].location == deps[oldref].location) deps[newref].location = deps[newref].location.replace(/\.iwa/, "-".concat(newref, ".iwa")); CFB.utils.cfb_add(cfb, deps[newref].location, compress_iwa_file(write_iwa_file([msg]))); var newloc = deps[newref].location.replace(/^Root Entry\//, "").replace(/^Index\//, "").replace(/\.iwa$/, ""); numbers_iwa_doit(cfb, deps, 2, function(ai) { var mlist = parse_shallow(ai.messages[0].data); numbers_add_meta(mlist, newref, newloc); numbers_meta_add_dep(mlist, deps, tmaref, newref); ai.messages[0].data = write_shallow(mlist); }); } tspref.data = write_TSP_Reference(newref); }); } store[1][0].data = write_shallow(row_headers); var tiles = parse_shallow(store[3][0].data); { tiles[1].forEach(function(t$6) { var tst = parse_shallow(t$6.data); var oldtileref = parse_TSP_Reference(tst[2][0].data); var newtileref = remap[oldtileref]; if (!remap[oldtileref]) { newtileref = get_unique_msgid({ deps: [tmaref], location: "", type: deps[oldtileref].type }, deps); deps[newtileref].location = "Root Entry/Index/Tables/Tile-".concat(newtileref, ".iwa"); remap[oldtileref] = newtileref; var oldtile = numbers_iwa_find(cfb, deps, oldtileref); oldtile.id = newtileref; numbers_del_oref(tmaroot, oldtileref); numbers_add_oref(tmaroot, newtileref); CFB.utils.cfb_add(cfb, "/Index/Tables/Tile-".concat(newtileref, ".iwa"), compress_iwa_file(write_iwa_file([oldtile]))); numbers_iwa_doit(cfb, deps, 2, function(ai) { var mlist = parse_shallow(ai.messages[0].data); mlist[3].push({ type: 2, data: write_shallow([ [], [{ type: 0, data: write_varint49(newtileref) }], [{ type: 2, data: stru8("Tables/Tile") }], [{ type: 2, data: stru8("Tables/Tile-".concat(newtileref)) }], [{ type: 2, data: new Uint8Array([ 2, 0, 0 ]) }], [{ type: 2, data: new Uint8Array([ 2, 0, 0 ]) }], [], [], [], [], [{ type: 0, data: write_varint49(0) }], [], [{ type: 0, data: write_varint49(0) }] ]) }); mlist[1] = [{ type: 0, data: write_varint49(Math.max(newtileref + 1, varint_to_i32(mlist[1][0].data))) }]; numbers_meta_add_dep(mlist, deps, tmaref, newtileref); ai.messages[0].data = write_shallow(mlist); }); } tst[2][0].data = write_TSP_Reference(newtileref); t$6.data = write_shallow(tst); }); } store[3][0].data = write_shallow(tiles); } tma[4][0].data = write_shallow(store); tmaroot.messages[0].data = write_shallow(tma); }); } function write_numbers_ws(cfb, deps, ws, wsname, sheetidx, rootref) { var drawables = []; numbers_iwa_doit(cfb, deps, rootref, function(docroot) { var sheetref = parse_shallow(docroot.messages[0].data); { sheetref[1] = [{ type: 2, data: stru8(wsname) }]; drawables = mappa(sheetref[2], parse_TSP_Reference); } docroot.messages[0].data = write_shallow(sheetref); }); var tia = numbers_iwa_find(cfb, deps, drawables[0]); var tmaref = parse_TSP_Reference(parse_shallow(tia.messages[0].data)[2][0].data); numbers_iwa_doit(cfb, deps, tmaref, function(docroot, x$2) { return write_numbers_tma(cfb, deps, ws, docroot, x$2, tmaref); }); } function write_numbers_tma(cfb, deps, ws, tmaroot, tmafile, tmaref) { if (!ws["!ref"]) throw new Error("Cannot export empty sheet to NUMBERS"); var range = decode_range(ws["!ref"]); range.s.r = range.s.c = 0; var trunc = false; if (range.e.c > 999) { trunc = true; range.e.c = 999; } if (range.e.r > 999999) { trunc = true; range.e.r = 999999; } if (trunc) console.error("Truncating to ".concat(encode_range(range))); var data = []; if (ws["!data"]) data = ws["!data"]; else { var colstr = []; for (var _C = 0; _C <= range.e.c; ++_C) colstr[_C] = encode_col(_C); for (var R_ = 0; R_ <= range.e.r; ++R_) { data[R_] = []; var _R = "" + (R_ + 1); for (_C = 0; _C <= range.e.c; ++_C) { var _cell = ws[colstr[_C] + _R]; if (!_cell) continue; data[R_][_C] = _cell; } } } var LUT = { cmnt: [{ a: "~54ee77S~", t: "... the people who are crazy enough to think they can change the world, are the ones who do." }], ferr: [], fmla: [], nfmt: [], ofmt: [], rsst: [{ v: "~54ee77S~", l: "https://sheetjs.com/" }], sst: ["~Sh33tJ5~"] }; var pb = parse_shallow(tmaroot.messages[0].data); { pb[6][0].data = write_varint49(range.e.r + 1); pb[7][0].data = write_varint49(range.e.c + 1); delete pb[46]; var store = parse_shallow(pb[4][0].data); { var row_header_ref = parse_TSP_Reference(parse_shallow(store[1][0].data)[2][0].data); numbers_iwa_doit(cfb, deps, row_header_ref, function(rowhead, _x) { var _a; var base_bucket = parse_shallow(rowhead.messages[0].data); if ((_a = base_bucket == null ? void 0 : base_bucket[2]) == null ? void 0 : _a[0]) for (var R2 = 0; R2 < data.length; ++R2) { var _bucket = parse_shallow(base_bucket[2][0].data); _bucket[1][0].data = write_varint49(R2); _bucket[4][0].data = write_varint49(data[R2].length); base_bucket[2][R2] = { type: base_bucket[2][0].type, data: write_shallow(_bucket) }; } rowhead.messages[0].data = write_shallow(base_bucket); }); var col_header_ref = parse_TSP_Reference(store[2][0].data); numbers_iwa_doit(cfb, deps, col_header_ref, function(colhead, _x) { var base_bucket = parse_shallow(colhead.messages[0].data); for (var C$2 = 0; C$2 <= range.e.c; ++C$2) { var _bucket = parse_shallow(base_bucket[2][0].data); _bucket[1][0].data = write_varint49(C$2); _bucket[4][0].data = write_varint49(range.e.r + 1); base_bucket[2][C$2] = { type: base_bucket[2][0].type, data: write_shallow(_bucket) }; } colhead.messages[0].data = write_shallow(base_bucket); }); var rbtree = parse_shallow(store[9][0].data); rbtree[1] = []; var tilestore = parse_shallow(store[3][0].data); { var tstride = 256; tilestore[2] = [{ type: 0, data: write_varint49(tstride) }]; var tileref = parse_TSP_Reference(parse_shallow(tilestore[1][0].data)[2][0].data); var save_token = function() { var metadata = numbers_iwa_find(cfb, deps, 2); var mlist = parse_shallow(metadata.messages[0].data); var mlst = mlist[3].filter(function(m$3) { return varint_to_i32(parse_shallow(m$3.data)[1][0].data) == tileref; }); return (mlst == null ? void 0 : mlst.length) ? varint_to_i32(parse_shallow(mlst[0].data)[12][0].data) : 0; }(); { CFB.utils.cfb_del(cfb, deps[tileref].location); numbers_iwa_doit(cfb, deps, 2, function(ai) { var mlist = parse_shallow(ai.messages[0].data); mlist[3] = mlist[3].filter(function(m$3) { return varint_to_i32(parse_shallow(m$3.data)[1][0].data) != tileref; }); numbers_meta_del_dep(mlist, deps, tmaref, tileref); ai.messages[0].data = write_shallow(mlist); }); numbers_del_oref(tmaroot, tileref); } tilestore[1] = []; var ntiles = Math.ceil((range.e.r + 1) / tstride); for (var tidx = 0; tidx < ntiles; ++tidx) { var newtileid = get_unique_msgid({ deps: [], location: "", type: 6002 }, deps); deps[newtileid].location = "Root Entry/Index/Tables/Tile-".concat(newtileid, ".iwa"); var tiledata = [ [], [{ type: 0, data: write_varint49(0) }], [{ type: 0, data: write_varint49(Math.min(range.e.r + 1, (tidx + 1) * tstride)) }], [{ type: 0, data: write_varint49(0) }], [{ type: 0, data: write_varint49(Math.min((tidx + 1) * tstride, range.e.r + 1) - tidx * tstride) }], [], [{ type: 0, data: write_varint49(5) }], [{ type: 0, data: write_varint49(1) }], [{ type: 0, data: write_varint49(USE_WIDE_ROWS ? 1 : 0) }] ]; for (var R$1 = tidx * tstride; R$1 <= Math.min(range.e.r, (tidx + 1) * tstride - 1); ++R$1) { var tilerow = write_TST_TileRowInfo(data[R$1], LUT, USE_WIDE_ROWS); tilerow[1][0].data = write_varint49(R$1 - tidx * tstride); tiledata[5].push({ data: write_shallow(tilerow), type: 2 }); } tilestore[1].push({ type: 2, data: write_shallow([ [], [{ type: 0, data: write_varint49(tidx) }], [{ type: 2, data: write_TSP_Reference(newtileid) }] ]) }); var newtile = { id: newtileid, messages: [write_iwam(6002, write_shallow(tiledata))] }; var tilecontent = compress_iwa_file(write_iwa_file([newtile])); CFB.utils.cfb_add(cfb, "/Index/Tables/Tile-".concat(newtileid, ".iwa"), tilecontent); numbers_iwa_doit(cfb, deps, 2, function(ai) { var mlist = parse_shallow(ai.messages[0].data); mlist[3].push({ type: 2, data: write_shallow([ [], [{ type: 0, data: write_varint49(newtileid) }], [{ type: 2, data: stru8("Tables/Tile") }], [{ type: 2, data: stru8("Tables/Tile-".concat(newtileid)) }], [{ type: 2, data: new Uint8Array([ 2, 0, 0 ]) }], [{ type: 2, data: new Uint8Array([ 2, 0, 0 ]) }], [], [], [], [], [{ type: 0, data: write_varint49(0) }], [], [{ type: 0, data: write_varint49(save_token) }] ]) }); mlist[1] = [{ type: 0, data: write_varint49(Math.max(newtileid + 1, varint_to_i32(mlist[1][0].data))) }]; numbers_meta_add_dep(mlist, deps, tmaref, newtileid); ai.messages[0].data = write_shallow(mlist); }); numbers_add_oref(tmaroot, newtileid); rbtree[1].push({ type: 2, data: write_shallow([ [], [{ type: 0, data: write_varint49(tidx * tstride) }], [{ type: 0, data: write_varint49(tidx) }] ]) }); } } store[3][0].data = write_shallow(tilestore); store[9][0].data = write_shallow(rbtree); store[10] = [{ type: 2, data: new Uint8Array([]) }]; if (ws["!merges"]) { var mergeid = get_unique_msgid({ type: 6144, deps: [tmaref], location: deps[tmaref].location }, deps); tmafile.push({ id: mergeid, messages: [write_iwam(6144, write_shallow([[], ws["!merges"].map(function(m$3) { return { type: 2, data: write_shallow([ [], [{ type: 2, data: write_shallow([[], [{ type: 5, data: new Uint8Array(new Uint16Array([m$3.s.r, m$3.s.c]).buffer) }]]) }], [{ type: 2, data: write_shallow([[], [{ type: 5, data: new Uint8Array(new Uint16Array([m$3.e.r - m$3.s.r + 1, m$3.e.c - m$3.s.c + 1]).buffer) }]]) }] ]) }; })]))] }); store[13] = [{ type: 2, data: write_TSP_Reference(mergeid) }]; numbers_iwa_doit(cfb, deps, 2, function(ai) { var mlist = parse_shallow(ai.messages[0].data); numbers_meta_add_dep(mlist, deps, tmaref, mergeid); ai.messages[0].data = write_shallow(mlist); }); numbers_add_oref(tmaroot, mergeid); } else delete store[13]; var sstref = parse_TSP_Reference(store[4][0].data); numbers_iwa_doit(cfb, deps, sstref, function(sstroot) { var sstdata = parse_shallow(sstroot.messages[0].data); { sstdata[3] = []; LUT.sst.forEach(function(str, i$7) { if (i$7 == 0) return; sstdata[3].push({ type: 2, data: write_shallow([ [], [{ type: 0, data: write_varint49(i$7) }], [{ type: 0, data: write_varint49(1) }], [{ type: 2, data: stru8(str) }] ]) }); }); } sstroot.messages[0].data = write_shallow(sstdata); }); var rsstref = parse_TSP_Reference(store[17][0].data); numbers_iwa_doit(cfb, deps, rsstref, function(rsstroot) { var rsstdata = parse_shallow(rsstroot.messages[0].data); rsstdata[3] = []; var style_indices = [ 904980, 903835, 903815, 903845 ]; LUT.rsst.forEach(function(rsst, i$7) { if (i$7 == 0) return; var tswpsa = [ [], [{ type: 0, data: new Uint8Array([5]) }], [], [{ type: 2, data: stru8(rsst.v) }] ]; tswpsa[10] = [{ type: 0, data: new Uint8Array([1]) }]; tswpsa[19] = [{ type: 2, data: new Uint8Array([ 10, 6, 8, 0, 18, 2, 101, 110 ]) }]; tswpsa[5] = [{ type: 2, data: new Uint8Array([ 10, 8, 8, 0, 18, 4, 8, 155, 149, 55 ]) }]; tswpsa[2] = [{ type: 2, data: new Uint8Array([ 8, 148, 158, 55 ]) }]; tswpsa[6] = [{ type: 2, data: new Uint8Array([ 10, 6, 8, 0, 16, 0, 24, 0 ]) }]; tswpsa[7] = [{ type: 2, data: new Uint8Array([ 10, 8, 8, 0, 18, 4, 8, 135, 149, 55 ]) }]; tswpsa[8] = [{ type: 2, data: new Uint8Array([ 10, 8, 8, 0, 18, 4, 8, 165, 149, 55 ]) }]; tswpsa[14] = [{ type: 2, data: new Uint8Array([ 10, 6, 8, 0, 16, 0, 24, 0 ]) }]; tswpsa[24] = [{ type: 2, data: new Uint8Array([ 10, 6, 8, 0, 16, 0, 24, 0 ]) }]; var tswpsaid = get_unique_msgid({ deps: [], location: "", type: 2001 }, deps); var tswpsarefs = []; if (rsst.l) { var newhlinkid = numbers_add_msg(cfb, 2032, [ [], [], [{ type: 2, data: stru8(rsst.l) }] ], "/Index/Tables/DataList", deps); tswpsa[11] = []; var smartfield = [[], []]; if (!smartfield[1]) smartfield[1] = []; smartfield[1].push({ type: 2, data: write_shallow([ [], [{ type: 0, data: write_varint49(0) }], [{ type: 2, data: write_TSP_Reference(newhlinkid) }] ]) }); tswpsa[11][0] = { type: 2, data: write_shallow(smartfield) }; tswpsarefs.push(newhlinkid); } numbers_add_msg(cfb, 2001, tswpsa, "/Index/Tables/DataList", deps, tswpsaid); numbers_iwa_doit(cfb, deps, tswpsaid, function(iwa) { style_indices.forEach(function(ref) { return numbers_add_oref(iwa, ref); }); tswpsarefs.forEach(function(ref) { return numbers_add_oref(iwa, ref); }); }); var rtpaid = numbers_add_msg(cfb, 6218, [ [], [{ type: 2, data: write_TSP_Reference(tswpsaid) }], [], [{ type: 2, data: new Uint8Array([ 13, 255, 255, 255, 0, 18, 10, 16, 255, 255, 1, 24, 255, 255, 255, 255, 7 ]) }] ], "/Index/Tables/DataList", deps); numbers_iwa_doit(cfb, deps, rtpaid, function(iwa) { return numbers_add_oref(iwa, tswpsaid); }); rsstdata[3].push({ type: 2, data: write_shallow([ [], [{ type: 0, data: write_varint49(i$7) }], [{ type: 0, data: write_varint49(1) }], [], [], [], [], [], [], [{ type: 2, data: write_TSP_Reference(rtpaid) }] ]) }); numbers_add_oref(rsstroot, rtpaid); numbers_iwa_doit(cfb, deps, 2, function(ai) { var mlist = parse_shallow(ai.messages[0].data); numbers_meta_add_dep(mlist, deps, rsstref, rtpaid); numbers_meta_add_dep(mlist, deps, rtpaid, tswpsaid); numbers_meta_add_dep(mlist, deps, tswpsaid, tswpsarefs); numbers_meta_add_dep(mlist, deps, tswpsaid, style_indices); ai.messages[0].data = write_shallow(mlist); }); }); rsstroot.messages[0].data = write_shallow(rsstdata); }); if (LUT.cmnt.length > 1) { var cmntref = parse_TSP_Reference(store[19][0].data); var authors = {}, iauthor = 0; numbers_iwa_doit(cfb, deps, cmntref, function(cmntroot) { var cmntdata = parse_shallow(cmntroot.messages[0].data); { cmntdata[3] = []; LUT.cmnt.forEach(function(cc, i$7) { if (i$7 == 0) return; var replies = []; if (cc.replies) cc.replies.forEach(function(c$7) { if (!authors[c$7.a || ""]) authors[c$7.a || ""] = numbers_add_msg(cfb, 212, [ [], [{ type: 2, data: stru8(c$7.a || "") }], [{ type: 2, data: get_author_color(++iauthor) }], [], [{ type: 0, data: write_varint49(0) }] ], "/Index/Tables/DataList", deps); var aaaid2 = authors[c$7.a || ""]; var csaid2 = numbers_add_msg(cfb, 3056, [ [], [{ type: 2, data: stru8(c$7.t || "") }], [{ type: 2, data: write_shallow([[], [{ type: 1, data: new Uint8Array([ 0, 0, 0, 128, 116, 109, 182, 65 ]) }]]) }], [{ type: 2, data: write_TSP_Reference(aaaid2) }] ], "/Index/Tables/DataList", deps); numbers_iwa_doit(cfb, deps, csaid2, function(iwa) { return numbers_add_oref(iwa, aaaid2); }); replies.push(csaid2); numbers_iwa_doit(cfb, deps, 2, function(ai) { var mlist = parse_shallow(ai.messages[0].data); numbers_meta_add_dep(mlist, deps, csaid2, aaaid2); ai.messages[0].data = write_shallow(mlist); }); }); if (!authors[cc.a || ""]) authors[cc.a || ""] = numbers_add_msg(cfb, 212, [ [], [{ type: 2, data: stru8(cc.a || "") }], [{ type: 2, data: get_author_color(++iauthor) }], [], [{ type: 0, data: write_varint49(0) }] ], "/Index/Tables/DataList", deps); var aaaid = authors[cc.a || ""]; var csaid = numbers_add_msg(cfb, 3056, [ [], [{ type: 2, data: stru8(cc.t || "") }], [{ type: 2, data: write_shallow([[], [{ type: 1, data: new Uint8Array([ 0, 0, 0, 128, 116, 109, 182, 65 ]) }]]) }], [{ type: 2, data: write_TSP_Reference(aaaid) }], replies.map(function(r$10) { return { type: 2, data: write_TSP_Reference(r$10) }; }), [{ type: 2, data: write_shallow([ [], [{ type: 0, data: write_varint49(i$7) }], [{ type: 0, data: write_varint49(0) }] ]) }] ], "/Index/Tables/DataList", deps); numbers_iwa_doit(cfb, deps, csaid, function(iwa) { numbers_add_oref(iwa, aaaid); replies.forEach(function(r$10) { return numbers_add_oref(iwa, r$10); }); }); cmntdata[3].push({ type: 2, data: write_shallow([ [], [{ type: 0, data: write_varint49(i$7) }], [{ type: 0, data: write_varint49(1) }], [], [], [], [], [], [], [], [{ type: 2, data: write_TSP_Reference(csaid) }] ]) }); numbers_add_oref(cmntroot, csaid); numbers_iwa_doit(cfb, deps, 2, function(ai) { var mlist = parse_shallow(ai.messages[0].data); numbers_meta_add_dep(mlist, deps, cmntref, csaid); numbers_meta_add_dep(mlist, deps, csaid, aaaid); if (replies.length) numbers_meta_add_dep(mlist, deps, csaid, replies); ai.messages[0].data = write_shallow(mlist); }); }); } cmntdata[2][0].data = write_varint49(LUT.cmnt.length + 1); cmntroot.messages[0].data = write_shallow(cmntdata); }); } } pb[4][0].data = write_shallow(store); } tmaroot.messages[0].data = write_shallow(pb); } function fix_opts_func(defaults) { return function fix_opts(opts) { for (var i$7 = 0; i$7 != defaults.length; ++i$7) { var d$5 = defaults[i$7]; if (opts[d$5[0]] === undefined) opts[d$5[0]] = d$5[1]; if (d$5[2] === "n") opts[d$5[0]] = Number(opts[d$5[0]]); } }; } function fix_read_opts(opts) { fix_opts_func([ ["cellNF", false], ["cellHTML", true], ["cellFormula", true], ["cellStyles", false], ["cellText", true], ["cellDates", false], ["sheetStubs", false], [ "sheetRows", 0, "n" ], ["bookDeps", false], ["bookSheets", false], ["bookProps", false], ["bookFiles", false], ["bookVBA", false], ["password", ""], ["WTF", false] ])(opts); } function fix_write_opts(opts) { fix_opts_func([ ["cellDates", false], ["bookSST", false], ["bookType", "xlsx"], ["compression", false], ["WTF", false] ])(opts); } function get_sheet_type(n$9) { if (RELS.WS.indexOf(n$9) > -1) return "sheet"; if (RELS.CS && n$9 == RELS.CS) return "chart"; if (RELS.DS && n$9 == RELS.DS) return "dialog"; if (RELS.MS && n$9 == RELS.MS) return "macro"; return n$9 && n$9.length ? n$9 : "sheet"; } function safe_parse_wbrels(wbrels, sheets) { if (!wbrels) return 0; try { wbrels = sheets.map(function pwbr(w$2) { if (!w$2.id) w$2.id = w$2.strRelID; return [ w$2.name, wbrels["!id"][w$2.id].Target, get_sheet_type(wbrels["!id"][w$2.id].Type) ]; }); } catch (e$10) { return null; } return !wbrels || wbrels.length === 0 ? null : wbrels; } function parse_sheet_legacy_drawing(sheet, type, zip, path$1, idx, opts, wb, comments) { if (!sheet || !sheet["!legdrawel"]) return; var dfile = resolve_path(sheet["!legdrawel"].Target, path$1); var draw = getzipstr(zip, dfile, true); if (draw) parse_vml(utf8read(draw), sheet, comments || []); } function safe_parse_sheet(zip, path$1, relsPath, sheet, idx, sheetRels, sheets, stype, opts, wb, themes, styles$1) { try { sheetRels[sheet] = parse_rels(getzipstr(zip, relsPath, true), path$1); var data = getzipdata(zip, path$1); var _ws; switch (stype) { case "sheet": _ws = parse_ws(data, path$1, idx, opts, sheetRels[sheet], wb, themes, styles$1); break; case "chart": _ws = parse_cs(data, path$1, idx, opts, sheetRels[sheet], wb, themes, styles$1); if (!_ws || !_ws["!drawel"]) break; var dfile = resolve_path(_ws["!drawel"].Target, path$1); var drelsp = get_rels_path(dfile); var draw = parse_drawing(getzipstr(zip, dfile, true), parse_rels(getzipstr(zip, drelsp, true), dfile)); var chartp = resolve_path(draw, dfile); var crelsp = get_rels_path(chartp); _ws = parse_chart(getzipstr(zip, chartp, true), chartp, opts, parse_rels(getzipstr(zip, crelsp, true), chartp), wb, _ws); break; case "macro": _ws = parse_ms(data, path$1, idx, opts, sheetRels[sheet], wb, themes, styles$1); break; case "dialog": _ws = parse_ds(data, path$1, idx, opts, sheetRels[sheet], wb, themes, styles$1); break; default: throw new Error("Unrecognized sheet type " + stype); } sheets[sheet] = _ws; var comments = [], tcomments = []; if (sheetRels && sheetRels[sheet]) keys(sheetRels[sheet]).forEach(function(n$9) { var dfile$1 = ""; if (sheetRels[sheet][n$9].Type == RELS.CMNT) { dfile$1 = resolve_path(sheetRels[sheet][n$9].Target, path$1); comments = parse_cmnt(getzipdata(zip, dfile$1, true), dfile$1, opts); if (!comments || !comments.length) return; sheet_insert_comments(_ws, comments, false); } if (sheetRels[sheet][n$9].Type == RELS.TCMNT) { dfile$1 = resolve_path(sheetRels[sheet][n$9].Target, path$1); tcomments = tcomments.concat(parse_tcmnt_xml(getzipdata(zip, dfile$1, true), opts)); } }); if (tcomments && tcomments.length) sheet_insert_comments(_ws, tcomments, true, opts.people || []); parse_sheet_legacy_drawing(_ws, stype, zip, path$1, idx, opts, wb, comments); } catch (e$10) { if (opts.WTF) throw e$10; } } function strip_front_slash(x$2) { return x$2.charAt(0) == "/" ? x$2.slice(1) : x$2; } function parse_zip(zip, opts) { make_ssf(); opts = opts || {}; fix_read_opts(opts); if (safegetzipfile(zip, "META-INF/manifest.xml")) return parse_ods(zip, opts); if (safegetzipfile(zip, "objectdata.xml")) return parse_ods(zip, opts); if (safegetzipfile(zip, "Index/Document.iwa")) { if (typeof Uint8Array == "undefined") throw new Error("NUMBERS file parsing requires Uint8Array support"); if (typeof parse_numbers_iwa != "undefined") { if (zip.FileIndex) return parse_numbers_iwa(zip, opts); var _zip = CFB.utils.cfb_new(); zipentries(zip).forEach(function(e$10) { zip_add_file(_zip, e$10, getzipbin(zip, e$10)); }); return parse_numbers_iwa(_zip, opts); } throw new Error("Unsupported NUMBERS file"); } if (!safegetzipfile(zip, "[Content_Types].xml")) { if (safegetzipfile(zip, "index.xml.gz")) throw new Error("Unsupported NUMBERS 08 file"); if (safegetzipfile(zip, "index.xml")) throw new Error("Unsupported NUMBERS 09 file"); var index_zip = CFB.find(zip, "Index.zip"); if (index_zip) { opts = dup(opts); delete opts.type; if (typeof index_zip.content == "string") opts.type = "binary"; if (typeof Bun !== "undefined" && Buffer.isBuffer(index_zip.content)) return readSync(new Uint8Array(index_zip.content), opts); return readSync(index_zip.content, opts); } throw new Error("Unsupported ZIP file"); } var entries = zipentries(zip); var dir = parse_ct(getzipstr(zip, "[Content_Types].xml")); var xlsb = false; var sheets, binname; if (dir.workbooks.length === 0) { binname = "xl/workbook.xml"; if (getzipdata(zip, binname, true)) dir.workbooks.push(binname); } if (dir.workbooks.length === 0) { binname = "xl/workbook.bin"; if (!getzipdata(zip, binname, true)) throw new Error("Could not find workbook"); dir.workbooks.push(binname); xlsb = true; } if (dir.workbooks[0].slice(-3) == "bin") xlsb = true; var themes = {}; var styles$1 = {}; if (!opts.bookSheets && !opts.bookProps) { strs = []; if (dir.sst) try { strs = parse_sst(getzipdata(zip, strip_front_slash(dir.sst)), dir.sst, opts); } catch (e$10) { if (opts.WTF) throw e$10; } if (opts.cellStyles && dir.themes.length) themes = parse_theme_xml(getzipstr(zip, dir.themes[0].replace(/^\//, ""), true) || "", opts); if (dir.style) styles$1 = parse_sty(getzipdata(zip, strip_front_slash(dir.style)), dir.style, themes, opts); } dir.links.map(function(link) { try { var rels = parse_rels(getzipstr(zip, get_rels_path(strip_front_slash(link))), link); return parse_xlink(getzipdata(zip, strip_front_slash(link)), rels, link, opts); } catch (e$10) {} }); var wb = parse_wb(getzipdata(zip, strip_front_slash(dir.workbooks[0])), dir.workbooks[0], opts); var props = {}, propdata = ""; if (dir.coreprops.length) { propdata = getzipdata(zip, strip_front_slash(dir.coreprops[0]), true); if (propdata) props = parse_core_props(propdata); if (dir.extprops.length !== 0) { propdata = getzipdata(zip, strip_front_slash(dir.extprops[0]), true); if (propdata) parse_ext_props(propdata, props, opts); } } var custprops = {}; if (!opts.bookSheets || opts.bookProps) { if (dir.custprops.length !== 0) { propdata = getzipstr(zip, strip_front_slash(dir.custprops[0]), true); if (propdata) custprops = parse_cust_props(propdata, opts); } } var out = {}; if (opts.bookSheets || opts.bookProps) { if (wb.Sheets) sheets = wb.Sheets.map(function pluck(x$2) { return x$2.name; }); else if (props.Worksheets && props.SheetNames.length > 0) sheets = props.SheetNames; if (opts.bookProps) { out.Props = props; out.Custprops = custprops; } if (opts.bookSheets && typeof sheets !== "undefined") out.SheetNames = sheets; if (opts.bookSheets ? out.SheetNames : opts.bookProps) return out; } sheets = {}; var deps = {}; if (opts.bookDeps && dir.calcchain) deps = parse_cc(getzipdata(zip, strip_front_slash(dir.calcchain)), dir.calcchain, opts); var i$7 = 0; var sheetRels = {}; var path$1, relsPath; { var wbsheets = wb.Sheets; props.Worksheets = wbsheets.length; props.SheetNames = []; for (var j$2 = 0; j$2 != wbsheets.length; ++j$2) { props.SheetNames[j$2] = wbsheets[j$2].name; } } var wbext = xlsb ? "bin" : "xml"; var wbrelsi = dir.workbooks[0].lastIndexOf("/"); var wbrelsfile = (dir.workbooks[0].slice(0, wbrelsi + 1) + "_rels/" + dir.workbooks[0].slice(wbrelsi + 1) + ".rels").replace(/^\//, ""); if (!safegetzipfile(zip, wbrelsfile)) wbrelsfile = "xl/_rels/workbook." + wbext + ".rels"; var wbrels = parse_rels(getzipstr(zip, wbrelsfile, true), wbrelsfile.replace(/_rels.*/, "s5s")); if ((dir.metadata || []).length >= 1) { opts.xlmeta = parse_xlmeta(getzipdata(zip, strip_front_slash(dir.metadata[0])), dir.metadata[0], opts); } if ((dir.people || []).length >= 1) { opts.people = parse_people_xml(getzipdata(zip, strip_front_slash(dir.people[0])), opts); } if (wbrels) wbrels = safe_parse_wbrels(wbrels, wb.Sheets); var nmode = getzipdata(zip, "xl/worksheets/sheet.xml", true) ? 1 : 0; wsloop: for (i$7 = 0; i$7 != props.Worksheets; ++i$7) { var stype = "sheet"; if (wbrels && wbrels[i$7]) { path$1 = "xl/" + wbrels[i$7][1].replace(/[\/]?xl\//, ""); if (!safegetzipfile(zip, path$1)) path$1 = wbrels[i$7][1]; if (!safegetzipfile(zip, path$1)) path$1 = wbrelsfile.replace(/_rels\/[\S\s]*$/, "") + wbrels[i$7][1]; stype = wbrels[i$7][2]; } else { path$1 = "xl/worksheets/sheet" + (i$7 + 1 - nmode) + "." + wbext; path$1 = path$1.replace(/sheet0\./, "sheet."); } relsPath = path$1.replace(/^(.*)(\/)([^\/]*)$/, "$1/_rels/$3.rels"); if (opts && opts.sheets != null) switch (typeof opts.sheets) { case "number": if (i$7 != opts.sheets) continue wsloop; break; case "string": if (props.SheetNames[i$7].toLowerCase() != opts.sheets.toLowerCase()) continue wsloop; break; default: if (Array.isArray && Array.isArray(opts.sheets)) { var snjseen = false; for (var snj = 0; snj != opts.sheets.length; ++snj) { if (typeof opts.sheets[snj] == "number" && opts.sheets[snj] == i$7) snjseen = 1; if (typeof opts.sheets[snj] == "string" && opts.sheets[snj].toLowerCase() == props.SheetNames[i$7].toLowerCase()) snjseen = 1; } if (!snjseen) continue wsloop; } } safe_parse_sheet(zip, path$1, relsPath, props.SheetNames[i$7], i$7, sheetRels, sheets, stype, opts, wb, themes, styles$1); } out = { Directory: dir, Workbook: wb, Props: props, Custprops: custprops, Deps: deps, Sheets: sheets, SheetNames: props.SheetNames, Strings: strs, Styles: styles$1, Themes: themes, SSF: dup(table_fmt) }; if (opts && opts.bookFiles) { if (zip.files) { out.keys = entries; out.files = zip.files; } else { out.keys = []; out.files = {}; zip.FullPaths.forEach(function(p$3, idx) { p$3 = p$3.replace(/^Root Entry[\/]/, ""); out.keys.push(p$3); out.files[p$3] = zip.FileIndex[idx]; }); } } if (opts && opts.bookVBA) { if (dir.vba.length > 0) out.vbaraw = getzipdata(zip, strip_front_slash(dir.vba[0]), true); else if (dir.defaults && dir.defaults.bin === CT_VBA) out.vbaraw = getzipdata(zip, "xl/vbaProject.bin", true); } out.bookType = xlsb ? "xlsb" : "xlsx"; return out; } function parse_xlsxcfb(cfb, _opts) { var opts = _opts || {}; var f$4 = "Workbook", data = CFB.find(cfb, f$4); try { f$4 = "/!DataSpaces/Version"; data = CFB.find(cfb, f$4); if (!data || !data.content) throw new Error("ECMA-376 Encrypted file missing " + f$4); parse_DataSpaceVersionInfo(data.content); f$4 = "/!DataSpaces/DataSpaceMap"; data = CFB.find(cfb, f$4); if (!data || !data.content) throw new Error("ECMA-376 Encrypted file missing " + f$4); var dsm = parse_DataSpaceMap(data.content); if (dsm.length !== 1 || dsm[0].comps.length !== 1 || dsm[0].comps[0].t !== 0 || dsm[0].name !== "StrongEncryptionDataSpace" || dsm[0].comps[0].v !== "EncryptedPackage") throw new Error("ECMA-376 Encrypted file bad " + f$4); f$4 = "/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace"; data = CFB.find(cfb, f$4); if (!data || !data.content) throw new Error("ECMA-376 Encrypted file missing " + f$4); var seds = parse_DataSpaceDefinition(data.content); if (seds.length != 1 || seds[0] != "StrongEncryptionTransform") throw new Error("ECMA-376 Encrypted file bad " + f$4); f$4 = "/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary"; data = CFB.find(cfb, f$4); if (!data || !data.content) throw new Error("ECMA-376 Encrypted file missing " + f$4); parse_Primary(data.content); } catch (e$10) {} f$4 = "/EncryptionInfo"; data = CFB.find(cfb, f$4); if (!data || !data.content) throw new Error("ECMA-376 Encrypted file missing " + f$4); var einfo = parse_EncryptionInfo(data.content); f$4 = "/EncryptedPackage"; data = CFB.find(cfb, f$4); if (!data || !data.content) throw new Error("ECMA-376 Encrypted file missing " + f$4); if (einfo[0] == 4 && typeof decrypt_agile !== "undefined") return decrypt_agile(einfo[1], data.content, opts.password || "", opts); if (einfo[0] == 2 && typeof decrypt_std76 !== "undefined") return decrypt_std76(einfo[1], data.content, opts.password || "", opts); throw new Error("File is password-protected"); } function write_zip_xlsb(wb, opts) { if (wb && !wb.SSF) { wb.SSF = dup(table_fmt); } if (wb && wb.SSF) { make_ssf(); SSF_load_table(wb.SSF); opts.revssf = evert_num(wb.SSF); opts.revssf[wb.SSF[65535]] = 0; opts.ssf = wb.SSF; } opts.rels = {}; opts.wbrels = {}; opts.Strings = []; opts.Strings.Count = 0; opts.Strings.Unique = 0; if (browser_has_Map) opts.revStrings = new Map(); else { opts.revStrings = {}; opts.revStrings.foo = []; delete opts.revStrings.foo; } var wbext = "bin"; var vbafmt = true; var ct = new_ct(); fix_write_opts(opts = opts || {}); var zip = zip_new(); var f$4 = "", rId = 0; opts.cellXfs = []; get_cell_style(opts.cellXfs, {}, { revssf: { "General": 0 } }); if (!wb.Props) wb.Props = {}; f$4 = "docProps/core.xml"; zip_add_file(zip, f$4, write_core_props(wb.Props, opts)); ct.coreprops.push(f$4); add_rels(opts.rels, 2, f$4, RELS.CORE_PROPS); f$4 = "docProps/app.xml"; if (wb.Props && wb.Props.SheetNames) {} else if (!wb.Workbook || !wb.Workbook.Sheets) wb.Props.SheetNames = wb.SheetNames; else { var _sn = []; for (var _i$1 = 0; _i$1 < wb.SheetNames.length; ++_i$1) if ((wb.Workbook.Sheets[_i$1] || {}).Hidden != 2) _sn.push(wb.SheetNames[_i$1]); wb.Props.SheetNames = _sn; } wb.Props.Worksheets = wb.Props.SheetNames.length; zip_add_file(zip, f$4, write_ext_props(wb.Props, opts)); ct.extprops.push(f$4); add_rels(opts.rels, 3, f$4, RELS.EXT_PROPS); if (wb.Custprops !== wb.Props && keys(wb.Custprops || {}).length > 0) { f$4 = "docProps/custom.xml"; zip_add_file(zip, f$4, write_cust_props(wb.Custprops, opts)); ct.custprops.push(f$4); add_rels(opts.rels, 4, f$4, RELS.CUST_PROPS); } var people = ["SheetJ5"]; opts.tcid = 0; for (rId = 1; rId <= wb.SheetNames.length; ++rId) { var wsrels = { "!id": {} }; var ws = wb.Sheets[wb.SheetNames[rId - 1]]; var _type = (ws || {})["!type"] || "sheet"; switch (_type) { case "chart": default: f$4 = "xl/worksheets/sheet" + rId + "." + wbext; zip_add_file(zip, f$4, write_ws_bin(rId - 1, opts, wb, wsrels)); ct.sheets.push(f$4); add_rels(opts.wbrels, -1, "worksheets/sheet" + rId + "." + wbext, RELS.WS[0]); } if (ws) { var comments = ws["!comments"]; var need_vml = false; var cf = ""; if (comments && comments.length > 0) { var needtc = false; comments.forEach(function(carr) { carr[1].forEach(function(c$7) { if (c$7.T == true) needtc = true; }); }); if (needtc) { cf = "xl/threadedComments/threadedComment" + rId + ".xml"; zip_add_file(zip, cf, write_tcmnt_xml(comments, people, opts)); ct.threadedcomments.push(cf); add_rels(wsrels, -1, "../threadedComments/threadedComment" + rId + ".xml", RELS.TCMNT); } cf = "xl/comments" + rId + "." + wbext; zip_add_file(zip, cf, write_comments_bin(comments, opts)); ct.comments.push(cf); add_rels(wsrels, -1, "../comments" + rId + "." + wbext, RELS.CMNT); need_vml = true; } if (ws["!legacy"]) { if (need_vml) zip_add_file(zip, "xl/drawings/vmlDrawing" + rId + ".vml", write_vml(rId, ws["!comments"])); } delete ws["!comments"]; delete ws["!legacy"]; } if (wsrels["!id"].rId1) zip_add_file(zip, get_rels_path(f$4), write_rels(wsrels)); } if (opts.Strings != null && opts.Strings.length > 0) { f$4 = "xl/sharedStrings." + wbext; zip_add_file(zip, f$4, write_sst_bin(opts.Strings, opts)); ct.strs.push(f$4); add_rels(opts.wbrels, -1, "sharedStrings." + wbext, RELS.SST); } f$4 = "xl/workbook." + wbext; zip_add_file(zip, f$4, write_wb_bin(wb, opts)); ct.workbooks.push(f$4); add_rels(opts.rels, 1, f$4, RELS.WB); f$4 = "xl/theme/theme1.xml"; var ww = write_theme(wb.Themes, opts); zip_add_file(zip, f$4, ww); ct.themes.push(f$4); add_rels(opts.wbrels, -1, "theme/theme1.xml", RELS.THEME); f$4 = "xl/styles." + wbext; zip_add_file(zip, f$4, write_sty_bin(wb, opts)); ct.styles.push(f$4); add_rels(opts.wbrels, -1, "styles." + wbext, RELS.STY); if (wb.vbaraw && vbafmt) { f$4 = "xl/vbaProject.bin"; zip_add_file(zip, f$4, wb.vbaraw); ct.vba.push(f$4); add_rels(opts.wbrels, -1, "vbaProject.bin", RELS.VBA); } f$4 = "xl/metadata." + wbext; zip_add_file(zip, f$4, write_xlmeta_bin()); ct.metadata.push(f$4); add_rels(opts.wbrels, -1, "metadata." + wbext, RELS.XLMETA); if (people.length > 1) { f$4 = "xl/persons/person.xml"; zip_add_file(zip, f$4, write_people_xml(people, opts)); ct.people.push(f$4); add_rels(opts.wbrels, -1, "persons/person.xml", RELS.PEOPLE); } zip_add_file(zip, "[Content_Types].xml", write_ct(ct, opts)); zip_add_file(zip, "_rels/.rels", write_rels(opts.rels)); zip_add_file(zip, "xl/_rels/workbook." + wbext + ".rels", write_rels(opts.wbrels)); delete opts.revssf; delete opts.ssf; return zip; } function write_zip_xlsx(wb, opts) { if (wb && !wb.SSF) { wb.SSF = dup(table_fmt); } if (wb && wb.SSF) { make_ssf(); SSF_load_table(wb.SSF); opts.revssf = evert_num(wb.SSF); opts.revssf[wb.SSF[65535]] = 0; opts.ssf = wb.SSF; } opts.rels = {}; opts.wbrels = {}; opts.Strings = []; opts.Strings.Count = 0; opts.Strings.Unique = 0; if (browser_has_Map) opts.revStrings = new Map(); else { opts.revStrings = {}; opts.revStrings.foo = []; delete opts.revStrings.foo; } var wbext = "xml"; var vbafmt = VBAFMTS.indexOf(opts.bookType) > -1; var ct = new_ct(); fix_write_opts(opts = opts || {}); var zip = zip_new(); var f$4 = "", rId = 0; opts.cellXfs = []; get_cell_style(opts.cellXfs, {}, { revssf: { "General": 0 } }); if (!wb.Props) wb.Props = {}; f$4 = "docProps/core.xml"; zip_add_file(zip, f$4, write_core_props(wb.Props, opts)); ct.coreprops.push(f$4); add_rels(opts.rels, 2, f$4, RELS.CORE_PROPS); f$4 = "docProps/app.xml"; if (wb.Props && wb.Props.SheetNames) {} else if (!wb.Workbook || !wb.Workbook.Sheets) wb.Props.SheetNames = wb.SheetNames; else { var _sn = []; for (var _i$1 = 0; _i$1 < wb.SheetNames.length; ++_i$1) if ((wb.Workbook.Sheets[_i$1] || {}).Hidden != 2) _sn.push(wb.SheetNames[_i$1]); wb.Props.SheetNames = _sn; } wb.Props.Worksheets = wb.Props.SheetNames.length; zip_add_file(zip, f$4, write_ext_props(wb.Props, opts)); ct.extprops.push(f$4); add_rels(opts.rels, 3, f$4, RELS.EXT_PROPS); if (wb.Custprops !== wb.Props && keys(wb.Custprops || {}).length > 0) { f$4 = "docProps/custom.xml"; zip_add_file(zip, f$4, write_cust_props(wb.Custprops, opts)); ct.custprops.push(f$4); add_rels(opts.rels, 4, f$4, RELS.CUST_PROPS); } var people = ["SheetJ5"]; opts.tcid = 0; for (rId = 1; rId <= wb.SheetNames.length; ++rId) { var wsrels = { "!id": {} }; var ws = wb.Sheets[wb.SheetNames[rId - 1]]; var _type = (ws || {})["!type"] || "sheet"; switch (_type) { case "chart": default: f$4 = "xl/worksheets/sheet" + rId + "." + wbext; zip_add_file(zip, f$4, write_ws_xml(rId - 1, opts, wb, wsrels)); ct.sheets.push(f$4); add_rels(opts.wbrels, -1, "worksheets/sheet" + rId + "." + wbext, RELS.WS[0]); } if (ws) { var comments = ws["!comments"]; var need_vml = false; var cf = ""; if (comments && comments.length > 0) { var needtc = false; comments.forEach(function(carr) { carr[1].forEach(function(c$7) { if (c$7.T == true) needtc = true; }); }); if (needtc) { cf = "xl/threadedComments/threadedComment" + rId + ".xml"; zip_add_file(zip, cf, write_tcmnt_xml(comments, people, opts)); ct.threadedcomments.push(cf); add_rels(wsrels, -1, "../threadedComments/threadedComment" + rId + ".xml", RELS.TCMNT); } cf = "xl/comments" + rId + "." + wbext; zip_add_file(zip, cf, write_comments_xml(comments, opts)); ct.comments.push(cf); add_rels(wsrels, -1, "../comments" + rId + "." + wbext, RELS.CMNT); need_vml = true; } if (ws["!legacy"]) { if (need_vml) zip_add_file(zip, "xl/drawings/vmlDrawing" + rId + ".vml", write_vml(rId, ws["!comments"])); } delete ws["!comments"]; delete ws["!legacy"]; } if (wsrels["!id"].rId1) zip_add_file(zip, get_rels_path(f$4), write_rels(wsrels)); } if (opts.Strings != null && opts.Strings.length > 0) { f$4 = "xl/sharedStrings." + wbext; zip_add_file(zip, f$4, write_sst_xml(opts.Strings, opts)); ct.strs.push(f$4); add_rels(opts.wbrels, -1, "sharedStrings." + wbext, RELS.SST); } f$4 = "xl/workbook." + wbext; zip_add_file(zip, f$4, write_wb_xml(wb, opts)); ct.workbooks.push(f$4); add_rels(opts.rels, 1, f$4, RELS.WB); f$4 = "xl/theme/theme1.xml"; zip_add_file(zip, f$4, write_theme(wb.Themes, opts)); ct.themes.push(f$4); add_rels(opts.wbrels, -1, "theme/theme1.xml", RELS.THEME); f$4 = "xl/styles." + wbext; zip_add_file(zip, f$4, write_sty_xml(wb, opts)); ct.styles.push(f$4); add_rels(opts.wbrels, -1, "styles." + wbext, RELS.STY); if (wb.vbaraw && vbafmt) { f$4 = "xl/vbaProject.bin"; zip_add_file(zip, f$4, wb.vbaraw); ct.vba.push(f$4); add_rels(opts.wbrels, -1, "vbaProject.bin", RELS.VBA); } f$4 = "xl/metadata." + wbext; zip_add_file(zip, f$4, write_xlmeta_xml()); ct.metadata.push(f$4); add_rels(opts.wbrels, -1, "metadata." + wbext, RELS.XLMETA); if (people.length > 1) { f$4 = "xl/persons/person.xml"; zip_add_file(zip, f$4, write_people_xml(people, opts)); ct.people.push(f$4); add_rels(opts.wbrels, -1, "persons/person.xml", RELS.PEOPLE); } zip_add_file(zip, "[Content_Types].xml", write_ct(ct, opts)); zip_add_file(zip, "_rels/.rels", write_rels(opts.rels)); zip_add_file(zip, "xl/_rels/workbook." + wbext + ".rels", write_rels(opts.wbrels)); delete opts.revssf; delete opts.ssf; return zip; } function firstbyte(f$4, o$10) { var x$2 = ""; switch ((o$10 || {}).type || "base64") { case "buffer": return [ f$4[0], f$4[1], f$4[2], f$4[3], f$4[4], f$4[5], f$4[6], f$4[7] ]; case "base64": x$2 = Base64_decode(f$4.slice(0, 12)); break; case "binary": x$2 = f$4; break; case "array": return [ f$4[0], f$4[1], f$4[2], f$4[3], f$4[4], f$4[5], f$4[6], f$4[7] ]; default: throw new Error("Unrecognized type " + (o$10 && o$10.type || "undefined")); } return [ x$2.charCodeAt(0), x$2.charCodeAt(1), x$2.charCodeAt(2), x$2.charCodeAt(3), x$2.charCodeAt(4), x$2.charCodeAt(5), x$2.charCodeAt(6), x$2.charCodeAt(7) ]; } function read_cfb(cfb, opts) { if (CFB.find(cfb, "EncryptedPackage")) return parse_xlsxcfb(cfb, opts); return parse_xlscfb(cfb, opts); } function read_zip(data, opts) { var zip, d$5 = data; var o$10 = opts || {}; if (!o$10.type) o$10.type = has_buf && Buffer.isBuffer(data) ? "buffer" : "base64"; zip = zip_read(d$5, o$10); return parse_zip(zip, o$10); } function read_plaintext(data, o$10) { var i$7 = 0; main: while (i$7 < data.length) switch (data.charCodeAt(i$7)) { case 10: case 13: case 32: ++i$7; break; case 60: return parse_xlml(data.slice(i$7), o$10); default: break main; } return PRN.to_workbook(data, o$10); } function read_plaintext_raw(data, o$10) { var str = "", bytes = firstbyte(data, o$10); switch (o$10.type) { case "base64": str = Base64_decode(data); break; case "binary": str = data; break; case "buffer": str = data.toString("binary"); break; case "array": str = cc2str(data); break; default: throw new Error("Unrecognized type " + o$10.type); } if (bytes[0] == 239 && bytes[1] == 187 && bytes[2] == 191) str = utf8read(str); o$10.type = "binary"; return read_plaintext(str, o$10); } function read_utf16(data, o$10) { var d$5 = data; if (o$10.type == "base64") d$5 = Base64_decode(d$5); if (typeof ArrayBuffer !== "undefined" && data instanceof ArrayBuffer) d$5 = new Uint8Array(data); d$5 = typeof $cptable !== "undefined" ? $cptable.utils.decode(1200, d$5.slice(2), "str") : has_buf && Buffer.isBuffer(data) ? data.slice(2).toString("utf16le") : typeof Uint8Array !== "undefined" && d$5 instanceof Uint8Array ? typeof TextDecoder !== "undefined" ? new TextDecoder("utf-16le").decode(d$5.slice(2)) : utf16lereadu(d$5.slice(2)) : utf16leread(d$5.slice(2)); o$10.type = "binary"; return read_plaintext(d$5, o$10); } function bstrify(data) { return !data.match(/[^\x00-\x7F]/) ? data : utf8write(data); } function read_prn(data, d$5, o$10, str) { if (str) { o$10.type = "string"; return PRN.to_workbook(data, o$10); } return PRN.to_workbook(d$5, o$10); } function readSync(data, opts) { reset_cp(); var o$10 = opts || {}; if (o$10.codepage && typeof $cptable === "undefined") console.error("Codepage tables are not loaded. Non-ASCII characters may not give expected results"); if (typeof ArrayBuffer !== "undefined" && data instanceof ArrayBuffer) return readSync(new Uint8Array(data), (o$10 = dup(o$10), o$10.type = "array", o$10)); if (typeof Int8Array !== "undefined" && data instanceof Int8Array) return readSync(new Uint8Array(data.buffer, data.byteOffset, data.length), o$10); if (typeof Uint8Array !== "undefined" && data instanceof Uint8Array && !o$10.type) o$10.type = typeof Deno !== "undefined" ? "buffer" : "array"; var d$5 = data, n$9 = [ 0, 0, 0, 0 ], str = false; if (o$10.cellStyles) { o$10.cellNF = true; o$10.sheetStubs = true; } _ssfopts = {}; if (o$10.dateNF) _ssfopts.dateNF = o$10.dateNF; if (!o$10.type) o$10.type = has_buf && Buffer.isBuffer(data) ? "buffer" : "base64"; if (o$10.type == "file") { o$10.type = has_buf ? "buffer" : "binary"; d$5 = read_binary(data); if (typeof Uint8Array !== "undefined" && !has_buf) o$10.type = "array"; } if (o$10.type == "string") { str = true; o$10.type = "binary"; o$10.codepage = 65001; d$5 = bstrify(data); } if (o$10.type == "array" && typeof Uint8Array !== "undefined" && data instanceof Uint8Array && typeof ArrayBuffer !== "undefined") { var ab = new ArrayBuffer(3), vu = new Uint8Array(ab); vu.foo = "bar"; if (!vu.foo) { o$10 = dup(o$10); o$10.type = "array"; return readSync(ab2a(d$5), o$10); } } switch ((n$9 = firstbyte(d$5, o$10))[0]) { case 208: if (n$9[1] === 207 && n$9[2] === 17 && n$9[3] === 224 && n$9[4] === 161 && n$9[5] === 177 && n$9[6] === 26 && n$9[7] === 225) return read_cfb(CFB.read(d$5, o$10), o$10); break; case 9: if (n$9[1] <= 8) return parse_xlscfb(d$5, o$10); break; case 60: return parse_xlml(d$5, o$10); case 73: if (n$9[1] === 73 && n$9[2] === 42 && n$9[3] === 0) throw new Error("TIFF Image File is not a spreadsheet"); if (n$9[1] === 68) return read_wb_ID(d$5, o$10); break; case 84: if (n$9[1] === 65 && n$9[2] === 66 && n$9[3] === 76) return DIF.to_workbook(d$5, o$10); break; case 80: return n$9[1] === 75 && n$9[2] < 9 && n$9[3] < 9 ? read_zip(d$5, o$10) : read_prn(data, d$5, o$10, str); case 239: return n$9[3] === 60 ? parse_xlml(d$5, o$10) : read_prn(data, d$5, o$10, str); case 255: if (n$9[1] === 254) { return read_utf16(d$5, o$10); } else if (n$9[1] === 0 && n$9[2] === 2 && n$9[3] === 0) return WK_.to_workbook(d$5, o$10); break; case 0: if (n$9[1] === 0) { if (n$9[2] >= 2 && n$9[3] === 0) return WK_.to_workbook(d$5, o$10); if (n$9[2] === 0 && (n$9[3] === 8 || n$9[3] === 9)) return WK_.to_workbook(d$5, o$10); } break; case 3: case 131: case 139: case 140: return DBF.to_workbook(d$5, o$10); case 123: if (n$9[1] === 92 && n$9[2] === 114 && n$9[3] === 116) return rtf_to_workbook(d$5, o$10); break; case 10: case 13: case 32: return read_plaintext_raw(d$5, o$10); case 137: if (n$9[1] === 80 && n$9[2] === 78 && n$9[3] === 71) throw new Error("PNG Image File is not a spreadsheet"); break; case 8: if (n$9[1] === 231) throw new Error("Unsupported Multiplan 1.x file!"); break; case 12: if (n$9[1] === 236) throw new Error("Unsupported Multiplan 2.x file!"); if (n$9[1] === 237) throw new Error("Unsupported Multiplan 3.x file!"); break; } if (DBF_SUPPORTED_VERSIONS.indexOf(n$9[0]) > -1 && n$9[2] <= 12 && n$9[3] <= 31) return DBF.to_workbook(d$5, o$10); return read_prn(data, d$5, o$10, str); } function readFileSync(filename, opts) { var o$10 = opts || {}; o$10.type = "file"; return readSync(filename, o$10); } function write_cfb_ctr(cfb, o$10) { switch (o$10.type) { case "base64": case "binary": break; case "buffer": case "array": o$10.type = ""; break; case "file": return write_dl(o$10.file, CFB.write(cfb, { type: has_buf ? "buffer" : "" })); case "string": throw new Error("'string' output type invalid for '" + o$10.bookType + "' files"); default: throw new Error("Unrecognized type " + o$10.type); } return CFB.write(cfb, o$10); } function write_zip(wb, opts) { switch (opts.bookType) { case "ods": return write_ods(wb, opts); case "numbers": return write_numbers_iwa(wb, opts); case "xlsb": return write_zip_xlsb(wb, opts); default: return write_zip_xlsx(wb, opts); } } function write_zip_type(wb, opts) { var o$10 = dup(opts || {}); var z$2 = write_zip(wb, o$10); return write_zip_denouement(z$2, o$10); } function write_zip_typeXLSX(wb, opts) { var o$10 = dup(opts || {}); var z$2 = write_zip_xlsx(wb, o$10); return write_zip_denouement(z$2, o$10); } function write_zip_denouement(z$2, o$10) { var oopts = {}; var ftype = has_buf ? "nodebuffer" : typeof Uint8Array !== "undefined" ? "array" : "string"; if (o$10.compression) oopts.compression = "DEFLATE"; if (o$10.password) oopts.type = ftype; else switch (o$10.type) { case "base64": oopts.type = "base64"; break; case "binary": oopts.type = "string"; break; case "string": throw new Error("'string' output type invalid for '" + o$10.bookType + "' files"); case "buffer": case "file": oopts.type = ftype; break; default: throw new Error("Unrecognized type " + o$10.type); } var out = z$2.FullPaths ? CFB.write(z$2, { fileType: "zip", type: { "nodebuffer": "buffer", "string": "binary" }[oopts.type] || oopts.type, compression: !!o$10.compression }) : z$2.generate(oopts); if (typeof Deno !== "undefined") { if (typeof out == "string") { if (o$10.type == "binary" || o$10.type == "base64") return out; out = new Uint8Array(s2ab(out)); } } if (o$10.password && typeof encrypt_agile !== "undefined") return write_cfb_ctr(encrypt_agile(out, o$10.password), o$10); if (o$10.type === "file") return write_dl(o$10.file, out); return o$10.type == "string" ? utf8read(out) : out; } function write_cfb_type(wb, opts) { var o$10 = opts || {}; var cfb = write_xlscfb(wb, o$10); return write_cfb_ctr(cfb, o$10); } function write_string_type(out, opts, bom) { if (!bom) bom = ""; var o$10 = bom + out; switch (opts.type) { case "base64": return Base64_encode(utf8write(o$10)); case "binary": return utf8write(o$10); case "string": return out; case "file": return write_dl(opts.file, o$10, "utf8"); case "buffer": { if (has_buf) return Buffer_from(o$10, "utf8"); else if (typeof TextEncoder !== "undefined") return new TextEncoder().encode(o$10); else return write_string_type(o$10, { type: "binary" }).split("").map(function(c$7) { return c$7.charCodeAt(0); }); } } throw new Error("Unrecognized type " + opts.type); } function write_stxt_type(out, opts) { switch (opts.type) { case "base64": return Base64_encode_pass(out); case "binary": return out; case "string": return out; case "file": return write_dl(opts.file, out, "binary"); case "buffer": { if (has_buf) return Buffer_from(out, "binary"); else return out.split("").map(function(c$7) { return c$7.charCodeAt(0); }); } } throw new Error("Unrecognized type " + opts.type); } function write_binary_type(out, opts) { switch (opts.type) { case "string": case "base64": case "binary": var bstr = ""; for (var i$7 = 0; i$7 < out.length; ++i$7) bstr += String.fromCharCode(out[i$7]); return opts.type == "base64" ? Base64_encode(bstr) : opts.type == "string" ? utf8read(bstr) : bstr; case "file": return write_dl(opts.file, out); case "buffer": return out; default: throw new Error("Unrecognized type " + opts.type); } } function writeSyncXLSX(wb, opts) { reset_cp(); check_wb(wb); var o$10 = dup(opts || {}); if (o$10.cellStyles) { o$10.cellNF = true; o$10.sheetStubs = true; } if (o$10.type == "array") { o$10.type = "binary"; var out = writeSyncXLSX(wb, o$10); o$10.type = "array"; return s2ab(out); } return write_zip_typeXLSX(wb, o$10); } function writeSync(wb, opts) { reset_cp(); check_wb(wb); var o$10 = dup(opts || {}); if (o$10.cellStyles) { o$10.cellNF = true; o$10.sheetStubs = true; } if (o$10.type == "array") { o$10.type = "binary"; var out = writeSync(wb, o$10); o$10.type = "array"; return s2ab(out); } var idx = 0; if (o$10.sheet) { if (typeof o$10.sheet == "number") idx = o$10.sheet; else idx = wb.SheetNames.indexOf(o$10.sheet); if (!wb.SheetNames[idx]) throw new Error("Sheet not found: " + o$10.sheet + " : " + typeof o$10.sheet); } switch (o$10.bookType || "xlsb") { case "xml": case "xlml": return write_string_type(write_xlml(wb, o$10), o$10); case "slk": case "sylk": return write_string_type(SYLK.from_sheet(wb.Sheets[wb.SheetNames[idx]], o$10, wb), o$10); case "htm": case "html": return write_string_type(sheet_to_html(wb.Sheets[wb.SheetNames[idx]], o$10), o$10); case "txt": return write_stxt_type(sheet_to_txt(wb.Sheets[wb.SheetNames[idx]], o$10), o$10); case "csv": return write_string_type(sheet_to_csv(wb.Sheets[wb.SheetNames[idx]], o$10), o$10, ""); case "dif": return write_string_type(DIF.from_sheet(wb.Sheets[wb.SheetNames[idx]], o$10), o$10); case "dbf": return write_binary_type(DBF.from_sheet(wb.Sheets[wb.SheetNames[idx]], o$10), o$10); case "prn": return write_string_type(PRN.from_sheet(wb.Sheets[wb.SheetNames[idx]], o$10), o$10); case "rtf": return write_string_type(sheet_to_rtf(wb.Sheets[wb.SheetNames[idx]], o$10), o$10); case "eth": return write_string_type(ETH.from_sheet(wb.Sheets[wb.SheetNames[idx]], o$10), o$10); case "fods": return write_string_type(write_ods(wb, o$10), o$10); case "wk1": return write_binary_type(WK_.sheet_to_wk1(wb.Sheets[wb.SheetNames[idx]], o$10), o$10); case "wk3": return write_binary_type(WK_.book_to_wk3(wb, o$10), o$10); case "biff2": if (!o$10.biff) o$10.biff = 2; case "biff3": if (!o$10.biff) o$10.biff = 3; case "biff4": if (!o$10.biff) o$10.biff = 4; return write_binary_type(write_biff_buf(wb, o$10), o$10); case "biff5": if (!o$10.biff) o$10.biff = 5; case "biff8": case "xla": case "xls": if (!o$10.biff) o$10.biff = 8; return write_cfb_type(wb, o$10); case "xlsx": case "xlsm": case "xlam": case "xlsb": case "numbers": case "ods": return write_zip_type(wb, o$10); default: throw new Error("Unrecognized bookType |" + o$10.bookType + "|"); } } function resolve_book_type(o$10) { if (o$10.bookType) return; var _BT = { "xls": "biff8", "htm": "html", "slk": "sylk", "socialcalc": "eth", "Sh33tJS": "WTF" }; var ext = o$10.file.slice(o$10.file.lastIndexOf(".")).toLowerCase(); if (ext.match(/^\.[a-z]+$/)) o$10.bookType = ext.slice(1); o$10.bookType = _BT[o$10.bookType] || o$10.bookType; } function writeFileSync(wb, filename, opts) { var o$10 = opts || {}; o$10.type = "file"; o$10.file = filename; resolve_book_type(o$10); return writeSync(wb, o$10); } function writeFileSyncXLSX(wb, filename, opts) { var o$10 = opts || {}; o$10.type = "file"; o$10.file = filename; resolve_book_type(o$10); return writeSyncXLSX(wb, o$10); } function writeFileAsync(filename, wb, opts, cb) { var o$10 = opts || {}; o$10.type = "file"; o$10.file = filename; resolve_book_type(o$10); o$10.type = "buffer"; var _cb = cb; if (!(_cb instanceof Function)) _cb = opts; return _fs.writeFile(filename, writeSync(wb, o$10), _cb); } function make_json_row(sheet, r$10, R$1, cols, header, hdr, o$10) { var rr = encode_row(R$1); var defval = o$10.defval, raw = o$10.raw || !Object.prototype.hasOwnProperty.call(o$10, "raw"); var isempty = true, dense = sheet["!data"] != null; var row = header === 1 ? [] : {}; if (header !== 1) { if (Object.defineProperty) try { Object.defineProperty(row, "__rowNum__", { value: R$1, enumerable: false }); } catch (e$10) { row.__rowNum__ = R$1; } else row.__rowNum__ = R$1; } if (!dense || sheet["!data"][R$1]) for (var C$2 = r$10.s.c; C$2 <= r$10.e.c; ++C$2) { var val$1 = dense ? (sheet["!data"][R$1] || [])[C$2] : sheet[cols[C$2] + rr]; if (val$1 == null || val$1.t === undefined) { if (defval === undefined) continue; if (hdr[C$2] != null) { row[hdr[C$2]] = defval; } continue; } var v$3 = val$1.v; switch (val$1.t) { case "z": if (v$3 == null) break; continue; case "e": v$3 = v$3 == 0 ? null : void 0; break; case "s": case "b": case "n": if (!val$1.z || !fmt_is_date(val$1.z)) break; v$3 = numdate(v$3); if (typeof v$3 == "number") break; case "d": if (!(o$10 && (o$10.UTC || o$10.raw === false))) v$3 = utc_to_local(new Date(v$3)); break; default: throw new Error("unrecognized type " + val$1.t); } if (hdr[C$2] != null) { if (v$3 == null) { if (val$1.t == "e" && v$3 === null) row[hdr[C$2]] = null; else if (defval !== undefined) row[hdr[C$2]] = defval; else if (raw && v$3 === null) row[hdr[C$2]] = null; else continue; } else { row[hdr[C$2]] = (val$1.t === "n" && typeof o$10.rawNumbers === "boolean" ? o$10.rawNumbers : raw) ? v$3 : format_cell(val$1, v$3, o$10); } if (v$3 != null) isempty = false; } } return { row, isempty }; } function sheet_to_json(sheet, opts) { if (sheet == null || sheet["!ref"] == null) return []; var val$1 = { t: "n", v: 0 }, header = 0, offset = 1, hdr = [], v$3 = 0, vv = ""; var r$10 = { s: { r: 0, c: 0 }, e: { r: 0, c: 0 } }; var o$10 = opts || {}; var range = o$10.range != null ? o$10.range : sheet["!ref"]; if (o$10.header === 1) header = 1; else if (o$10.header === "A") header = 2; else if (Array.isArray(o$10.header)) header = 3; else if (o$10.header == null) header = 0; switch (typeof range) { case "string": r$10 = safe_decode_range(range); break; case "number": r$10 = safe_decode_range(sheet["!ref"]); r$10.s.r = range; break; default: r$10 = range; } if (header > 0) offset = 0; var rr = encode_row(r$10.s.r); var cols = []; var out = []; var outi = 0, counter = 0; var dense = sheet["!data"] != null; var R$1 = r$10.s.r, C$2 = 0; var header_cnt = {}; if (dense && !sheet["!data"][R$1]) sheet["!data"][R$1] = []; var colinfo = o$10.skipHidden && sheet["!cols"] || []; var rowinfo = o$10.skipHidden && sheet["!rows"] || []; for (C$2 = r$10.s.c; C$2 <= r$10.e.c; ++C$2) { if ((colinfo[C$2] || {}).hidden) continue; cols[C$2] = encode_col(C$2); val$1 = dense ? sheet["!data"][R$1][C$2] : sheet[cols[C$2] + rr]; switch (header) { case 1: hdr[C$2] = C$2 - r$10.s.c; break; case 2: hdr[C$2] = cols[C$2]; break; case 3: hdr[C$2] = o$10.header[C$2 - r$10.s.c]; break; default: if (val$1 == null) val$1 = { w: "__EMPTY", t: "s" }; vv = v$3 = format_cell(val$1, null, o$10); counter = header_cnt[v$3] || 0; if (!counter) header_cnt[v$3] = 1; else { do { vv = v$3 + "_" + counter++; } while (header_cnt[vv]); header_cnt[v$3] = counter; header_cnt[vv] = 1; } hdr[C$2] = vv; } } for (R$1 = r$10.s.r + offset; R$1 <= r$10.e.r; ++R$1) { if ((rowinfo[R$1] || {}).hidden) continue; var row = make_json_row(sheet, r$10, R$1, cols, header, hdr, o$10); if (row.isempty === false || (header === 1 ? o$10.blankrows !== false : !!o$10.blankrows)) out[outi++] = row.row; } out.length = outi; return out; } function make_csv_row(sheet, r$10, R$1, cols, fs, rs, FS, w$2, o$10) { var isempty = true; var row = [], txt = "", rr = encode_row(R$1); var dense = sheet["!data"] != null; var datarow = dense && sheet["!data"][R$1] || []; for (var C$2 = r$10.s.c; C$2 <= r$10.e.c; ++C$2) { if (!cols[C$2]) continue; var val$1 = dense ? datarow[C$2] : sheet[cols[C$2] + rr]; if (val$1 == null) txt = ""; else if (val$1.v != null) { isempty = false; txt = "" + (o$10.rawNumbers && val$1.t == "n" ? val$1.v : format_cell(val$1, null, o$10)); for (var i$7 = 0, cc = 0; i$7 !== txt.length; ++i$7) if ((cc = txt.charCodeAt(i$7)) === fs || cc === rs || cc === 34 || o$10.forceQuotes) { txt = "\"" + txt.replace(qreg, "\"\"") + "\""; break; } if (txt == "ID" && w$2 == 0 && row.length == 0) txt = "\"ID\""; } else if (val$1.f != null && !val$1.F) { isempty = false; txt = "=" + val$1.f; if (txt.indexOf(",") >= 0) txt = "\"" + txt.replace(qreg, "\"\"") + "\""; } else txt = ""; row.push(txt); } if (o$10.strip) while (row[row.length - 1] === "") --row.length; if (o$10.blankrows === false && isempty) return null; return row.join(FS); } function sheet_to_csv(sheet, opts) { var out = []; var o$10 = opts == null ? {} : opts; if (sheet == null || sheet["!ref"] == null) return ""; var r$10 = safe_decode_range(sheet["!ref"]); var FS = o$10.FS !== undefined ? o$10.FS : ",", fs = FS.charCodeAt(0); var RS = o$10.RS !== undefined ? o$10.RS : "\n", rs = RS.charCodeAt(0); var row = "", cols = []; var colinfo = o$10.skipHidden && sheet["!cols"] || []; var rowinfo = o$10.skipHidden && sheet["!rows"] || []; for (var C$2 = r$10.s.c; C$2 <= r$10.e.c; ++C$2) if (!(colinfo[C$2] || {}).hidden) cols[C$2] = encode_col(C$2); var w$2 = 0; for (var R$1 = r$10.s.r; R$1 <= r$10.e.r; ++R$1) { if ((rowinfo[R$1] || {}).hidden) continue; row = make_csv_row(sheet, r$10, R$1, cols, fs, rs, FS, w$2, o$10); if (row == null) { continue; } if (row || o$10.blankrows !== false) out.push((w$2++ ? RS : "") + row); } return out.join(""); } function sheet_to_txt(sheet, opts) { if (!opts) opts = {}; opts.FS = " "; opts.RS = "\n"; var s$5 = sheet_to_csv(sheet, opts); if (typeof $cptable == "undefined" || opts.type == "string") return s$5; var o$10 = $cptable.utils.encode(1200, s$5, "str"); return String.fromCharCode(255) + String.fromCharCode(254) + o$10; } function sheet_to_formulae(sheet, opts) { var y$3 = "", x$2, val$1 = ""; if (sheet == null || sheet["!ref"] == null) return []; var r$10 = safe_decode_range(sheet["!ref"]), rr = "", cols = [], C$2; var cmds = []; var dense = sheet["!data"] != null; for (C$2 = r$10.s.c; C$2 <= r$10.e.c; ++C$2) cols[C$2] = encode_col(C$2); for (var R$1 = r$10.s.r; R$1 <= r$10.e.r; ++R$1) { rr = encode_row(R$1); for (C$2 = r$10.s.c; C$2 <= r$10.e.c; ++C$2) { y$3 = cols[C$2] + rr; x$2 = dense ? (sheet["!data"][R$1] || [])[C$2] : sheet[y$3]; val$1 = ""; if (x$2 === undefined) continue; else if (x$2.F != null) { y$3 = x$2.F; if (!x$2.f) continue; val$1 = x$2.f; if (y$3.indexOf(":") == -1) y$3 = y$3 + ":" + y$3; } if (x$2.f != null) val$1 = x$2.f; else if (opts && opts.values === false) continue; else if (x$2.t == "z") continue; else if (x$2.t == "n" && x$2.v != null) val$1 = "" + x$2.v; else if (x$2.t == "b") val$1 = x$2.v ? "TRUE" : "FALSE"; else if (x$2.w !== undefined) val$1 = "'" + x$2.w; else if (x$2.v === undefined) continue; else if (x$2.t == "s") val$1 = "'" + x$2.v; else val$1 = "" + x$2.v; cmds[cmds.length] = y$3 + "=" + val$1; } } return cmds; } function sheet_add_json(_ws, js, opts) { var o$10 = opts || {}; var dense = _ws ? _ws["!data"] != null : o$10.dense; if (DENSE != null && dense == null) dense = DENSE; var offset = +!o$10.skipHeader; var ws = _ws || {}; if (!_ws && dense) ws["!data"] = []; var _R = 0, _C = 0; if (ws && o$10.origin != null) { if (typeof o$10.origin == "number") _R = o$10.origin; else { var _origin = typeof o$10.origin == "string" ? decode_cell(o$10.origin) : o$10.origin; _R = _origin.r; _C = _origin.c; } } var range = { s: { c: 0, r: 0 }, e: { c: _C, r: _R + js.length - 1 + offset } }; if (ws["!ref"]) { var _range = safe_decode_range(ws["!ref"]); range.e.c = Math.max(range.e.c, _range.e.c); range.e.r = Math.max(range.e.r, _range.e.r); if (_R == -1) { _R = _range.e.r + 1; range.e.r = _R + js.length - 1 + offset; } } else { if (_R == -1) { _R = 0; range.e.r = js.length - 1 + offset; } } var hdr = o$10.header || [], C$2 = 0; var ROW = []; js.forEach(function(JS, R$1) { if (dense && !ws["!data"][_R + R$1 + offset]) ws["!data"][_R + R$1 + offset] = []; if (dense) ROW = ws["!data"][_R + R$1 + offset]; keys(JS).forEach(function(k$2) { if ((C$2 = hdr.indexOf(k$2)) == -1) hdr[C$2 = hdr.length] = k$2; var v$3 = JS[k$2]; var t$6 = "z"; var z$2 = ""; var ref = dense ? "" : encode_col(_C + C$2) + encode_row(_R + R$1 + offset); var cell = dense ? ROW[_C + C$2] : ws[ref]; if (v$3 && typeof v$3 === "object" && !(v$3 instanceof Date)) { if (dense) ROW[_C + C$2] = v$3; else ws[ref] = v$3; } else { if (typeof v$3 == "number") t$6 = "n"; else if (typeof v$3 == "boolean") t$6 = "b"; else if (typeof v$3 == "string") t$6 = "s"; else if (v$3 instanceof Date) { t$6 = "d"; if (!o$10.UTC) v$3 = local_to_utc(v$3); if (!o$10.cellDates) { t$6 = "n"; v$3 = datenum(v$3); } z$2 = cell != null && cell.z && fmt_is_date(cell.z) ? cell.z : o$10.dateNF || table_fmt[14]; } else if (v$3 === null && o$10.nullError) { t$6 = "e"; v$3 = 0; } if (!cell) { if (!dense) ws[ref] = cell = { t: t$6, v: v$3 }; else ROW[_C + C$2] = cell = { t: t$6, v: v$3 }; } else { cell.t = t$6; cell.v = v$3; delete cell.w; delete cell.R; if (z$2) cell.z = z$2; } if (z$2) cell.z = z$2; } }); }); range.e.c = Math.max(range.e.c, _C + hdr.length - 1); var __R = encode_row(_R); if (dense && !ws["!data"][_R]) ws["!data"][_R] = []; if (offset) for (C$2 = 0; C$2 < hdr.length; ++C$2) { if (dense) ws["!data"][_R][C$2 + _C] = { t: "s", v: hdr[C$2] }; else ws[encode_col(C$2 + _C) + __R] = { t: "s", v: hdr[C$2] }; } ws["!ref"] = encode_range(range); return ws; } function json_to_sheet(js, opts) { return sheet_add_json(null, js, opts); } function ws_get_cell_stub(ws, R$1, C$2) { if (typeof R$1 == "string") { if (ws["!data"] != null) { var RC = decode_cell(R$1); if (!ws["!data"][RC.r]) ws["!data"][RC.r] = []; return ws["!data"][RC.r][RC.c] || (ws["!data"][RC.r][RC.c] = { t: "z" }); } return ws[R$1] || (ws[R$1] = { t: "z" }); } if (typeof R$1 != "number") return ws_get_cell_stub(ws, encode_cell(R$1)); return ws_get_cell_stub(ws, encode_col(C$2 || 0) + encode_row(R$1)); } function wb_sheet_idx(wb, sh) { if (typeof sh == "number") { if (sh >= 0 && wb.SheetNames.length > sh) return sh; throw new Error("Cannot find sheet # " + sh); } else if (typeof sh == "string") { var idx = wb.SheetNames.indexOf(sh); if (idx > -1) return idx; throw new Error("Cannot find sheet name |" + sh + "|"); } else throw new Error("Cannot find sheet |" + sh + "|"); } function book_new(ws, wsname) { var wb = { SheetNames: [], Sheets: {} }; if (ws) book_append_sheet(wb, ws, wsname || "Sheet1"); return wb; } function book_append_sheet(wb, ws, name, roll) { var i$7 = 1; if (!name) { for (; i$7 <= 65535; ++i$7, name = undefined) if (wb.SheetNames.indexOf(name = "Sheet" + i$7) == -1) break; } if (!name || wb.SheetNames.length >= 65535) throw new Error("Too many worksheets"); if (roll && wb.SheetNames.indexOf(name) >= 0 && name.length < 32) { var m$3 = name.match(/\d+$/); i$7 = m$3 && +m$3[0] || 0; var root = m$3 && name.slice(0, m$3.index) || name; for (++i$7; i$7 <= 65535; ++i$7) if (wb.SheetNames.indexOf(name = root + i$7) == -1) break; } check_ws_name(name); if (wb.SheetNames.indexOf(name) >= 0) throw new Error("Worksheet with name |" + name + "| already exists!"); wb.SheetNames.push(name); wb.Sheets[name] = ws; return name; } function book_set_sheet_visibility(wb, sh, vis) { if (!wb.Workbook) wb.Workbook = {}; if (!wb.Workbook.Sheets) wb.Workbook.Sheets = []; var idx = wb_sheet_idx(wb, sh); if (!wb.Workbook.Sheets[idx]) wb.Workbook.Sheets[idx] = {}; switch (vis) { case 0: case 1: case 2: break; default: throw new Error("Bad sheet visibility setting " + vis); } wb.Workbook.Sheets[idx].Hidden = vis; } function cell_set_number_format(cell, fmt) { cell.z = fmt; return cell; } function cell_set_hyperlink(cell, target, tooltip) { if (!target) { delete cell.l; } else { cell.l = { Target: target }; if (tooltip) cell.l.Tooltip = tooltip; } return cell; } function cell_set_internal_link(cell, range, tooltip) { return cell_set_hyperlink(cell, "#" + range, tooltip); } function cell_add_comment(cell, text$2, author) { if (!cell.c) cell.c = []; cell.c.push({ t: text$2, a: author || "SheetJS" }); } function sheet_set_array_formula(ws, range, formula, dynamic) { var rng = typeof range != "string" ? range : safe_decode_range(range); var rngstr = typeof range == "string" ? range : encode_range(range); for (var R$1 = rng.s.r; R$1 <= rng.e.r; ++R$1) for (var C$2 = rng.s.c; C$2 <= rng.e.c; ++C$2) { var cell = ws_get_cell_stub(ws, R$1, C$2); cell.t = "n"; cell.F = rngstr; delete cell.v; if (R$1 == rng.s.r && C$2 == rng.s.c) { cell.f = formula; if (dynamic) cell.D = true; } } var wsr = decode_range(ws["!ref"]); if (wsr.s.r > rng.s.r) wsr.s.r = rng.s.r; if (wsr.s.c > rng.s.c) wsr.s.c = rng.s.c; if (wsr.e.r < rng.e.r) wsr.e.r = rng.e.r; if (wsr.e.c < rng.e.c) wsr.e.c = rng.e.c; ws["!ref"] = encode_range(wsr); return ws; } function set_readable(R$1) { _Readable = R$1; } function write_csv_stream(sheet, opts) { var stream = _Readable(); var o$10 = opts == null ? {} : opts; if (sheet == null || sheet["!ref"] == null) { stream.push(null); return stream; } var r$10 = safe_decode_range(sheet["!ref"]); var FS = o$10.FS !== undefined ? o$10.FS : ",", fs = FS.charCodeAt(0); var RS = o$10.RS !== undefined ? o$10.RS : "\n", rs = RS.charCodeAt(0); var row = "", cols = []; var colinfo = o$10.skipHidden && sheet["!cols"] || []; var rowinfo = o$10.skipHidden && sheet["!rows"] || []; for (var C$2 = r$10.s.c; C$2 <= r$10.e.c; ++C$2) if (!(colinfo[C$2] || {}).hidden) cols[C$2] = encode_col(C$2); var R$1 = r$10.s.r; var BOM = false, w$2 = 0; stream._read = function() { if (!BOM) { BOM = true; return stream.push(""); } while (R$1 <= r$10.e.r) { ++R$1; if ((rowinfo[R$1 - 1] || {}).hidden) continue; row = make_csv_row(sheet, r$10, R$1 - 1, cols, fs, rs, FS, w$2, o$10); if (row != null) { if (row || o$10.blankrows !== false) return stream.push((w$2++ ? RS : "") + row); } } return stream.push(null); }; return stream; } function write_html_stream(ws, opts) { var stream = _Readable(); var o$10 = opts || {}; var header = o$10.header != null ? o$10.header : HTML_BEGIN; var footer = o$10.footer != null ? o$10.footer : HTML_END; stream.push(header); var r$10 = decode_range(ws["!ref"]); stream.push(make_html_preamble(ws, r$10, o$10)); var R$1 = r$10.s.r; var end = false; stream._read = function() { if (R$1 > r$10.e.r) { if (!end) { end = true; stream.push("" + footer); } return stream.push(null); } while (R$1 <= r$10.e.r) { stream.push(make_html_row(ws, r$10, R$1, o$10)); ++R$1; break; } }; return stream; } function write_json_stream(sheet, opts) { var stream = _Readable({ objectMode: true }); if (sheet == null || sheet["!ref"] == null) { stream.push(null); return stream; } var val$1 = { t: "n", v: 0 }, header = 0, offset = 1, hdr = [], v$3 = 0, vv = ""; var r$10 = { s: { r: 0, c: 0 }, e: { r: 0, c: 0 } }; var o$10 = opts || {}; var range = o$10.range != null ? o$10.range : sheet["!ref"]; if (o$10.header === 1) header = 1; else if (o$10.header === "A") header = 2; else if (Array.isArray(o$10.header)) header = 3; switch (typeof range) { case "string": r$10 = safe_decode_range(range); break; case "number": r$10 = safe_decode_range(sheet["!ref"]); r$10.s.r = range; break; default: r$10 = range; } if (header > 0) offset = 0; var rr = encode_row(r$10.s.r); var cols = []; var counter = 0; var dense = sheet["!data"] != null; var R$1 = r$10.s.r, C$2 = 0; var header_cnt = {}; if (dense && !sheet["!data"][R$1]) sheet["!data"][R$1] = []; var colinfo = o$10.skipHidden && sheet["!cols"] || []; var rowinfo = o$10.skipHidden && sheet["!rows"] || []; for (C$2 = r$10.s.c; C$2 <= r$10.e.c; ++C$2) { if ((colinfo[C$2] || {}).hidden) continue; cols[C$2] = encode_col(C$2); val$1 = dense ? sheet["!data"][R$1][C$2] : sheet[cols[C$2] + rr]; switch (header) { case 1: hdr[C$2] = C$2 - r$10.s.c; break; case 2: hdr[C$2] = cols[C$2]; break; case 3: hdr[C$2] = o$10.header[C$2 - r$10.s.c]; break; default: if (val$1 == null) val$1 = { w: "__EMPTY", t: "s" }; vv = v$3 = format_cell(val$1, null, o$10); counter = header_cnt[v$3] || 0; if (!counter) header_cnt[v$3] = 1; else { do { vv = v$3 + "_" + counter++; } while (header_cnt[vv]); header_cnt[v$3] = counter; header_cnt[vv] = 1; } hdr[C$2] = vv; } } R$1 = r$10.s.r + offset; stream._read = function() { while (R$1 <= r$10.e.r) { if ((rowinfo[R$1 - 1] || {}).hidden) continue; var row = make_json_row(sheet, r$10, R$1, cols, header, hdr, o$10); ++R$1; if (row.isempty === false || (header === 1 ? o$10.blankrows !== false : !!o$10.blankrows)) { stream.push(row.row); return; } } return stream.push(null); }; return stream; } function write_xlml_stream(wb, o$10) { var stream = _Readable(); var opts = o$10 == null ? {} : o$10; var stride = +opts.stride || 10; if (!wb.SSF) wb.SSF = dup(table_fmt); if (wb.SSF) { make_ssf(); SSF_load_table(wb.SSF); opts.revssf = evert_num(wb.SSF); opts.revssf[wb.SSF[65535]] = 0; opts.ssf = wb.SSF; opts.cellXfs = []; get_cell_style(opts.cellXfs, {}, { revssf: { "General": 0 } }); } wb.SheetNames.forEach(function(n$9) { var ws$1 = wb.Sheets[n$9]; if (!ws$1 || !ws$1["!ref"]) return; var range$1 = decode_range(ws$1["!ref"]); var dense$1 = ws$1["!data"] != null; var ddata = dense$1 ? ws$1["!data"] : []; var addr$1 = { r: 0, c: 0 }; for (var R$2 = range$1.s.r; R$2 <= range$1.e.r; ++R$2) { addr$1.r = R$2; if (dense$1 && !ddata[R$2]) continue; for (var C$2 = range$1.s.c; C$2 <= range$1.e.c; ++C$2) { addr$1.c = C$2; var cell = dense$1 ? ddata[R$2][C$2] : ws$1[encode_col(C$2) + encode_row(R$2)]; if (!cell) continue; if (cell.t == "d" && cell.z == null) { cell = dup(cell); cell.z = table_fmt[14]; } void get_cell_style(opts.cellXfs, cell, opts); } } }); var sty = write_sty_xlml(wb, opts); var stage = 0, wsidx = 0, ws = wb.Sheets[wb.SheetNames[wsidx]], range = safe_decode_range(ws), R$1 = -1, T$3 = false; var marr = [], mi = 0, dense = false, darr = [], addr = { r: 0, c: 0 }; stream._read = function() { switch (stage) { case 0: { stage = 1; stream.push(XML_HEADER); stream.push(""); } break; case 1: { stage = 2; stream.push(write_props_xlml(wb, opts)); stream.push(write_wb_xlml(wb, opts)); } break; case 2: { stage = 3; stream.push(sty); stream.push(write_names_xlml(wb, opts)); } break; case 3: { T$3 = false; if (wsidx >= wb.SheetNames.length) { stage = -1; stream.push(""); break; } stream.push(""); ws = wb.Sheets[wb.SheetNames[wsidx]]; if (!ws) { stream.push(""); return void ++wsidx; } var names = write_ws_xlml_names(ws, opts, wsidx, wb); if (names.length) stream.push("" + names + ""); if (!ws["!ref"]) return stage = 5; range = safe_decode_range(ws["!ref"]); R$1 = range.s.r; stage = 4; } break; case 4: { if (R$1 < 0 || R$1 > range.e.r) { if (T$3) stream.push(""); return void (stage = 5); } if (R$1 <= range.s.r) { if (ws["!cols"]) ws["!cols"].forEach(function(n$9, i$7) { process_col(n$9); var w$2 = !!n$9.width; var p$3 = col_obj_w(i$7, n$9); var k$2 = { "ss:Index": i$7 + 1 }; if (w$2) k$2["ss:Width"] = width2px(p$3.width); if (n$9.hidden) k$2["ss:Hidden"] = "1"; if (!T$3) { T$3 = true; stream.push(""); } stream.push(writextag("Column", null, k$2)); }); dense = ws["!data"] != null; if (dense) darr = ws["!data"]; addr.r = addr.c = 0; } for (var cnt = 0; R$1 <= range.e.r && cnt < stride; ++R$1, ++cnt) { var row = [write_ws_xlml_row(R$1, (ws["!rows"] || [])[R$1])]; addr.r = R$1; if (!(dense && !darr[R$1])) for (var C$2 = range.s.c; C$2 <= range.e.c; ++C$2) { addr.c = C$2; var skip = false; for (mi = 0; mi != marr.length; ++mi) { if (marr[mi].s.c > C$2) continue; if (marr[mi].s.r > R$1) continue; if (marr[mi].e.c < C$2) continue; if (marr[mi].e.r < R$1) continue; if (marr[mi].s.c != C$2 || marr[mi].s.r != R$1) skip = true; break; } if (skip) continue; var ref = encode_col(C$2) + encode_row(R$1), cell = dense ? darr[R$1][C$2] : ws[ref]; row.push(write_ws_xlml_cell(cell, ref, ws, opts, wsidx, wb, addr)); } row.push(""); if (!T$3) { T$3 = true; stream.push("
"); } stream.push(row.join("")); } } break; case 5: { stream.push(write_ws_xlml_wsopts(ws, opts, wsidx, wb)); if (ws && ws["!autofilter"]) stream.push(""); stream.push(""); wsidx++; R$1 = -1; return void (stage = 3); } case -1: { stage = -2; stream.push(""); } break; case -2: stream.push(null); break; } }; return stream; } var XLSX, current_codepage, current_ansi, $cptable, VALID_ANSI, CS2CP, set_ansi, set_cp, debom, _getchar, _getansi, DENSE, DIF_XL, Base64_map, has_buf, Buffer_from, buf_utf16le, s2a, bconcat, chr0, chr1, p2_32, days, months, table_fmt, SSF_default_map, SSF_default_str, pct1, frac1, dec1, closeparen, phone, SSF_abstime, cfregex2, SSF, SSFImplicit, dateNFregex, bad_formats, CRC32, CFB, _fs, dnthresh, dnthresh1, dnthresh2, pdre1, pdre2, pdre3, FDRE1, FDRE2, FDISO, utc_append_works, lower_months, split_regex, xml_boundary, str_match_xml_ns, str_match_xml_ns_g, str_remove_xml_ns_g, str_match_xml_ig, XML_HEADER, attregexg, tagregex1, tagregex2, tagregex, nsregex, nsregex2, encodings, rencoding, unescapexml, decregex, charegex, htmlcharegex, xlml_fixstr, utf8corpus, utf8read, utf8write, htmldecode, vtvregex, vtmregex, wtregex, xlmlregex, XMLNS, XMLNS_main, XLMLNS, ___toBuffer, __toBuffer, ___utf16le, __utf16le, ___hexlify, __hexlify, ___utf8, __utf8, ___lpstr, __lpstr, ___cpstr, __cpstr, ___lpwstr, __lpwstr, ___lpp4, __lpp4, ___8lpp4, __8lpp4, ___double, __double, is_buf, __readUInt8, __readUInt16LE, __readInt16LE, __readUInt32LE, __readInt32LE, __readInt32BE, __writeUInt32LE, __writeInt32LE, __writeUInt16LE, parse_BrtCommentText, parse_XLSBCodeName, write_XLSBCodeName, parse_XLNameWideString, parse_RelID, write_RelID, parse_UncheckedRfX, write_UncheckedRfX, VT_I2, VT_I4, VT_BOOL, VT_VARIANT, VT_UI4, VT_FILETIME, VT_BLOB, VT_CF, VT_VECTOR_VARIANT, VT_VECTOR_LPSTR, VT_STRING, VT_USTR, VT_CUSTOM, DocSummaryPIDDSI, SummaryPIDSI, CountryEnum, XLSFillPattern, _XLSIcv, XLSIcv, BErr, RBErr, XLSLblBuiltIn, ct2type, CT_LIST, RELS, CT_ODS, CORE_PROPS, EXT_PROPS, PseudoPropsPairs, custregex, XLMLDocPropsMap, evert_XLMLDPM, XLSPSSkip, parse_Ref, FtTab, parse_BIFF2Format, write_BIFF4XF, parse_XLHeaderFooter, parse_BIFF5OT, parse_Blank, parse_Scl, parse_String, DBF_SUPPORTED_VERSIONS, DBF, SYLK, DIF, ETH, PRN, WK_, parse_rs, rs_to_html, sitregex, sirregex, sstr1, sstr2, straywsregex, write_BrtSSTItem, crypto_CreateXorArray_Method1, crypto_DecryptData_Method1, crypto_MakeXorDecryptor, DEF_MDW, MAX_MDW, MIN_MDW, MDW, DEF_PPI, PPI, XLMLPatternTypeMap, cellXF_uint, cellXF_bool, parse_sty_xml, XLSBFillPTNames, rev_XLSBFillPTNames, parse_BrtFill, parse_BrtBorder, XLSXThemeClrScheme, parse_BrtCommentAuthor, CT_VBA, VBAFMTS, rc_to_a1, crefregex, a1_to_rc, parse_PtgMemErr, parse_PtgMemNoMem, parse_PtgTbl, parse_PtgElfCol, parse_PtgElfColS, parse_PtgElfColSV, parse_PtgElfColV, parse_PtgElfRadical, parse_PtgElfRadicalLel, parse_PtgElfRadicalS, parse_PtgElfRw, parse_PtgElfRwV, PtgListRT, PtgTypes, PtgDupes, Ptg18, Ptg19, PtgBinOp, parse_XLSBArrayParsedFormula, parse_XLSBCellParsedFormula, parse_XLSBNameParsedFormula, parse_XLSBSharedParsedFormula, write_XLSBNameParsedFormula, Cetab, Ftab, FtabArgc, strs, _ssfopts, browser_has_Map, mergecregex, hlinkregex, dimregex, colregex, afregex, marginregex, sheetprregex, sheetprot_deffalse, sheetprot_deftrue, sviewregex, parse_ws_xml_data, parse_BrtWsDim, write_BrtWsDim, parse_BrtMergeCell, write_BrtMergeCell, BrtMarginKeys, WBPropsDef, WBViewDef, SheetDef, CalcPrDef, badchars, wbnsregex, attregexg2, attregex2, XLMLFormatMap, CONTINUE_RT, PSCLSID, XLSBRecordEnum, XLSRecordEnum, b8oid, b8ocnts, HTML_BEGIN, HTML_END, write_styles_ods, write_content_ods, subarray, numbers_lut_new, USE_WIDE_ROWS, qreg, utils$1, _Readable, __stream, version$3, xlsx_default; var init_xlsx = __esmMin((() => { XLSX = {}; XLSX.version = "0.20.3"; current_codepage = 1200, current_ansi = 1252; ; VALID_ANSI = [ 874, 932, 936, 949, 950, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1e4 ]; CS2CP = { 0: 1252, 1: 65001, 2: 65001, 77: 1e4, 128: 932, 129: 949, 130: 1361, 134: 936, 136: 950, 161: 1253, 162: 1254, 163: 1258, 177: 1255, 178: 1256, 186: 1257, 204: 1251, 222: 874, 238: 1250, 255: 1252, 69: 6969 }; set_ansi = function(cp) { if (VALID_ANSI.indexOf(cp) == -1) return; current_ansi = CS2CP[0] = cp; }; set_cp = function(cp) { current_codepage = cp; set_ansi(cp); }; debom = function(data) { var c1 = data.charCodeAt(0), c2 = data.charCodeAt(1); if (c1 == 255 && c2 == 254) return utf16leread(data.slice(2)); if (c1 == 254 && c2 == 255) return utf16beread(data.slice(2)); if (c1 == 65279) return data.slice(1); return data; }; _getchar = function _gc1(x$2) { return String.fromCharCode(x$2); }; _getansi = function _ga1(x$2) { return String.fromCharCode(x$2); }; DENSE = null; DIF_XL = true; Base64_map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; has_buf = /* @__PURE__ */ (function() { return typeof Buffer !== "undefined" && typeof process !== "undefined" && typeof process.versions !== "undefined" && !!process.versions.node; })(); Buffer_from = /* @__PURE__ */ (function() { if (typeof Buffer !== "undefined") { var nbfs = !Buffer.from; if (!nbfs) try { Buffer.from("foo", "utf8"); } catch (e$10) { nbfs = true; } return nbfs ? function(buf, enc) { return enc ? new Buffer(buf, enc) : new Buffer(buf); } : Buffer.from.bind(Buffer); } return function() {}; })(); buf_utf16le = /* @__PURE__ */ (function() { if (typeof Buffer === "undefined") return false; var x$2 = Buffer_from([65, 0]); if (!x$2) return false; var o$10 = x$2.toString("utf16le"); return o$10.length == 1; })(); s2a = function s2a$1(s$5) { if (has_buf) return Buffer_from(s$5, "binary"); return s$5.split("").map(function(x$2) { return x$2.charCodeAt(0) & 255; }); }; bconcat = has_buf ? function(bufs) { return Buffer.concat(bufs.map(function(buf) { return Buffer.isBuffer(buf) ? buf : Buffer_from(buf); })); } : function(bufs) { if (typeof Uint8Array !== "undefined") { var i$7 = 0, maxlen = 0; for (i$7 = 0; i$7 < bufs.length; ++i$7) maxlen += bufs[i$7].length; var o$10 = new Uint8Array(maxlen); var len = 0; for (i$7 = 0, maxlen = 0; i$7 < bufs.length; maxlen += len, ++i$7) { len = bufs[i$7].length; if (bufs[i$7] instanceof Uint8Array) o$10.set(bufs[i$7], maxlen); else if (typeof bufs[i$7] == "string") o$10.set(new Uint8Array(s2a(bufs[i$7])), maxlen); else o$10.set(new Uint8Array(bufs[i$7]), maxlen); } return o$10; } return [].concat.apply([], bufs.map(function(buf) { return Array.isArray(buf) ? buf : [].slice.call(buf); })); }; chr0 = /\u0000/g, chr1 = /[\u0001-\u0006]/g; p2_32 = /* @__PURE__ */ Math.pow(2, 32); days = [ ["Sun", "Sunday"], ["Mon", "Monday"], ["Tue", "Tuesday"], ["Wed", "Wednesday"], ["Thu", "Thursday"], ["Fri", "Friday"], ["Sat", "Saturday"] ]; months = [ [ "J", "Jan", "January" ], [ "F", "Feb", "February" ], [ "M", "Mar", "March" ], [ "A", "Apr", "April" ], [ "M", "May", "May" ], [ "J", "Jun", "June" ], [ "J", "Jul", "July" ], [ "A", "Aug", "August" ], [ "S", "Sep", "September" ], [ "O", "Oct", "October" ], [ "N", "Nov", "November" ], [ "D", "Dec", "December" ] ]; table_fmt = { 0: "General", 1: "0", 2: "0.00", 3: "#,##0", 4: "#,##0.00", 9: "0%", 10: "0.00%", 11: "0.00E+00", 12: "# ?/?", 13: "# ??/??", 14: "m/d/yy", 15: "d-mmm-yy", 16: "d-mmm", 17: "mmm-yy", 18: "h:mm AM/PM", 19: "h:mm:ss AM/PM", 20: "h:mm", 21: "h:mm:ss", 22: "m/d/yy h:mm", 37: "#,##0 ;(#,##0)", 38: "#,##0 ;[Red](#,##0)", 39: "#,##0.00;(#,##0.00)", 40: "#,##0.00;[Red](#,##0.00)", 45: "mm:ss", 46: "[h]:mm:ss", 47: "mmss.0", 48: "##0.0E+0", 49: "@", 56: "\"上午/下午 \"hh\"時\"mm\"分\"ss\"秒 \"" }; SSF_default_map = { 5: 37, 6: 38, 7: 39, 8: 40, 23: 0, 24: 0, 25: 0, 26: 0, 27: 14, 28: 14, 29: 14, 30: 14, 31: 14, 50: 14, 51: 14, 52: 14, 53: 14, 54: 14, 55: 14, 56: 14, 57: 14, 58: 14, 59: 1, 60: 2, 61: 3, 62: 4, 67: 9, 68: 10, 69: 12, 70: 13, 71: 14, 72: 14, 73: 15, 74: 16, 75: 17, 76: 20, 77: 21, 78: 22, 79: 45, 80: 46, 81: 47, 82: 0 }; SSF_default_str = { 5: "\"$\"#,##0_);\\(\"$\"#,##0\\)", 63: "\"$\"#,##0_);\\(\"$\"#,##0\\)", 6: "\"$\"#,##0_);[Red]\\(\"$\"#,##0\\)", 64: "\"$\"#,##0_);[Red]\\(\"$\"#,##0\\)", 7: "\"$\"#,##0.00_);\\(\"$\"#,##0.00\\)", 65: "\"$\"#,##0.00_);\\(\"$\"#,##0.00\\)", 8: "\"$\"#,##0.00_);[Red]\\(\"$\"#,##0.00\\)", 66: "\"$\"#,##0.00_);[Red]\\(\"$\"#,##0.00\\)", 41: "_(* #,##0_);_(* \\(#,##0\\);_(* \"-\"_);_(@_)", 42: "_(\"$\"* #,##0_);_(\"$\"* \\(#,##0\\);_(\"$\"* \"-\"_);_(@_)", 43: "_(* #,##0.00_);_(* \\(#,##0.00\\);_(* \"-\"??_);_(@_)", 44: "_(\"$\"* #,##0.00_);_(\"$\"* \\(#,##0.00\\);_(\"$\"* \"-\"??_);_(@_)" }; pct1 = /%/g; frac1 = /# (\?+)( ?)\/( ?)(\d+)/; dec1 = /^#*0*\.([0#]+)/; closeparen = /\)[^)]*[0#]/; phone = /\(###\) ###\\?-####/; SSF_abstime = /\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/; cfregex2 = /\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/; SSF = { format: SSF_format, load: SSF_load, _table: table_fmt, load_table: SSF_load_table, parse_date_code: SSF_parse_date_code, is_date: fmt_is_date, get_table: function get_table() { return SSF._table = table_fmt; } }; SSFImplicit = { "5": "\"$\"#,##0_);\\(\"$\"#,##0\\)", "6": "\"$\"#,##0_);[Red]\\(\"$\"#,##0\\)", "7": "\"$\"#,##0.00_);\\(\"$\"#,##0.00\\)", "8": "\"$\"#,##0.00_);[Red]\\(\"$\"#,##0.00\\)", "23": "General", "24": "General", "25": "General", "26": "General", "27": "m/d/yy", "28": "m/d/yy", "29": "m/d/yy", "30": "m/d/yy", "31": "m/d/yy", "32": "h:mm:ss", "33": "h:mm:ss", "34": "h:mm:ss", "35": "h:mm:ss", "36": "m/d/yy", "41": "_(* #,##0_);_(* (#,##0);_(* \"-\"_);_(@_)", "42": "_(\"$\"* #,##0_);_(\"$\"* (#,##0);_(\"$\"* \"-\"_);_(@_)", "43": "_(* #,##0.00_);_(* (#,##0.00);_(* \"-\"??_);_(@_)", "44": "_(\"$\"* #,##0.00_);_(\"$\"* (#,##0.00);_(\"$\"* \"-\"??_);_(@_)", "50": "m/d/yy", "51": "m/d/yy", "52": "m/d/yy", "53": "m/d/yy", "54": "m/d/yy", "55": "m/d/yy", "56": "m/d/yy", "57": "m/d/yy", "58": "m/d/yy", "59": "0", "60": "0.00", "61": "#,##0", "62": "#,##0.00", "63": "\"$\"#,##0_);\\(\"$\"#,##0\\)", "64": "\"$\"#,##0_);[Red]\\(\"$\"#,##0\\)", "65": "\"$\"#,##0.00_);\\(\"$\"#,##0.00\\)", "66": "\"$\"#,##0.00_);[Red]\\(\"$\"#,##0.00\\)", "67": "0%", "68": "0.00%", "69": "# ?/?", "70": "# ??/??", "71": "m/d/yy", "72": "m/d/yy", "73": "d-mmm-yy", "74": "d-mmm", "75": "mmm-yy", "76": "h:mm", "77": "h:mm:ss", "78": "m/d/yy h:mm", "79": "mm:ss", "80": "[h]:mm:ss", "81": "mmss.0" }; dateNFregex = /[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g; bad_formats = { "d.m": "d\\.m" }; CRC32 = /* @__PURE__ */ (function() { var CRC32$1 = {}; CRC32$1.version = "1.2.0"; function signed_crc_table() { var c$7 = 0, table = new Array(256); for (var n$9 = 0; n$9 != 256; ++n$9) { c$7 = n$9; c$7 = c$7 & 1 ? -306674912 ^ c$7 >>> 1 : c$7 >>> 1; c$7 = c$7 & 1 ? -306674912 ^ c$7 >>> 1 : c$7 >>> 1; c$7 = c$7 & 1 ? -306674912 ^ c$7 >>> 1 : c$7 >>> 1; c$7 = c$7 & 1 ? -306674912 ^ c$7 >>> 1 : c$7 >>> 1; c$7 = c$7 & 1 ? -306674912 ^ c$7 >>> 1 : c$7 >>> 1; c$7 = c$7 & 1 ? -306674912 ^ c$7 >>> 1 : c$7 >>> 1; c$7 = c$7 & 1 ? -306674912 ^ c$7 >>> 1 : c$7 >>> 1; c$7 = c$7 & 1 ? -306674912 ^ c$7 >>> 1 : c$7 >>> 1; table[n$9] = c$7; } return typeof Int32Array !== "undefined" ? new Int32Array(table) : table; } var T0 = signed_crc_table(); function slice_by_16_tables(T$3) { var c$7 = 0, v$3 = 0, n$9 = 0, table = typeof Int32Array !== "undefined" ? new Int32Array(4096) : new Array(4096); for (n$9 = 0; n$9 != 256; ++n$9) table[n$9] = T$3[n$9]; for (n$9 = 0; n$9 != 256; ++n$9) { v$3 = T$3[n$9]; for (c$7 = 256 + n$9; c$7 < 4096; c$7 += 256) v$3 = table[c$7] = v$3 >>> 8 ^ T$3[v$3 & 255]; } var out = []; for (n$9 = 1; n$9 != 16; ++n$9) out[n$9 - 1] = typeof Int32Array !== "undefined" && typeof table.subarray == "function" ? table.subarray(n$9 * 256, n$9 * 256 + 256) : table.slice(n$9 * 256, n$9 * 256 + 256); return out; } var TT = slice_by_16_tables(T0); var T1 = TT[0], T2 = TT[1], T3 = TT[2], T4 = TT[3], T5 = TT[4]; var T6 = TT[5], T7 = TT[6], T8 = TT[7], T9 = TT[8], Ta = TT[9]; var Tb = TT[10], Tc$1 = TT[11], Td = TT[12], Te$1 = TT[13], Tf = TT[14]; function crc32_bstr(bstr, seed) { var C$2 = seed ^ -1; for (var i$7 = 0, L$2 = bstr.length; i$7 < L$2;) C$2 = C$2 >>> 8 ^ T0[(C$2 ^ bstr.charCodeAt(i$7++)) & 255]; return ~C$2; } function crc32_buf(B$2, seed) { var C$2 = seed ^ -1, L$2 = B$2.length - 15, i$7 = 0; for (; i$7 < L$2;) C$2 = Tf[B$2[i$7++] ^ C$2 & 255] ^ Te$1[B$2[i$7++] ^ C$2 >> 8 & 255] ^ Td[B$2[i$7++] ^ C$2 >> 16 & 255] ^ Tc$1[B$2[i$7++] ^ C$2 >>> 24] ^ Tb[B$2[i$7++]] ^ Ta[B$2[i$7++]] ^ T9[B$2[i$7++]] ^ T8[B$2[i$7++]] ^ T7[B$2[i$7++]] ^ T6[B$2[i$7++]] ^ T5[B$2[i$7++]] ^ T4[B$2[i$7++]] ^ T3[B$2[i$7++]] ^ T2[B$2[i$7++]] ^ T1[B$2[i$7++]] ^ T0[B$2[i$7++]]; L$2 += 15; while (i$7 < L$2) C$2 = C$2 >>> 8 ^ T0[(C$2 ^ B$2[i$7++]) & 255]; return ~C$2; } function crc32_str(str, seed) { var C$2 = seed ^ -1; for (var i$7 = 0, L$2 = str.length, c$7 = 0, d$5 = 0; i$7 < L$2;) { c$7 = str.charCodeAt(i$7++); if (c$7 < 128) { C$2 = C$2 >>> 8 ^ T0[(C$2 ^ c$7) & 255]; } else if (c$7 < 2048) { C$2 = C$2 >>> 8 ^ T0[(C$2 ^ (192 | c$7 >> 6 & 31)) & 255]; C$2 = C$2 >>> 8 ^ T0[(C$2 ^ (128 | c$7 & 63)) & 255]; } else if (c$7 >= 55296 && c$7 < 57344) { c$7 = (c$7 & 1023) + 64; d$5 = str.charCodeAt(i$7++) & 1023; C$2 = C$2 >>> 8 ^ T0[(C$2 ^ (240 | c$7 >> 8 & 7)) & 255]; C$2 = C$2 >>> 8 ^ T0[(C$2 ^ (128 | c$7 >> 2 & 63)) & 255]; C$2 = C$2 >>> 8 ^ T0[(C$2 ^ (128 | d$5 >> 6 & 15 | (c$7 & 3) << 4)) & 255]; C$2 = C$2 >>> 8 ^ T0[(C$2 ^ (128 | d$5 & 63)) & 255]; } else { C$2 = C$2 >>> 8 ^ T0[(C$2 ^ (224 | c$7 >> 12 & 15)) & 255]; C$2 = C$2 >>> 8 ^ T0[(C$2 ^ (128 | c$7 >> 6 & 63)) & 255]; C$2 = C$2 >>> 8 ^ T0[(C$2 ^ (128 | c$7 & 63)) & 255]; } } return ~C$2; } CRC32$1.table = T0; CRC32$1.bstr = crc32_bstr; CRC32$1.buf = crc32_buf; CRC32$1.str = crc32_str; return CRC32$1; })(); CFB = /* @__PURE__ */ (function _CFB() { var exports$1 = {}; exports$1.version = "1.2.2"; function namecmp(l$3, r$10) { var L$2 = l$3.split("/"), R$1 = r$10.split("/"); for (var i$8 = 0, c$7 = 0, Z$1 = Math.min(L$2.length, R$1.length); i$8 < Z$1; ++i$8) { if (c$7 = L$2[i$8].length - R$1[i$8].length) return c$7; if (L$2[i$8] != R$1[i$8]) return L$2[i$8] < R$1[i$8] ? -1 : 1; } return L$2.length - R$1.length; } function dirname(p$3) { if (p$3.charAt(p$3.length - 1) == "/") return p$3.slice(0, -1).indexOf("/") === -1 ? p$3 : dirname(p$3.slice(0, -1)); var c$7 = p$3.lastIndexOf("/"); return c$7 === -1 ? p$3 : p$3.slice(0, c$7 + 1); } function filename(p$3) { if (p$3.charAt(p$3.length - 1) == "/") return filename(p$3.slice(0, -1)); var c$7 = p$3.lastIndexOf("/"); return c$7 === -1 ? p$3 : p$3.slice(c$7 + 1); } function write_dos_date(buf, date) { if (typeof date === "string") date = new Date(date); var hms = date.getHours(); hms = hms << 6 | date.getMinutes(); hms = hms << 5 | date.getSeconds() >>> 1; buf.write_shift(2, hms); var ymd = date.getFullYear() - 1980; ymd = ymd << 4 | date.getMonth() + 1; ymd = ymd << 5 | date.getDate(); buf.write_shift(2, ymd); } function parse_dos_date(buf) { var hms = buf.read_shift(2) & 65535; var ymd = buf.read_shift(2) & 65535; var val$1 = new Date(); var d$5 = ymd & 31; ymd >>>= 5; var m$3 = ymd & 15; ymd >>>= 4; val$1.setMilliseconds(0); val$1.setFullYear(ymd + 1980); val$1.setMonth(m$3 - 1); val$1.setDate(d$5); var S$4 = hms & 31; hms >>>= 5; var M$3 = hms & 63; hms >>>= 6; val$1.setHours(hms); val$1.setMinutes(M$3); val$1.setSeconds(S$4 << 1); return val$1; } function parse_extra_field(blob) { prep_blob(blob, 0); var o$10 = {}; var flags = 0; while (blob.l <= blob.length - 4) { var type = blob.read_shift(2); var sz = blob.read_shift(2), tgt = blob.l + sz; var p$3 = {}; switch (type) { case 21589: { flags = blob.read_shift(1); if (flags & 1) p$3.mtime = blob.read_shift(4); if (sz > 5) { if (flags & 2) p$3.atime = blob.read_shift(4); if (flags & 4) p$3.ctime = blob.read_shift(4); } if (p$3.mtime) p$3.mt = new Date(p$3.mtime * 1e3); } break; case 1: { var sz1 = blob.read_shift(4), sz2 = blob.read_shift(4); p$3.usz = sz2 * Math.pow(2, 32) + sz1; sz1 = blob.read_shift(4); sz2 = blob.read_shift(4); p$3.csz = sz2 * Math.pow(2, 32) + sz1; } break; } blob.l = tgt; o$10[type] = p$3; } return o$10; } var fs; function get_fs() { return fs || (fs = _fs); } function parse(file, options) { if (file[0] == 80 && file[1] == 75) return parse_zip$1(file, options); if ((file[0] | 32) == 109 && (file[1] | 32) == 105) return parse_mad(file, options); if (file.length < 512) throw new Error("CFB file size " + file.length + " < 512"); var mver = 3; var ssz = 512; var nmfs = 0; var difat_sec_cnt = 0; var dir_start = 0; var minifat_start = 0; var difat_start = 0; var fat_addrs = []; var blob = file.slice(0, 512); prep_blob(blob, 0); var mv = check_get_mver(blob); mver = mv[0]; switch (mver) { case 3: ssz = 512; break; case 4: ssz = 4096; break; case 0: if (mv[1] == 0) return parse_zip$1(file, options); default: throw new Error("Major Version: Expected 3 or 4 saw " + mver); } if (ssz !== 512) { blob = file.slice(0, ssz); prep_blob(blob, 28); } var header = file.slice(0, ssz); check_shifts(blob, mver); var dir_cnt = blob.read_shift(4, "i"); if (mver === 3 && dir_cnt !== 0) throw new Error("# Directory Sectors: Expected 0 saw " + dir_cnt); blob.l += 4; dir_start = blob.read_shift(4, "i"); blob.l += 4; blob.chk("00100000", "Mini Stream Cutoff Size: "); minifat_start = blob.read_shift(4, "i"); nmfs = blob.read_shift(4, "i"); difat_start = blob.read_shift(4, "i"); difat_sec_cnt = blob.read_shift(4, "i"); for (var q$3 = -1, j$2 = 0; j$2 < 109; ++j$2) { q$3 = blob.read_shift(4, "i"); if (q$3 < 0) break; fat_addrs[j$2] = q$3; } /** Break the file up into sectors */ var sectors = sectorify(file, ssz); sleuth_fat(difat_start, difat_sec_cnt, sectors, ssz, fat_addrs); /** Chains */ var sector_list = make_sector_list(sectors, dir_start, fat_addrs, ssz); if (dir_start < sector_list.length) sector_list[dir_start].name = "!Directory"; if (nmfs > 0 && minifat_start !== ENDOFCHAIN) sector_list[minifat_start].name = "!MiniFAT"; sector_list[fat_addrs[0]].name = "!FAT"; sector_list.fat_addrs = fat_addrs; sector_list.ssz = ssz; var files = {}, Paths = [], FileIndex = [], FullPaths = []; read_directory(dir_start, sector_list, sectors, Paths, nmfs, files, FileIndex, minifat_start); build_full_paths(FileIndex, FullPaths, Paths); Paths.shift(); var o$10 = { FileIndex, FullPaths }; if (options && options.raw) o$10.raw = { header, sectors }; return o$10; } function check_get_mver(blob) { if (blob[blob.l] == 80 && blob[blob.l + 1] == 75) return [0, 0]; blob.chk(HEADER_SIGNATURE, "Header Signature: "); blob.l += 16; var mver = blob.read_shift(2, "u"); return [blob.read_shift(2, "u"), mver]; } function check_shifts(blob, mver) { var shift = 9; blob.l += 2; switch (shift = blob.read_shift(2)) { case 9: if (mver != 3) throw new Error("Sector Shift: Expected 9 saw " + shift); break; case 12: if (mver != 4) throw new Error("Sector Shift: Expected 12 saw " + shift); break; default: throw new Error("Sector Shift: Expected 9 or 12 saw " + shift); } blob.chk("0600", "Mini Sector Shift: "); blob.chk("000000000000", "Reserved: "); } /** Break the file up into sectors */ function sectorify(file, ssz) { var nsectors = Math.ceil(file.length / ssz) - 1; var sectors = []; for (var i$8 = 1; i$8 < nsectors; ++i$8) sectors[i$8 - 1] = file.slice(i$8 * ssz, (i$8 + 1) * ssz); sectors[nsectors - 1] = file.slice(nsectors * ssz); return sectors; } function build_full_paths(FI, FP, Paths) { var i$8 = 0, L$2 = 0, R$1 = 0, C$2 = 0, j$2 = 0, pl = Paths.length; var dad = [], q$3 = []; for (; i$8 < pl; ++i$8) { dad[i$8] = q$3[i$8] = i$8; FP[i$8] = Paths[i$8]; } for (; j$2 < q$3.length; ++j$2) { i$8 = q$3[j$2]; L$2 = FI[i$8].L; R$1 = FI[i$8].R; C$2 = FI[i$8].C; if (dad[i$8] === i$8) { if (L$2 !== -1 && dad[L$2] !== L$2) dad[i$8] = dad[L$2]; if (R$1 !== -1 && dad[R$1] !== R$1) dad[i$8] = dad[R$1]; } if (C$2 !== -1) dad[C$2] = i$8; if (L$2 !== -1 && i$8 != dad[i$8]) { dad[L$2] = dad[i$8]; if (q$3.lastIndexOf(L$2) < j$2) q$3.push(L$2); } if (R$1 !== -1 && i$8 != dad[i$8]) { dad[R$1] = dad[i$8]; if (q$3.lastIndexOf(R$1) < j$2) q$3.push(R$1); } } for (i$8 = 1; i$8 < pl; ++i$8) if (dad[i$8] === i$8) { if (R$1 !== -1 && dad[R$1] !== R$1) dad[i$8] = dad[R$1]; else if (L$2 !== -1 && dad[L$2] !== L$2) dad[i$8] = dad[L$2]; } for (i$8 = 1; i$8 < pl; ++i$8) { if (FI[i$8].type === 0) continue; j$2 = i$8; if (j$2 != dad[j$2]) do { j$2 = dad[j$2]; FP[i$8] = FP[j$2] + "/" + FP[i$8]; } while (j$2 !== 0 && -1 !== dad[j$2] && j$2 != dad[j$2]); dad[i$8] = -1; } FP[0] += "/"; for (i$8 = 1; i$8 < pl; ++i$8) { if (FI[i$8].type !== 2) FP[i$8] += "/"; } } function get_mfat_entry(entry, payload, mini) { var start = entry.start, size = entry.size; var o$10 = []; var idx = start; while (mini && size > 0 && idx >= 0) { o$10.push(payload.slice(idx * MSSZ, idx * MSSZ + MSSZ)); size -= MSSZ; idx = __readInt32LE(mini, idx * 4); } if (o$10.length === 0) return new_buf(0); return bconcat(o$10).slice(0, entry.size); } /** Chase down the rest of the DIFAT chain to build a comprehensive list DIFAT chains by storing the next sector number as the last 32 bits */ function sleuth_fat(idx, cnt, sectors, ssz, fat_addrs) { var q$3 = ENDOFCHAIN; if (idx === ENDOFCHAIN) { if (cnt !== 0) throw new Error("DIFAT chain shorter than expected"); } else if (idx !== -1) { var sector = sectors[idx], m$3 = (ssz >>> 2) - 1; if (!sector) return; for (var i$8 = 0; i$8 < m$3; ++i$8) { if ((q$3 = __readInt32LE(sector, i$8 * 4)) === ENDOFCHAIN) break; fat_addrs.push(q$3); } if (cnt >= 1) sleuth_fat(__readInt32LE(sector, ssz - 4), cnt - 1, sectors, ssz, fat_addrs); } } /** Follow the linked list of sectors for a given starting point */ function get_sector_list(sectors, start, fat_addrs, ssz, chkd) { var buf = [], buf_chain = []; if (!chkd) chkd = []; var modulus = ssz - 1, j$2 = 0, jj = 0; for (j$2 = start; j$2 >= 0;) { chkd[j$2] = true; buf[buf.length] = j$2; buf_chain.push(sectors[j$2]); var addr = fat_addrs[Math.floor(j$2 * 4 / ssz)]; jj = j$2 * 4 & modulus; if (ssz < 4 + jj) throw new Error("FAT boundary crossed: " + j$2 + " 4 " + ssz); if (!sectors[addr]) break; j$2 = __readInt32LE(sectors[addr], jj); } return { nodes: buf, data: __toBuffer([buf_chain]) }; } /** Chase down the sector linked lists */ function make_sector_list(sectors, dir_start, fat_addrs, ssz) { var sl = sectors.length, sector_list = []; var chkd = [], buf = [], buf_chain = []; var modulus = ssz - 1, i$8 = 0, j$2 = 0, k$2 = 0, jj = 0; for (i$8 = 0; i$8 < sl; ++i$8) { buf = []; k$2 = i$8 + dir_start; if (k$2 >= sl) k$2 -= sl; if (chkd[k$2]) continue; buf_chain = []; var seen = []; for (j$2 = k$2; j$2 >= 0;) { seen[j$2] = true; chkd[j$2] = true; buf[buf.length] = j$2; buf_chain.push(sectors[j$2]); var addr = fat_addrs[Math.floor(j$2 * 4 / ssz)]; jj = j$2 * 4 & modulus; if (ssz < 4 + jj) throw new Error("FAT boundary crossed: " + j$2 + " 4 " + ssz); if (!sectors[addr]) break; j$2 = __readInt32LE(sectors[addr], jj); if (seen[j$2]) break; } sector_list[k$2] = { nodes: buf, data: __toBuffer([buf_chain]) }; } return sector_list; } function read_directory(dir_start, sector_list, sectors, Paths, nmfs, files, FileIndex, mini) { var minifat_store = 0, pl = Paths.length ? 2 : 0; var sector = sector_list[dir_start].data; var i$8 = 0, namelen = 0, name; for (; i$8 < sector.length; i$8 += 128) { var blob = sector.slice(i$8, i$8 + 128); prep_blob(blob, 64); namelen = blob.read_shift(2); name = __utf16le(blob, 0, namelen - pl); Paths.push(name); var o$10 = { name, type: blob.read_shift(1), color: blob.read_shift(1), L: blob.read_shift(4, "i"), R: blob.read_shift(4, "i"), C: blob.read_shift(4, "i"), clsid: blob.read_shift(16), state: blob.read_shift(4, "i"), start: 0, size: 0 }; var ctime = blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2); if (ctime !== 0) o$10.ct = read_date(blob, blob.l - 8); var mtime = blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2); if (mtime !== 0) o$10.mt = read_date(blob, blob.l - 8); o$10.start = blob.read_shift(4, "i"); o$10.size = blob.read_shift(4, "i"); if (o$10.size < 0 && o$10.start < 0) { o$10.size = o$10.type = 0; o$10.start = ENDOFCHAIN; o$10.name = ""; } if (o$10.type === 5) { minifat_store = o$10.start; if (nmfs > 0 && minifat_store !== ENDOFCHAIN) sector_list[minifat_store].name = "!StreamData"; } else if (o$10.size >= 4096) { o$10.storage = "fat"; if (sector_list[o$10.start] === undefined) sector_list[o$10.start] = get_sector_list(sectors, o$10.start, sector_list.fat_addrs, sector_list.ssz); sector_list[o$10.start].name = o$10.name; o$10.content = sector_list[o$10.start].data.slice(0, o$10.size); } else { o$10.storage = "minifat"; if (o$10.size < 0) o$10.size = 0; else if (minifat_store !== ENDOFCHAIN && o$10.start !== ENDOFCHAIN && sector_list[minifat_store]) { o$10.content = get_mfat_entry(o$10, sector_list[minifat_store].data, (sector_list[mini] || {}).data); } } if (o$10.content) prep_blob(o$10.content, 0); files[name] = o$10; FileIndex.push(o$10); } } function read_date(blob, offset) { return new Date((__readUInt32LE(blob, offset + 4) / 1e7 * Math.pow(2, 32) + __readUInt32LE(blob, offset) / 1e7 - 11644473600) * 1e3); } function read_file(filename$1, options) { get_fs(); return parse(fs.readFileSync(filename$1), options); } function read(blob, options) { var type = options && options.type; if (!type) { if (has_buf && Buffer.isBuffer(blob)) type = "buffer"; } switch (type || "base64") { case "file": return read_file(blob, options); case "base64": return parse(s2a(Base64_decode(blob)), options); case "binary": return parse(s2a(blob), options); } return parse(blob, options); } function init_cfb(cfb, opts) { var o$10 = opts || {}, root = o$10.root || "Root Entry"; if (!cfb.FullPaths) cfb.FullPaths = []; if (!cfb.FileIndex) cfb.FileIndex = []; if (cfb.FullPaths.length !== cfb.FileIndex.length) throw new Error("inconsistent CFB structure"); if (cfb.FullPaths.length === 0) { cfb.FullPaths[0] = root + "/"; cfb.FileIndex[0] = { name: root, type: 5 }; } if (o$10.CLSID) cfb.FileIndex[0].clsid = o$10.CLSID; seed_cfb(cfb); } function seed_cfb(cfb) { var nm = "Sh33tJ5"; if (CFB.find(cfb, "/" + nm)) return; var p$3 = new_buf(4); p$3[0] = 55; p$3[1] = p$3[3] = 50; p$3[2] = 54; cfb.FileIndex.push({ name: nm, type: 2, content: p$3, size: 4, L: 69, R: 69, C: 69 }); cfb.FullPaths.push(cfb.FullPaths[0] + nm); rebuild_cfb(cfb); } function rebuild_cfb(cfb, f$4) { init_cfb(cfb); var gc = false, s$5 = false; for (var i$8 = cfb.FullPaths.length - 1; i$8 >= 0; --i$8) { var _file = cfb.FileIndex[i$8]; switch (_file.type) { case 0: if (s$5) gc = true; else { cfb.FileIndex.pop(); cfb.FullPaths.pop(); } break; case 1: case 2: case 5: s$5 = true; if (isNaN(_file.R * _file.L * _file.C)) gc = true; if (_file.R > -1 && _file.L > -1 && _file.R == _file.L) gc = true; break; default: gc = true; break; } } if (!gc && !f$4) return; var now = new Date(1987, 1, 19), j$2 = 0; var fullPaths = Object.create ? Object.create(null) : {}; var data = []; for (i$8 = 0; i$8 < cfb.FullPaths.length; ++i$8) { fullPaths[cfb.FullPaths[i$8]] = true; if (cfb.FileIndex[i$8].type === 0) continue; data.push([cfb.FullPaths[i$8], cfb.FileIndex[i$8]]); } for (i$8 = 0; i$8 < data.length; ++i$8) { var dad = dirname(data[i$8][0]); s$5 = fullPaths[dad]; while (!s$5) { while (dirname(dad) && !fullPaths[dirname(dad)]) dad = dirname(dad); data.push([dad, { name: filename(dad).replace("/", ""), type: 1, clsid: HEADER_CLSID, ct: now, mt: now, content: null }]); fullPaths[dad] = true; dad = dirname(data[i$8][0]); s$5 = fullPaths[dad]; } } data.sort(function(x$2, y$3) { return namecmp(x$2[0], y$3[0]); }); cfb.FullPaths = []; cfb.FileIndex = []; for (i$8 = 0; i$8 < data.length; ++i$8) { cfb.FullPaths[i$8] = data[i$8][0]; cfb.FileIndex[i$8] = data[i$8][1]; } for (i$8 = 0; i$8 < data.length; ++i$8) { var elt = cfb.FileIndex[i$8]; var nm = cfb.FullPaths[i$8]; elt.name = filename(nm).replace("/", ""); elt.L = elt.R = elt.C = -(elt.color = 1); elt.size = elt.content ? elt.content.length : 0; elt.start = 0; elt.clsid = elt.clsid || HEADER_CLSID; if (i$8 === 0) { elt.C = data.length > 1 ? 1 : -1; elt.size = 0; elt.type = 5; } else if (nm.slice(-1) == "/") { for (j$2 = i$8 + 1; j$2 < data.length; ++j$2) if (dirname(cfb.FullPaths[j$2]) == nm) break; elt.C = j$2 >= data.length ? -1 : j$2; for (j$2 = i$8 + 1; j$2 < data.length; ++j$2) if (dirname(cfb.FullPaths[j$2]) == dirname(nm)) break; elt.R = j$2 >= data.length ? -1 : j$2; elt.type = 1; } else { if (dirname(cfb.FullPaths[i$8 + 1] || "") == dirname(nm)) elt.R = i$8 + 1; elt.type = 2; } } } function _write(cfb, options) { var _opts = options || {}; if (_opts.fileType == "mad") return write_mad(cfb, _opts); rebuild_cfb(cfb); switch (_opts.fileType) { case "zip": return write_zip$1(cfb, _opts); } var L$2 = (function(cfb$1) { var mini_size = 0, fat_size = 0; for (var i$9 = 0; i$9 < cfb$1.FileIndex.length; ++i$9) { var file$1 = cfb$1.FileIndex[i$9]; if (!file$1.content) continue; var flen$1 = file$1.content.length; if (flen$1 > 0) { if (flen$1 < 4096) mini_size += flen$1 + 63 >> 6; else fat_size += flen$1 + 511 >> 9; } } var dir_cnt = cfb$1.FullPaths.length + 3 >> 2; var mini_cnt = mini_size + 7 >> 3; var mfat_cnt = mini_size + 127 >> 7; var fat_base = mini_cnt + fat_size + dir_cnt + mfat_cnt; var fat_cnt = fat_base + 127 >> 7; var difat_cnt = fat_cnt <= 109 ? 0 : Math.ceil((fat_cnt - 109) / 127); while (fat_base + fat_cnt + difat_cnt + 127 >> 7 > fat_cnt) difat_cnt = ++fat_cnt <= 109 ? 0 : Math.ceil((fat_cnt - 109) / 127); var L$3 = [ 1, difat_cnt, fat_cnt, mfat_cnt, dir_cnt, fat_size, mini_size, 0 ]; cfb$1.FileIndex[0].size = mini_size << 6; L$3[7] = (cfb$1.FileIndex[0].start = L$3[0] + L$3[1] + L$3[2] + L$3[3] + L$3[4] + L$3[5]) + (L$3[6] + 7 >> 3); return L$3; })(cfb); var o$10 = new_buf(L$2[7] << 9); var i$8 = 0, T$3 = 0; { for (i$8 = 0; i$8 < 8; ++i$8) o$10.write_shift(1, HEADER_SIG[i$8]); for (i$8 = 0; i$8 < 8; ++i$8) o$10.write_shift(2, 0); o$10.write_shift(2, 62); o$10.write_shift(2, 3); o$10.write_shift(2, 65534); o$10.write_shift(2, 9); o$10.write_shift(2, 6); for (i$8 = 0; i$8 < 3; ++i$8) o$10.write_shift(2, 0); o$10.write_shift(4, 0); o$10.write_shift(4, L$2[2]); o$10.write_shift(4, L$2[0] + L$2[1] + L$2[2] + L$2[3] - 1); o$10.write_shift(4, 0); o$10.write_shift(4, 1 << 12); o$10.write_shift(4, L$2[3] ? L$2[0] + L$2[1] + L$2[2] - 1 : ENDOFCHAIN); o$10.write_shift(4, L$2[3]); o$10.write_shift(-4, L$2[1] ? L$2[0] - 1 : ENDOFCHAIN); o$10.write_shift(4, L$2[1]); for (i$8 = 0; i$8 < 109; ++i$8) o$10.write_shift(-4, i$8 < L$2[2] ? L$2[1] + i$8 : -1); } if (L$2[1]) { for (T$3 = 0; T$3 < L$2[1]; ++T$3) { for (; i$8 < 236 + T$3 * 127; ++i$8) o$10.write_shift(-4, i$8 < L$2[2] ? L$2[1] + i$8 : -1); o$10.write_shift(-4, T$3 === L$2[1] - 1 ? ENDOFCHAIN : T$3 + 1); } } var chainit = function(w$2) { for (T$3 += w$2; i$8 < T$3 - 1; ++i$8) o$10.write_shift(-4, i$8 + 1); if (w$2) { ++i$8; o$10.write_shift(-4, ENDOFCHAIN); } }; T$3 = i$8 = 0; for (T$3 += L$2[1]; i$8 < T$3; ++i$8) o$10.write_shift(-4, consts.DIFSECT); for (T$3 += L$2[2]; i$8 < T$3; ++i$8) o$10.write_shift(-4, consts.FATSECT); chainit(L$2[3]); chainit(L$2[4]); var j$2 = 0, flen = 0; var file = cfb.FileIndex[0]; for (; j$2 < cfb.FileIndex.length; ++j$2) { file = cfb.FileIndex[j$2]; if (!file.content) continue; flen = file.content.length; if (flen < 4096) continue; file.start = T$3; chainit(flen + 511 >> 9); } chainit(L$2[6] + 7 >> 3); while (o$10.l & 511) o$10.write_shift(-4, consts.ENDOFCHAIN); T$3 = i$8 = 0; for (j$2 = 0; j$2 < cfb.FileIndex.length; ++j$2) { file = cfb.FileIndex[j$2]; if (!file.content) continue; flen = file.content.length; if (!flen || flen >= 4096) continue; file.start = T$3; chainit(flen + 63 >> 6); } while (o$10.l & 511) o$10.write_shift(-4, consts.ENDOFCHAIN); for (i$8 = 0; i$8 < L$2[4] << 2; ++i$8) { var nm = cfb.FullPaths[i$8]; if (!nm || nm.length === 0) { for (j$2 = 0; j$2 < 17; ++j$2) o$10.write_shift(4, 0); for (j$2 = 0; j$2 < 3; ++j$2) o$10.write_shift(4, -1); for (j$2 = 0; j$2 < 12; ++j$2) o$10.write_shift(4, 0); continue; } file = cfb.FileIndex[i$8]; if (i$8 === 0) file.start = file.size ? file.start - 1 : ENDOFCHAIN; var _nm = i$8 === 0 && _opts.root || file.name; if (_nm.length > 31) { console.error("Name " + _nm + " will be truncated to " + _nm.slice(0, 31)); _nm = _nm.slice(0, 31); } flen = 2 * (_nm.length + 1); o$10.write_shift(64, _nm, "utf16le"); o$10.write_shift(2, flen); o$10.write_shift(1, file.type); o$10.write_shift(1, file.color); o$10.write_shift(-4, file.L); o$10.write_shift(-4, file.R); o$10.write_shift(-4, file.C); if (!file.clsid) for (j$2 = 0; j$2 < 4; ++j$2) o$10.write_shift(4, 0); else o$10.write_shift(16, file.clsid, "hex"); o$10.write_shift(4, file.state || 0); o$10.write_shift(4, 0); o$10.write_shift(4, 0); o$10.write_shift(4, 0); o$10.write_shift(4, 0); o$10.write_shift(4, file.start); o$10.write_shift(4, file.size); o$10.write_shift(4, 0); } for (i$8 = 1; i$8 < cfb.FileIndex.length; ++i$8) { file = cfb.FileIndex[i$8]; if (file.size >= 4096) { o$10.l = file.start + 1 << 9; if (has_buf && Buffer.isBuffer(file.content)) { file.content.copy(o$10, o$10.l, 0, file.size); o$10.l += file.size + 511 & -512; } else { for (j$2 = 0; j$2 < file.size; ++j$2) o$10.write_shift(1, file.content[j$2]); for (; j$2 & 511; ++j$2) o$10.write_shift(1, 0); } } } for (i$8 = 1; i$8 < cfb.FileIndex.length; ++i$8) { file = cfb.FileIndex[i$8]; if (file.size > 0 && file.size < 4096) { if (has_buf && Buffer.isBuffer(file.content)) { file.content.copy(o$10, o$10.l, 0, file.size); o$10.l += file.size + 63 & -64; } else { for (j$2 = 0; j$2 < file.size; ++j$2) o$10.write_shift(1, file.content[j$2]); for (; j$2 & 63; ++j$2) o$10.write_shift(1, 0); } } } if (has_buf) { o$10.l = o$10.length; } else { while (o$10.l < o$10.length) o$10.write_shift(1, 0); } return o$10; } function find(cfb, path$1) { var UCFullPaths = cfb.FullPaths.map(function(x$2) { return x$2.toUpperCase(); }); var UCPaths = UCFullPaths.map(function(x$2) { var y$3 = x$2.split("/"); return y$3[y$3.length - (x$2.slice(-1) == "/" ? 2 : 1)]; }); var k$2 = false; if (path$1.charCodeAt(0) === 47) { k$2 = true; path$1 = UCFullPaths[0].slice(0, -1) + path$1; } else k$2 = path$1.indexOf("/") !== -1; var UCPath = path$1.toUpperCase(); var w$2 = k$2 === true ? UCFullPaths.indexOf(UCPath) : UCPaths.indexOf(UCPath); if (w$2 !== -1) return cfb.FileIndex[w$2]; var m$3 = !UCPath.match(chr1); UCPath = UCPath.replace(chr0, ""); if (m$3) UCPath = UCPath.replace(chr1, "!"); for (w$2 = 0; w$2 < UCFullPaths.length; ++w$2) { if ((m$3 ? UCFullPaths[w$2].replace(chr1, "!") : UCFullPaths[w$2]).replace(chr0, "") == UCPath) return cfb.FileIndex[w$2]; if ((m$3 ? UCPaths[w$2].replace(chr1, "!") : UCPaths[w$2]).replace(chr0, "") == UCPath) return cfb.FileIndex[w$2]; } return null; } /** CFB Constants */ var MSSZ = 64; var ENDOFCHAIN = -2; var HEADER_SIGNATURE = "d0cf11e0a1b11ae1"; var HEADER_SIG = [ 208, 207, 17, 224, 161, 177, 26, 225 ]; var HEADER_CLSID = "00000000000000000000000000000000"; var consts = { MAXREGSECT: -6, DIFSECT: -4, FATSECT: -3, ENDOFCHAIN, FREESECT: -1, HEADER_SIGNATURE, HEADER_MINOR_VERSION: "3e00", MAXREGSID: -6, NOSTREAM: -1, HEADER_CLSID, EntryTypes: [ "unknown", "storage", "stream", "lockbytes", "property", "root" ] }; function write_file(cfb, filename$1, options) { get_fs(); var o$10 = _write(cfb, options); fs.writeFileSync(filename$1, o$10); } function a2s$1(o$10) { var out = new Array(o$10.length); for (var i$8 = 0; i$8 < o$10.length; ++i$8) out[i$8] = String.fromCharCode(o$10[i$8]); return out.join(""); } function write(cfb, options) { var o$10 = _write(cfb, options); switch (options && options.type || "buffer") { case "file": get_fs(); fs.writeFileSync(options.filename, o$10); return o$10; case "binary": return typeof o$10 == "string" ? o$10 : a2s$1(o$10); case "base64": return Base64_encode(typeof o$10 == "string" ? o$10 : a2s$1(o$10)); case "buffer": if (has_buf) return Buffer.isBuffer(o$10) ? o$10 : Buffer_from(o$10); case "array": return typeof o$10 == "string" ? s2a(o$10) : o$10; } return o$10; } var _zlib; function use_zlib(zlib) { try { var InflateRaw = zlib.InflateRaw; var InflRaw = new InflateRaw(); InflRaw._processChunk(new Uint8Array([3, 0]), InflRaw._finishFlushFlag); if (InflRaw.bytesRead) _zlib = zlib; else throw new Error("zlib does not expose bytesRead"); } catch (e$10) { console.error("cannot use native zlib: " + (e$10.message || e$10)); } } function _inflateRawSync(payload, usz) { if (!_zlib) return _inflate(payload, usz); var InflateRaw = _zlib.InflateRaw; var InflRaw = new InflateRaw(); var out = InflRaw._processChunk(payload.slice(payload.l), InflRaw._finishFlushFlag); payload.l += InflRaw.bytesRead; return out; } function _deflateRawSync(payload) { return _zlib ? _zlib.deflateRawSync(payload) : _deflate(payload); } var CLEN_ORDER = [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; var LEN_LN = [ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258 ]; var DST_LN = [ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577 ]; function bit_swap_8(n$9) { var t$6 = (n$9 << 1 | n$9 << 11) & 139536 | (n$9 << 5 | n$9 << 15) & 558144; return (t$6 >> 16 | t$6 >> 8 | t$6) & 255; } var use_typed_arrays = typeof Uint8Array !== "undefined"; var bitswap8 = use_typed_arrays ? new Uint8Array(1 << 8) : []; for (var q$2 = 0; q$2 < 1 << 8; ++q$2) bitswap8[q$2] = bit_swap_8(q$2); function bit_swap_n(n$9, b$3) { var rev = bitswap8[n$9 & 255]; if (b$3 <= 8) return rev >>> 8 - b$3; rev = rev << 8 | bitswap8[n$9 >> 8 & 255]; if (b$3 <= 16) return rev >>> 16 - b$3; rev = rev << 8 | bitswap8[n$9 >> 16 & 255]; return rev >>> 24 - b$3; } function read_bits_2(buf, bl) { var w$2 = bl & 7, h$5 = bl >>> 3; return (buf[h$5] | (w$2 <= 6 ? 0 : buf[h$5 + 1] << 8)) >>> w$2 & 3; } function read_bits_3(buf, bl) { var w$2 = bl & 7, h$5 = bl >>> 3; return (buf[h$5] | (w$2 <= 5 ? 0 : buf[h$5 + 1] << 8)) >>> w$2 & 7; } function read_bits_4(buf, bl) { var w$2 = bl & 7, h$5 = bl >>> 3; return (buf[h$5] | (w$2 <= 4 ? 0 : buf[h$5 + 1] << 8)) >>> w$2 & 15; } function read_bits_5(buf, bl) { var w$2 = bl & 7, h$5 = bl >>> 3; return (buf[h$5] | (w$2 <= 3 ? 0 : buf[h$5 + 1] << 8)) >>> w$2 & 31; } function read_bits_7(buf, bl) { var w$2 = bl & 7, h$5 = bl >>> 3; return (buf[h$5] | (w$2 <= 1 ? 0 : buf[h$5 + 1] << 8)) >>> w$2 & 127; } function read_bits_n(buf, bl, n$9) { var w$2 = bl & 7, h$5 = bl >>> 3, f$4 = (1 << n$9) - 1; var v$3 = buf[h$5] >>> w$2; if (n$9 < 8 - w$2) return v$3 & f$4; v$3 |= buf[h$5 + 1] << 8 - w$2; if (n$9 < 16 - w$2) return v$3 & f$4; v$3 |= buf[h$5 + 2] << 16 - w$2; if (n$9 < 24 - w$2) return v$3 & f$4; v$3 |= buf[h$5 + 3] << 24 - w$2; return v$3 & f$4; } function write_bits_3(buf, bl, v$3) { var w$2 = bl & 7, h$5 = bl >>> 3; if (w$2 <= 5) buf[h$5] |= (v$3 & 7) << w$2; else { buf[h$5] |= v$3 << w$2 & 255; buf[h$5 + 1] = (v$3 & 7) >> 8 - w$2; } return bl + 3; } function write_bits_1(buf, bl, v$3) { var w$2 = bl & 7, h$5 = bl >>> 3; v$3 = (v$3 & 1) << w$2; buf[h$5] |= v$3; return bl + 1; } function write_bits_8(buf, bl, v$3) { var w$2 = bl & 7, h$5 = bl >>> 3; v$3 <<= w$2; buf[h$5] |= v$3 & 255; v$3 >>>= 8; buf[h$5 + 1] = v$3; return bl + 8; } function write_bits_16(buf, bl, v$3) { var w$2 = bl & 7, h$5 = bl >>> 3; v$3 <<= w$2; buf[h$5] |= v$3 & 255; v$3 >>>= 8; buf[h$5 + 1] = v$3 & 255; buf[h$5 + 2] = v$3 >>> 8; return bl + 16; } function realloc(b$3, sz) { var L$2 = b$3.length, M$3 = 2 * L$2 > sz ? 2 * L$2 : sz + 5, i$8 = 0; if (L$2 >= sz) return b$3; if (has_buf) { var o$10 = new_unsafe_buf(M$3); if (b$3.copy) b$3.copy(o$10); else for (; i$8 < b$3.length; ++i$8) o$10[i$8] = b$3[i$8]; return o$10; } else if (use_typed_arrays) { var a$2 = new Uint8Array(M$3); if (a$2.set) a$2.set(b$3); else for (; i$8 < L$2; ++i$8) a$2[i$8] = b$3[i$8]; return a$2; } b$3.length = M$3; return b$3; } function zero_fill_array(n$9) { var o$10 = new Array(n$9); for (var i$8 = 0; i$8 < n$9; ++i$8) o$10[i$8] = 0; return o$10; } function build_tree(clens, cmap, MAX) { var maxlen = 1, w$2 = 0, i$8 = 0, j$2 = 0, ccode = 0, L$2 = clens.length; var bl_count = use_typed_arrays ? new Uint16Array(32) : zero_fill_array(32); for (i$8 = 0; i$8 < 32; ++i$8) bl_count[i$8] = 0; for (i$8 = L$2; i$8 < MAX; ++i$8) clens[i$8] = 0; L$2 = clens.length; var ctree = use_typed_arrays ? new Uint16Array(L$2) : zero_fill_array(L$2); for (i$8 = 0; i$8 < L$2; ++i$8) { bl_count[w$2 = clens[i$8]]++; if (maxlen < w$2) maxlen = w$2; ctree[i$8] = 0; } bl_count[0] = 0; for (i$8 = 1; i$8 <= maxlen; ++i$8) bl_count[i$8 + 16] = ccode = ccode + bl_count[i$8 - 1] << 1; for (i$8 = 0; i$8 < L$2; ++i$8) { ccode = clens[i$8]; if (ccode != 0) ctree[i$8] = bl_count[ccode + 16]++; } var cleni = 0; for (i$8 = 0; i$8 < L$2; ++i$8) { cleni = clens[i$8]; if (cleni != 0) { ccode = bit_swap_n(ctree[i$8], maxlen) >> maxlen - cleni; for (j$2 = (1 << maxlen + 4 - cleni) - 1; j$2 >= 0; --j$2) cmap[ccode | j$2 << cleni] = cleni & 15 | i$8 << 4; } } return maxlen; } var fix_lmap = use_typed_arrays ? new Uint16Array(512) : zero_fill_array(512); var fix_dmap = use_typed_arrays ? new Uint16Array(32) : zero_fill_array(32); if (!use_typed_arrays) { for (var i$7 = 0; i$7 < 512; ++i$7) fix_lmap[i$7] = 0; for (i$7 = 0; i$7 < 32; ++i$7) fix_dmap[i$7] = 0; } (function() { var dlens = []; var i$8 = 0; for (; i$8 < 32; i$8++) dlens.push(5); build_tree(dlens, fix_dmap, 32); var clens = []; i$8 = 0; for (; i$8 <= 143; i$8++) clens.push(8); for (; i$8 <= 255; i$8++) clens.push(9); for (; i$8 <= 279; i$8++) clens.push(7); for (; i$8 <= 287; i$8++) clens.push(8); build_tree(clens, fix_lmap, 288); })(); var _deflateRaw = /* @__PURE__ */ (function _deflateRawIIFE() { var DST_LN_RE = use_typed_arrays ? new Uint8Array(32768) : []; var j$2 = 0, k$2 = 0; for (; j$2 < DST_LN.length - 1; ++j$2) { for (; k$2 < DST_LN[j$2 + 1]; ++k$2) DST_LN_RE[k$2] = j$2; } for (; k$2 < 32768; ++k$2) DST_LN_RE[k$2] = 29; var LEN_LN_RE = use_typed_arrays ? new Uint8Array(259) : []; for (j$2 = 0, k$2 = 0; j$2 < LEN_LN.length - 1; ++j$2) { for (; k$2 < LEN_LN[j$2 + 1]; ++k$2) LEN_LN_RE[k$2] = j$2; } function write_stored(data, out) { var boff = 0; while (boff < data.length) { var L$2 = Math.min(65535, data.length - boff); var h$5 = boff + L$2 == data.length; out.write_shift(1, +h$5); out.write_shift(2, L$2); out.write_shift(2, ~L$2 & 65535); while (L$2-- > 0) out[out.l++] = data[boff++]; } return out.l; } function write_huff_fixed(data, out) { var bl = 0; var boff = 0; var addrs = use_typed_arrays ? new Uint16Array(32768) : []; while (boff < data.length) { var L$2 = Math.min(65535, data.length - boff); if (L$2 < 10) { bl = write_bits_3(out, bl, +!!(boff + L$2 == data.length)); if (bl & 7) bl += 8 - (bl & 7); out.l = bl / 8 | 0; out.write_shift(2, L$2); out.write_shift(2, ~L$2 & 65535); while (L$2-- > 0) out[out.l++] = data[boff++]; bl = out.l * 8; continue; } bl = write_bits_3(out, bl, +!!(boff + L$2 == data.length) + 2); var hash = 0; while (L$2-- > 0) { var d$5 = data[boff]; hash = (hash << 5 ^ d$5) & 32767; var match = -1, mlen = 0; if (match = addrs[hash]) { match |= boff & ~32767; if (match > boff) match -= 32768; if (match < boff) while (data[match + mlen] == data[boff + mlen] && mlen < 250) ++mlen; } if (mlen > 2) { d$5 = LEN_LN_RE[mlen]; if (d$5 <= 22) bl = write_bits_8(out, bl, bitswap8[d$5 + 1] >> 1) - 1; else { write_bits_8(out, bl, 3); bl += 5; write_bits_8(out, bl, bitswap8[d$5 - 23] >> 5); bl += 3; } var len_eb = d$5 < 8 ? 0 : d$5 - 4 >> 2; if (len_eb > 0) { write_bits_16(out, bl, mlen - LEN_LN[d$5]); bl += len_eb; } d$5 = DST_LN_RE[boff - match]; bl = write_bits_8(out, bl, bitswap8[d$5] >> 3); bl -= 3; var dst_eb = d$5 < 4 ? 0 : d$5 - 2 >> 1; if (dst_eb > 0) { write_bits_16(out, bl, boff - match - DST_LN[d$5]); bl += dst_eb; } for (var q$3 = 0; q$3 < mlen; ++q$3) { addrs[hash] = boff & 32767; hash = (hash << 5 ^ data[boff]) & 32767; ++boff; } L$2 -= mlen - 1; } else { if (d$5 <= 143) d$5 = d$5 + 48; else bl = write_bits_1(out, bl, 1); bl = write_bits_8(out, bl, bitswap8[d$5]); addrs[hash] = boff & 32767; ++boff; } } bl = write_bits_8(out, bl, 0) - 1; } out.l = (bl + 7) / 8 | 0; return out.l; } return function _deflateRaw$1(data, out) { if (data.length < 8) return write_stored(data, out); return write_huff_fixed(data, out); }; })(); function _deflate(data) { var buf = new_buf(50 + Math.floor(data.length * 1.1)); var off = _deflateRaw(data, buf); return buf.slice(0, off); } var dyn_lmap = use_typed_arrays ? new Uint16Array(32768) : zero_fill_array(32768); var dyn_dmap = use_typed_arrays ? new Uint16Array(32768) : zero_fill_array(32768); var dyn_cmap = use_typed_arrays ? new Uint16Array(128) : zero_fill_array(128); var dyn_len_1 = 1, dyn_len_2 = 1; function dyn(data, boff) { var _HLIT = read_bits_5(data, boff) + 257; boff += 5; var _HDIST = read_bits_5(data, boff) + 1; boff += 5; var _HCLEN = read_bits_4(data, boff) + 4; boff += 4; var w$2 = 0; var clens = use_typed_arrays ? new Uint8Array(19) : zero_fill_array(19); var ctree = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; var maxlen = 1; var bl_count = use_typed_arrays ? new Uint8Array(8) : zero_fill_array(8); var next_code = use_typed_arrays ? new Uint8Array(8) : zero_fill_array(8); var L$2 = clens.length; for (var i$8 = 0; i$8 < _HCLEN; ++i$8) { clens[CLEN_ORDER[i$8]] = w$2 = read_bits_3(data, boff); if (maxlen < w$2) maxlen = w$2; bl_count[w$2]++; boff += 3; } var ccode = 0; bl_count[0] = 0; for (i$8 = 1; i$8 <= maxlen; ++i$8) next_code[i$8] = ccode = ccode + bl_count[i$8 - 1] << 1; for (i$8 = 0; i$8 < L$2; ++i$8) if ((ccode = clens[i$8]) != 0) ctree[i$8] = next_code[ccode]++; var cleni = 0; for (i$8 = 0; i$8 < L$2; ++i$8) { cleni = clens[i$8]; if (cleni != 0) { ccode = bitswap8[ctree[i$8]] >> 8 - cleni; for (var j$2 = (1 << 7 - cleni) - 1; j$2 >= 0; --j$2) dyn_cmap[ccode | j$2 << cleni] = cleni & 7 | i$8 << 3; } } var hcodes = []; maxlen = 1; for (; hcodes.length < _HLIT + _HDIST;) { ccode = dyn_cmap[read_bits_7(data, boff)]; boff += ccode & 7; switch (ccode >>>= 3) { case 16: w$2 = 3 + read_bits_2(data, boff); boff += 2; ccode = hcodes[hcodes.length - 1]; while (w$2-- > 0) hcodes.push(ccode); break; case 17: w$2 = 3 + read_bits_3(data, boff); boff += 3; while (w$2-- > 0) hcodes.push(0); break; case 18: w$2 = 11 + read_bits_7(data, boff); boff += 7; while (w$2-- > 0) hcodes.push(0); break; default: hcodes.push(ccode); if (maxlen < ccode) maxlen = ccode; break; } } var h1 = hcodes.slice(0, _HLIT), h2 = hcodes.slice(_HLIT); for (i$8 = _HLIT; i$8 < 286; ++i$8) h1[i$8] = 0; for (i$8 = _HDIST; i$8 < 30; ++i$8) h2[i$8] = 0; dyn_len_1 = build_tree(h1, dyn_lmap, 286); dyn_len_2 = build_tree(h2, dyn_dmap, 30); return boff; } function inflate(data, usz) { if (data[0] == 3 && !(data[1] & 3)) { return [new_raw_buf(usz), 2]; } var boff = 0; var header = 0; var outbuf = new_unsafe_buf(usz ? usz : 1 << 18); var woff = 0; var OL = outbuf.length >>> 0; var max_len_1 = 0, max_len_2 = 0; while ((header & 1) == 0) { header = read_bits_3(data, boff); boff += 3; if (header >>> 1 == 0) { if (boff & 7) boff += 8 - (boff & 7); var sz = data[boff >>> 3] | data[(boff >>> 3) + 1] << 8; boff += 32; if (sz > 0) { if (!usz && OL < woff + sz) { outbuf = realloc(outbuf, woff + sz); OL = outbuf.length; } while (sz-- > 0) { outbuf[woff++] = data[boff >>> 3]; boff += 8; } } continue; } else if (header >> 1 == 1) { max_len_1 = 9; max_len_2 = 5; } else { boff = dyn(data, boff); max_len_1 = dyn_len_1; max_len_2 = dyn_len_2; } for (;;) { if (!usz && OL < woff + 32767) { outbuf = realloc(outbuf, woff + 32767); OL = outbuf.length; } var bits = read_bits_n(data, boff, max_len_1); var code = header >>> 1 == 1 ? fix_lmap[bits] : dyn_lmap[bits]; boff += code & 15; code >>>= 4; if ((code >>> 8 & 255) === 0) outbuf[woff++] = code; else if (code == 256) break; else { code -= 257; var len_eb = code < 8 ? 0 : code - 4 >> 2; if (len_eb > 5) len_eb = 0; var tgt = woff + LEN_LN[code]; if (len_eb > 0) { tgt += read_bits_n(data, boff, len_eb); boff += len_eb; } bits = read_bits_n(data, boff, max_len_2); code = header >>> 1 == 1 ? fix_dmap[bits] : dyn_dmap[bits]; boff += code & 15; code >>>= 4; var dst_eb = code < 4 ? 0 : code - 2 >> 1; var dst = DST_LN[code]; if (dst_eb > 0) { dst += read_bits_n(data, boff, dst_eb); boff += dst_eb; } if (!usz && OL < tgt) { outbuf = realloc(outbuf, tgt + 100); OL = outbuf.length; } while (woff < tgt) { outbuf[woff] = outbuf[woff - dst]; ++woff; } } } } if (usz) return [outbuf, boff + 7 >>> 3]; return [outbuf.slice(0, woff), boff + 7 >>> 3]; } function _inflate(payload, usz) { var data = payload.slice(payload.l || 0); var out = inflate(data, usz); payload.l += out[1]; return out[0]; } function warn_or_throw(wrn, msg) { if (wrn) { if (typeof console !== "undefined") console.error(msg); } else throw new Error(msg); } function parse_zip$1(file, options) { var blob = file; prep_blob(blob, 0); var FileIndex = [], FullPaths = []; var o$10 = { FileIndex, FullPaths }; init_cfb(o$10, { root: options.root }); var i$8 = blob.length - 4; while ((blob[i$8] != 80 || blob[i$8 + 1] != 75 || blob[i$8 + 2] != 5 || blob[i$8 + 3] != 6) && i$8 >= 0) --i$8; blob.l = i$8 + 4; blob.l += 4; var fcnt = blob.read_shift(2); blob.l += 6; var start_cd = blob.read_shift(4); blob.l = start_cd; for (i$8 = 0; i$8 < fcnt; ++i$8) { blob.l += 20; var csz = blob.read_shift(4); var usz = blob.read_shift(4); var namelen = blob.read_shift(2); var efsz = blob.read_shift(2); var fcsz = blob.read_shift(2); blob.l += 8; var offset = blob.read_shift(4); var EF = parse_extra_field(blob.slice(blob.l + namelen, blob.l + namelen + efsz)); blob.l += namelen + efsz + fcsz; var L$2 = blob.l; blob.l = offset + 4; if (EF && EF[1]) { if ((EF[1] || {}).usz) usz = EF[1].usz; if ((EF[1] || {}).csz) csz = EF[1].csz; } parse_local_file(blob, csz, usz, o$10, EF); blob.l = L$2; } return o$10; } function parse_local_file(blob, csz, usz, o$10, EF) { blob.l += 2; var flags = blob.read_shift(2); var meth = blob.read_shift(2); var date = parse_dos_date(blob); if (flags & 8257) throw new Error("Unsupported ZIP encryption"); var crc32 = blob.read_shift(4); var _csz = blob.read_shift(4); var _usz = blob.read_shift(4); var namelen = blob.read_shift(2); var efsz = blob.read_shift(2); var name = ""; for (var i$8 = 0; i$8 < namelen; ++i$8) name += String.fromCharCode(blob[blob.l++]); if (efsz) { var ef = parse_extra_field(blob.slice(blob.l, blob.l + efsz)); if ((ef[21589] || {}).mt) date = ef[21589].mt; if ((ef[1] || {}).usz) _usz = ef[1].usz; if ((ef[1] || {}).csz) _csz = ef[1].csz; if (EF) { if ((EF[21589] || {}).mt) date = EF[21589].mt; if ((EF[1] || {}).usz) _usz = EF[1].usz; if ((EF[1] || {}).csz) _csz = EF[1].csz; } } blob.l += efsz; var data = blob.slice(blob.l, blob.l + _csz); switch (meth) { case 8: data = _inflateRawSync(blob, _usz); break; case 0: blob.l += _csz; break; default: throw new Error("Unsupported ZIP Compression method " + meth); } var wrn = false; if (flags & 8) { crc32 = blob.read_shift(4); if (crc32 == 134695760) { crc32 = blob.read_shift(4); wrn = true; } _csz = blob.read_shift(4); _usz = blob.read_shift(4); } if (_csz != csz) warn_or_throw(wrn, "Bad compressed size: " + csz + " != " + _csz); if (_usz != usz) warn_or_throw(wrn, "Bad uncompressed size: " + usz + " != " + _usz); cfb_add(o$10, name, data, { unsafe: true, mt: date }); } function write_zip$1(cfb, options) { var _opts = options || {}; var out = [], cdirs = []; var o$10 = new_buf(1); var method = _opts.compression ? 8 : 0, flags = 0; var desc = false; if (desc) flags |= 8; var i$8 = 0, j$2 = 0; var start_cd = 0, fcnt = 0; var root = cfb.FullPaths[0], fp = root, fi = cfb.FileIndex[0]; var crcs = []; var sz_cd = 0; for (i$8 = 1; i$8 < cfb.FullPaths.length; ++i$8) { fp = cfb.FullPaths[i$8].slice(root.length); fi = cfb.FileIndex[i$8]; if (!fi.size || !fi.content || Array.isArray(fi.content) && fi.content.length == 0 || fp == "Sh33tJ5") continue; var start = start_cd; var namebuf = new_buf(fp.length); for (j$2 = 0; j$2 < fp.length; ++j$2) namebuf.write_shift(1, fp.charCodeAt(j$2) & 127); namebuf = namebuf.slice(0, namebuf.l); crcs[fcnt] = typeof fi.content == "string" ? CRC32.bstr(fi.content, 0) : CRC32.buf(fi.content, 0); var outbuf = typeof fi.content == "string" ? s2a(fi.content) : fi.content; if (method == 8) outbuf = _deflateRawSync(outbuf); o$10 = new_buf(30); o$10.write_shift(4, 67324752); o$10.write_shift(2, 20); o$10.write_shift(2, flags); o$10.write_shift(2, method); if (fi.mt) write_dos_date(o$10, fi.mt); else o$10.write_shift(4, 0); o$10.write_shift(-4, flags & 8 ? 0 : crcs[fcnt]); o$10.write_shift(4, flags & 8 ? 0 : outbuf.length); o$10.write_shift(4, flags & 8 ? 0 : fi.content.length); o$10.write_shift(2, namebuf.length); o$10.write_shift(2, 0); start_cd += o$10.length; out.push(o$10); start_cd += namebuf.length; out.push(namebuf); start_cd += outbuf.length; out.push(outbuf); if (flags & 8) { o$10 = new_buf(12); o$10.write_shift(-4, crcs[fcnt]); o$10.write_shift(4, outbuf.length); o$10.write_shift(4, fi.content.length); start_cd += o$10.l; out.push(o$10); } o$10 = new_buf(46); o$10.write_shift(4, 33639248); o$10.write_shift(2, 0); o$10.write_shift(2, 20); o$10.write_shift(2, flags); o$10.write_shift(2, method); o$10.write_shift(4, 0); o$10.write_shift(-4, crcs[fcnt]); o$10.write_shift(4, outbuf.length); o$10.write_shift(4, fi.content.length); o$10.write_shift(2, namebuf.length); o$10.write_shift(2, 0); o$10.write_shift(2, 0); o$10.write_shift(2, 0); o$10.write_shift(2, 0); o$10.write_shift(4, 0); o$10.write_shift(4, start); sz_cd += o$10.l; cdirs.push(o$10); sz_cd += namebuf.length; cdirs.push(namebuf); ++fcnt; } o$10 = new_buf(22); o$10.write_shift(4, 101010256); o$10.write_shift(2, 0); o$10.write_shift(2, 0); o$10.write_shift(2, fcnt); o$10.write_shift(2, fcnt); o$10.write_shift(4, sz_cd); o$10.write_shift(4, start_cd); o$10.write_shift(2, 0); return bconcat([ bconcat(out), bconcat(cdirs), o$10 ]); } var ContentTypeMap = { "htm": "text/html", "xml": "text/xml", "gif": "image/gif", "jpg": "image/jpeg", "png": "image/png", "mso": "application/x-mso", "thmx": "application/vnd.ms-officetheme", "sh33tj5": "application/octet-stream" }; function get_content_type(fi, fp) { if (fi.ctype) return fi.ctype; var ext = fi.name || "", m$3 = ext.match(/\.([^\.]+)$/); if (m$3 && ContentTypeMap[m$3[1]]) return ContentTypeMap[m$3[1]]; if (fp) { m$3 = (ext = fp).match(/[\.\\]([^\.\\])+$/); if (m$3 && ContentTypeMap[m$3[1]]) return ContentTypeMap[m$3[1]]; } return "application/octet-stream"; } function write_base64_76(bstr) { var data = Base64_encode(bstr); var o$10 = []; for (var i$8 = 0; i$8 < data.length; i$8 += 76) o$10.push(data.slice(i$8, i$8 + 76)); return o$10.join("\r\n") + "\r\n"; } function write_quoted_printable(text$2) { var encoded = text$2.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g, function(c$7) { var w$2 = c$7.charCodeAt(0).toString(16).toUpperCase(); return "=" + (w$2.length == 1 ? "0" + w$2 : w$2); }); encoded = encoded.replace(/ $/gm, "=20").replace(/\t$/gm, "=09"); if (encoded.charAt(0) == "\n") encoded = "=0D" + encoded.slice(1); encoded = encoded.replace(/\r(?!\n)/gm, "=0D").replace(/\n\n/gm, "\n=0A").replace(/([^\r\n])\n/gm, "$1=0A"); var o$10 = [], split = encoded.split("\r\n"); for (var si = 0; si < split.length; ++si) { var str = split[si]; if (str.length == 0) { o$10.push(""); continue; } for (var i$8 = 0; i$8 < str.length;) { var end = 76; var tmp = str.slice(i$8, i$8 + end); if (tmp.charAt(end - 1) == "=") end--; else if (tmp.charAt(end - 2) == "=") end -= 2; else if (tmp.charAt(end - 3) == "=") end -= 3; tmp = str.slice(i$8, i$8 + end); i$8 += end; if (i$8 < str.length) tmp += "="; o$10.push(tmp); } } return o$10.join("\r\n"); } function parse_quoted_printable(data) { var o$10 = []; for (var di = 0; di < data.length; ++di) { var line = data[di]; while (di <= data.length && line.charAt(line.length - 1) == "=") line = line.slice(0, line.length - 1) + data[++di]; o$10.push(line); } for (var oi = 0; oi < o$10.length; ++oi) o$10[oi] = o$10[oi].replace(/[=][0-9A-Fa-f]{2}/g, function($$) { return String.fromCharCode(parseInt($$.slice(1), 16)); }); return s2a(o$10.join("\r\n")); } function parse_mime(cfb, data, root) { var fname = "", cte = "", ctype = "", fdata; var di = 0; for (; di < 10; ++di) { var line = data[di]; if (!line || line.match(/^\s*$/)) break; var m$3 = line.match(/^([^:]*?):\s*([^\s].*)$/); if (m$3) switch (m$3[1].toLowerCase()) { case "content-location": fname = m$3[2].trim(); break; case "content-type": ctype = m$3[2].trim(); break; case "content-transfer-encoding": cte = m$3[2].trim(); break; } } ++di; switch (cte.toLowerCase()) { case "base64": fdata = s2a(Base64_decode(data.slice(di).join(""))); break; case "quoted-printable": fdata = parse_quoted_printable(data.slice(di)); break; default: throw new Error("Unsupported Content-Transfer-Encoding " + cte); } var file = cfb_add(cfb, fname.slice(root.length), fdata, { unsafe: true }); if (ctype) file.ctype = ctype; } function parse_mad(file, options) { if (a2s$1(file.slice(0, 13)).toLowerCase() != "mime-version:") throw new Error("Unsupported MAD header"); var root = options && options.root || ""; var data = (has_buf && Buffer.isBuffer(file) ? file.toString("binary") : a2s$1(file)).split("\r\n"); var di = 0, row = ""; for (di = 0; di < data.length; ++di) { row = data[di]; if (!/^Content-Location:/i.test(row)) continue; row = row.slice(row.indexOf("file")); if (!root) root = row.slice(0, row.lastIndexOf("/") + 1); if (row.slice(0, root.length) == root) continue; while (root.length > 0) { root = root.slice(0, root.length - 1); root = root.slice(0, root.lastIndexOf("/") + 1); if (row.slice(0, root.length) == root) break; } } var mboundary = (data[1] || "").match(/boundary="(.*?)"/); if (!mboundary) throw new Error("MAD cannot find boundary"); var boundary = "--" + (mboundary[1] || ""); var FileIndex = [], FullPaths = []; var o$10 = { FileIndex, FullPaths }; init_cfb(o$10); var start_di, fcnt = 0; for (di = 0; di < data.length; ++di) { var line = data[di]; if (line !== boundary && line !== boundary + "--") continue; if (fcnt++) parse_mime(o$10, data.slice(start_di, di), root); start_di = di; } return o$10; } function write_mad(cfb, options) { var opts = options || {}; var boundary = opts.boundary || "SheetJS"; boundary = "------=" + boundary; var out = [ "MIME-Version: 1.0", "Content-Type: multipart/related; boundary=\"" + boundary.slice(2) + "\"", "", "", "" ]; var root = cfb.FullPaths[0], fp = root, fi = cfb.FileIndex[0]; for (var i$8 = 1; i$8 < cfb.FullPaths.length; ++i$8) { fp = cfb.FullPaths[i$8].slice(root.length); fi = cfb.FileIndex[i$8]; if (!fi.size || !fi.content || fp == "Sh33tJ5") continue; fp = fp.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g, function(c$7) { return "_x" + c$7.charCodeAt(0).toString(16) + "_"; }).replace(/[\u0080-\uFFFF]/g, function(u$4) { return "_u" + u$4.charCodeAt(0).toString(16) + "_"; }); var ca = fi.content; var cstr = has_buf && Buffer.isBuffer(ca) ? ca.toString("binary") : a2s$1(ca); var dispcnt = 0, L$2 = Math.min(1024, cstr.length), cc = 0; for (var csl = 0; csl <= L$2; ++csl) if ((cc = cstr.charCodeAt(csl)) >= 32 && cc < 128) ++dispcnt; var qp = dispcnt >= L$2 * 4 / 5; out.push(boundary); out.push("Content-Location: " + (opts.root || "file:///C:/SheetJS/") + fp); out.push("Content-Transfer-Encoding: " + (qp ? "quoted-printable" : "base64")); out.push("Content-Type: " + get_content_type(fi, fp)); out.push(""); out.push(qp ? write_quoted_printable(cstr) : write_base64_76(cstr)); } out.push(boundary + "--\r\n"); return out.join("\r\n"); } function cfb_new(opts) { var o$10 = {}; init_cfb(o$10, opts); return o$10; } function cfb_add(cfb, name, content, opts) { var unsafe = opts && opts.unsafe; if (!unsafe) init_cfb(cfb); var file = !unsafe && CFB.find(cfb, name); if (!file) { var fpath = cfb.FullPaths[0]; if (name.slice(0, fpath.length) == fpath) fpath = name; else { if (fpath.slice(-1) != "/") fpath += "/"; fpath = (fpath + name).replace("//", "/"); } file = { name: filename(name), type: 2 }; cfb.FileIndex.push(file); cfb.FullPaths.push(fpath); if (!unsafe) CFB.utils.cfb_gc(cfb); } file.content = content; file.size = content ? content.length : 0; if (opts) { if (opts.CLSID) file.clsid = opts.CLSID; if (opts.mt) file.mt = opts.mt; if (opts.ct) file.ct = opts.ct; } return file; } function cfb_del(cfb, name) { init_cfb(cfb); var file = CFB.find(cfb, name); if (file) { for (var j$2 = 0; j$2 < cfb.FileIndex.length; ++j$2) if (cfb.FileIndex[j$2] == file) { cfb.FileIndex.splice(j$2, 1); cfb.FullPaths.splice(j$2, 1); return true; } } return false; } function cfb_mov(cfb, old_name, new_name) { init_cfb(cfb); var file = CFB.find(cfb, old_name); if (file) { for (var j$2 = 0; j$2 < cfb.FileIndex.length; ++j$2) if (cfb.FileIndex[j$2] == file) { cfb.FileIndex[j$2].name = filename(new_name); cfb.FullPaths[j$2] = new_name; return true; } } return false; } function cfb_gc(cfb) { rebuild_cfb(cfb, true); } exports$1.find = find; exports$1.read = read; exports$1.parse = parse; exports$1.write = write; exports$1.writeFile = write_file; exports$1.utils = { cfb_new, cfb_add, cfb_del, cfb_mov, cfb_gc, ReadShift, CheckField, prep_blob, bconcat, use_zlib, _deflateRaw: _deflate, _inflateRaw: _inflate, consts }; return exports$1; })(); ; dnthresh = /* @__PURE__ */ Date.UTC(1899, 11, 30, 0, 0, 0); dnthresh1 = /* @__PURE__ */ Date.UTC(1899, 11, 31, 0, 0, 0); dnthresh2 = /* @__PURE__ */ Date.UTC(1904, 0, 1, 0, 0, 0); pdre1 = /^(\d+):(\d+)(:\d+)?(\.\d+)?$/; pdre2 = /^(\d+)-(\d+)-(\d+)$/; pdre3 = /^(\d+)-(\d+)-(\d+)[T ](\d+):(\d+)(:\d+)?(\.\d+)?$/; FDRE1 = /^(0?\d|1[0-2])(?:|:([0-5]?\d)(?:|(\.\d+)(?:|:([0-5]?\d))|:([0-5]?\d)(|\.\d+)))\s+([ap])m?$/; FDRE2 = /^([01]?\d|2[0-3])(?:|:([0-5]?\d)(?:|(\.\d+)(?:|:([0-5]?\d))|:([0-5]?\d)(|\.\d+)))$/; FDISO = /^(\d+)-(\d+)-(\d+)[T ](\d+):(\d+)(:\d+)(\.\d+)?[Z]?$/; utc_append_works = new Date("6/9/69 00:00 UTC").valueOf() == -177984e5; lower_months = [ "january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december" ]; split_regex = /* @__PURE__ */ (function() { var safe_split_regex = "abacaba".split(/(:?b)/i).length == 5; return function split_regex$1(str, re$1, def) { if (safe_split_regex || typeof re$1 == "string") return str.split(re$1); var p$3 = str.split(re$1), o$10 = [p$3[0]]; for (var i$7 = 1; i$7 < p$3.length; ++i$7) { o$10.push(def); o$10.push(p$3[i$7]); } return o$10; }; })(); xml_boundary = { " ": 1, " ": 1, "\r": 1, "\n": 1, ">": 1 }; str_match_xml_ns = /* @__PURE__ */ (function() { var str_match_xml_ns_cache = {}; return function str_match_xml_ns$1(str, tag) { var res = str_match_xml_ns_cache[tag]; if (!res) str_match_xml_ns_cache[tag] = res = [new RegExp("<(?:\\w+:)?" + tag + "\\b[^<>]*>", "g"), new RegExp("", "g")]; res[0].lastIndex = res[1].lastIndex = 0; var m$3 = res[0].exec(str); if (!m$3) return null; var si = m$3.index; var sf = res[0].lastIndex; res[1].lastIndex = res[0].lastIndex; m$3 = res[1].exec(str); if (!m$3) return null; var ei = m$3.index; var ef = res[1].lastIndex; return [str.slice(si, ef), str.slice(sf, ei)]; }; })(); str_match_xml_ns_g = /* @__PURE__ */ (function() { var str_match_xml_ns_cache = {}; return function str_match_xml_ns$1(str, tag) { var out = []; var res = str_match_xml_ns_cache[tag]; if (!res) str_match_xml_ns_cache[tag] = res = [new RegExp("<(?:\\w+:)?" + tag + "\\b[^<>]*>", "g"), new RegExp("", "g")]; res[0].lastIndex = res[1].lastIndex = 0; var m$3; while (m$3 = res[0].exec(str)) { var si = m$3.index; res[1].lastIndex = res[0].lastIndex; m$3 = res[1].exec(str); if (!m$3) return null; var ef = res[1].lastIndex; out.push(str.slice(si, ef)); res[0].lastIndex = res[1].lastIndex; } return out.length == 0 ? null : out; }; })(); str_remove_xml_ns_g = /* @__PURE__ */ (function() { var str_remove_xml_ns_cache = {}; return function str_remove_xml_ns_g$1(str, tag) { var out = []; var res = str_remove_xml_ns_cache[tag]; if (!res) str_remove_xml_ns_cache[tag] = res = [new RegExp("<(?:\\w+:)?" + tag + "\\b[^<>]*>", "g"), new RegExp("", "g")]; res[0].lastIndex = res[1].lastIndex = 0; var m$3; var si = 0, ef = 0; while (m$3 = res[0].exec(str)) { si = m$3.index; out.push(str.slice(ef, si)); ef = si; res[1].lastIndex = res[0].lastIndex; m$3 = res[1].exec(str); if (!m$3) return null; ef = res[1].lastIndex; res[0].lastIndex = res[1].lastIndex; } out.push(str.slice(ef)); return out.length == 0 ? "" : out.join(""); }; })(); str_match_xml_ig = /* @__PURE__ */ (function() { var str_match_xml_ns_cache = {}; return function str_match_xml_ns$1(str, tag) { var out = []; var res = str_match_xml_ns_cache[tag]; if (!res) str_match_xml_ns_cache[tag] = res = [new RegExp("<" + tag + "\\b[^<>]*>", "ig"), new RegExp("", "ig")]; res[0].lastIndex = res[1].lastIndex = 0; var m$3; while (m$3 = res[0].exec(str)) { var si = m$3.index; res[1].lastIndex = res[0].lastIndex; m$3 = res[1].exec(str); if (!m$3) return null; var ef = res[1].lastIndex; out.push(str.slice(si, ef)); res[0].lastIndex = res[1].lastIndex; } return out.length == 0 ? null : out; }; })(); XML_HEADER = "\r\n"; attregexg = /\s([^"\s?>\/]+)\s*=\s*((?:")([^"]*)(?:")|(?:')([^']*)(?:')|([^'">\s]+))/g; tagregex1 = /<[\/\?]?[a-zA-Z0-9:_-]+(?:\s+[^"\s?<>\/]+\s*=\s*(?:"[^"]*"|'[^']*'|[^'"<>\s=]+))*\s*[\/\?]?>/gm, tagregex2 = /<[^<>]*>/g; tagregex = /* @__PURE__ */ XML_HEADER.match(tagregex1) ? tagregex1 : tagregex2; nsregex = /<\w*:/, nsregex2 = /<(\/?)\w+:/; encodings = { """: "\"", "'": "'", ">": ">", "<": "<", "&": "&" }; rencoding = /* @__PURE__ */ evert(encodings); unescapexml = /* @__PURE__ */ (function() { var encregex = /&(?:quot|apos|gt|lt|amp|#x?([\da-fA-F]+));/gi, coderegex = /_x([\da-fA-F]{4})_/gi; function raw_unescapexml(text$2) { var s$5 = text$2 + "", i$7 = s$5.indexOf(" -1 ? 16 : 10)) || $$; }).replace(coderegex, function(m$3, c$7) { return String.fromCharCode(parseInt(c$7, 16)); }); var j$2 = s$5.indexOf("]]>"); return raw_unescapexml(s$5.slice(0, i$7)) + s$5.slice(i$7 + 9, j$2) + raw_unescapexml(s$5.slice(j$2 + 3)); } return function unescapexml$1(text$2, xlsx) { var out = raw_unescapexml(text$2); return xlsx ? out.replace(/\r\n/g, "\n") : out; }; })(); decregex = /[&<>'"]/g, charegex = /[\u0000-\u0008\u000b-\u001f\uFFFE-\uFFFF]/g; htmlcharegex = /[\u0000-\u001f]/g; xlml_fixstr = /* @__PURE__ */ (function() { var entregex = /&#(\d+);/g; function entrepl($$, $1) { return String.fromCharCode(parseInt($1, 10)); } return function xlml_fixstr$1(str) { return str.replace(entregex, entrepl); }; })(); utf8corpus = "foo bar baz☃🍣"; utf8read = has_buf && (/* @__PURE__ */ utf8readc(utf8corpus) == /* @__PURE__ */ utf8reada(utf8corpus) && utf8readc || /* @__PURE__ */ utf8readb(utf8corpus) == /* @__PURE__ */ utf8reada(utf8corpus) && utf8readb) || utf8reada; utf8write = has_buf ? function(data) { return Buffer_from(data, "utf8").toString("binary"); } : function(orig) { var out = [], i$7 = 0, c$7 = 0, d$5 = 0; while (i$7 < orig.length) { c$7 = orig.charCodeAt(i$7++); switch (true) { case c$7 < 128: out.push(String.fromCharCode(c$7)); break; case c$7 < 2048: out.push(String.fromCharCode(192 + (c$7 >> 6))); out.push(String.fromCharCode(128 + (c$7 & 63))); break; case c$7 >= 55296 && c$7 < 57344: c$7 -= 55296; d$5 = orig.charCodeAt(i$7++) - 56320 + (c$7 << 10); out.push(String.fromCharCode(240 + (d$5 >> 18 & 7))); out.push(String.fromCharCode(144 + (d$5 >> 12 & 63))); out.push(String.fromCharCode(128 + (d$5 >> 6 & 63))); out.push(String.fromCharCode(128 + (d$5 & 63))); break; default: out.push(String.fromCharCode(224 + (c$7 >> 12))); out.push(String.fromCharCode(128 + (c$7 >> 6 & 63))); out.push(String.fromCharCode(128 + (c$7 & 63))); } } return out.join(""); }; htmldecode = /* @__PURE__ */ (function() { var entities = [ ["nbsp", " "], ["middot", "·"], ["quot", "\""], ["apos", "'"], ["gt", ">"], ["lt", "<"], ["amp", "&"] ].map(function(x$2) { return [new RegExp("&" + x$2[0] + ";", "ig"), x$2[1]]; }); return function htmldecode$1(str) { var o$10 = str.replace(/^[\t\n\r ]+/, "").replace(/(^|[^\t\n\r ])[\t\n\r ]+$/, "$1").replace(/>\s+/g, ">").replace(/\b\s+/g, "\n").replace(/<[^<>]*>/g, ""); for (var i$7 = 0; i$7 < entities.length; ++i$7) o$10 = o$10.replace(entities[i$7][0], entities[i$7][1]); return o$10; }; })(); vtvregex = /<\/?(?:vt:)?variant>/g, vtmregex = /<(?:vt:)([^<"'>]*)>([\s\S]*):\/"]+)(?:\s+[^<>=?"'\s]+="[^"]*?")*\s*[\/]?>/gm; XMLNS = { CORE_PROPS: "http://schemas.openxmlformats.org/package/2006/metadata/core-properties", CUST_PROPS: "http://schemas.openxmlformats.org/officeDocument/2006/custom-properties", EXT_PROPS: "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties", CT: "http://schemas.openxmlformats.org/package/2006/content-types", RELS: "http://schemas.openxmlformats.org/package/2006/relationships", TCMNT: "http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments", "dc": "http://purl.org/dc/elements/1.1/", "dcterms": "http://purl.org/dc/terms/", "dcmitype": "http://purl.org/dc/dcmitype/", "mx": "http://schemas.microsoft.com/office/mac/excel/2008/main", "r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships", "sjs": "http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties", "vt": "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes", "xsi": "http://www.w3.org/2001/XMLSchema-instance", "xsd": "http://www.w3.org/2001/XMLSchema" }; XMLNS_main = [ "http://schemas.openxmlformats.org/spreadsheetml/2006/main", "http://purl.oclc.org/ooxml/spreadsheetml/main", "http://schemas.microsoft.com/office/excel/2006/main", "http://schemas.microsoft.com/office/excel/2006/2" ]; XLMLNS = { "o": "urn:schemas-microsoft-com:office:office", "x": "urn:schemas-microsoft-com:office:excel", "ss": "urn:schemas-microsoft-com:office:spreadsheet", "dt": "uuid:C2F41010-65B3-11d1-A29F-00AA00C14882", "mv": "http://macVmlSchemaUri", "v": "urn:schemas-microsoft-com:vml", "html": "http://www.w3.org/TR/REC-html40" }; ___toBuffer = function(bufs) { var x$2 = [], w$2 = 10240; for (var i$7 = 0; i$7 < bufs[0].length; ++i$7) if (bufs[0][i$7]) for (var j$2 = 0, L$2 = bufs[0][i$7].length; j$2 < L$2; j$2 += w$2) x$2.push.apply(x$2, bufs[0][i$7].slice(j$2, j$2 + w$2)); return x$2; }; __toBuffer = has_buf ? function(bufs) { return bufs[0].length > 0 && Buffer.isBuffer(bufs[0][0]) ? Buffer.concat(bufs[0].map(function(x$2) { return Buffer.isBuffer(x$2) ? x$2 : Buffer_from(x$2); })) : ___toBuffer(bufs); } : ___toBuffer; ___utf16le = function(b$3, s$5, e$10) { var ss = []; for (var i$7 = s$5; i$7 < e$10; i$7 += 2) ss.push(String.fromCharCode(__readUInt16LE(b$3, i$7))); return ss.join("").replace(chr0, ""); }; __utf16le = has_buf ? function(b$3, s$5, e$10) { if (!Buffer.isBuffer(b$3) || !buf_utf16le) return ___utf16le(b$3, s$5, e$10); return b$3.toString("utf16le", s$5, e$10).replace(chr0, ""); } : ___utf16le; ___hexlify = function(b$3, s$5, l$3) { var ss = []; for (var i$7 = s$5; i$7 < s$5 + l$3; ++i$7) ss.push(("0" + b$3[i$7].toString(16)).slice(-2)); return ss.join(""); }; __hexlify = has_buf ? function(b$3, s$5, l$3) { return Buffer.isBuffer(b$3) ? b$3.toString("hex", s$5, s$5 + l$3) : ___hexlify(b$3, s$5, l$3); } : ___hexlify; ___utf8 = function(b$3, s$5, e$10) { var ss = []; for (var i$7 = s$5; i$7 < e$10; i$7++) ss.push(String.fromCharCode(__readUInt8(b$3, i$7))); return ss.join(""); }; __utf8 = has_buf ? function utf8_b(b$3, s$5, e$10) { return Buffer.isBuffer(b$3) ? b$3.toString("utf8", s$5, e$10) : ___utf8(b$3, s$5, e$10); } : ___utf8; ___lpstr = function(b$3, i$7) { var len = __readUInt32LE(b$3, i$7); return len > 0 ? __utf8(b$3, i$7 + 4, i$7 + 4 + len - 1) : ""; }; __lpstr = ___lpstr; ___cpstr = function(b$3, i$7) { var len = __readUInt32LE(b$3, i$7); return len > 0 ? __utf8(b$3, i$7 + 4, i$7 + 4 + len - 1) : ""; }; __cpstr = ___cpstr; ___lpwstr = function(b$3, i$7) { var len = 2 * __readUInt32LE(b$3, i$7); return len > 0 ? __utf8(b$3, i$7 + 4, i$7 + 4 + len - 1) : ""; }; __lpwstr = ___lpwstr; ___lpp4 = function lpp4_(b$3, i$7) { var len = __readUInt32LE(b$3, i$7); return len > 0 ? __utf16le(b$3, i$7 + 4, i$7 + 4 + len) : ""; }; __lpp4 = ___lpp4; ___8lpp4 = function(b$3, i$7) { var len = __readUInt32LE(b$3, i$7); return len > 0 ? __utf8(b$3, i$7 + 4, i$7 + 4 + len) : ""; }; __8lpp4 = ___8lpp4; ___double = function(b$3, idx) { return read_double_le(b$3, idx); }; __double = ___double; is_buf = function is_buf_a(a$2) { return Array.isArray(a$2) || typeof Uint8Array !== "undefined" && a$2 instanceof Uint8Array; }; if (has_buf) { __lpstr = function lpstr_b(b$3, i$7) { if (!Buffer.isBuffer(b$3)) return ___lpstr(b$3, i$7); var len = b$3.readUInt32LE(i$7); return len > 0 ? b$3.toString("utf8", i$7 + 4, i$7 + 4 + len - 1) : ""; }; __cpstr = function cpstr_b(b$3, i$7) { if (!Buffer.isBuffer(b$3)) return ___cpstr(b$3, i$7); var len = b$3.readUInt32LE(i$7); return len > 0 ? b$3.toString("utf8", i$7 + 4, i$7 + 4 + len - 1) : ""; }; __lpwstr = function lpwstr_b(b$3, i$7) { if (!Buffer.isBuffer(b$3) || !buf_utf16le) return ___lpwstr(b$3, i$7); var len = 2 * b$3.readUInt32LE(i$7); return b$3.toString("utf16le", i$7 + 4, i$7 + 4 + len - 1); }; __lpp4 = function lpp4_b(b$3, i$7) { if (!Buffer.isBuffer(b$3) || !buf_utf16le) return ___lpp4(b$3, i$7); var len = b$3.readUInt32LE(i$7); return b$3.toString("utf16le", i$7 + 4, i$7 + 4 + len); }; __8lpp4 = function lpp4_8b(b$3, i$7) { if (!Buffer.isBuffer(b$3)) return ___8lpp4(b$3, i$7); var len = b$3.readUInt32LE(i$7); return b$3.toString("utf8", i$7 + 4, i$7 + 4 + len); }; __double = function double_(b$3, i$7) { if (Buffer.isBuffer(b$3)) return b$3.readDoubleLE(i$7); return ___double(b$3, i$7); }; is_buf = function is_buf_b(a$2) { return Buffer.isBuffer(a$2) || Array.isArray(a$2) || typeof Uint8Array !== "undefined" && a$2 instanceof Uint8Array; }; } if (typeof $cptable !== "undefined") cpdoit(); __readUInt8 = function(b$3, idx) { return b$3[idx]; }; __readUInt16LE = function(b$3, idx) { return b$3[idx + 1] * (1 << 8) + b$3[idx]; }; __readInt16LE = function(b$3, idx) { var u$4 = b$3[idx + 1] * (1 << 8) + b$3[idx]; return u$4 < 32768 ? u$4 : (65535 - u$4 + 1) * -1; }; __readUInt32LE = function(b$3, idx) { return b$3[idx + 3] * (1 << 24) + (b$3[idx + 2] << 16) + (b$3[idx + 1] << 8) + b$3[idx]; }; __readInt32LE = function(b$3, idx) { return b$3[idx + 3] << 24 | b$3[idx + 2] << 16 | b$3[idx + 1] << 8 | b$3[idx]; }; __readInt32BE = function(b$3, idx) { return b$3[idx] << 24 | b$3[idx + 1] << 16 | b$3[idx + 2] << 8 | b$3[idx + 3]; }; __writeUInt32LE = function(b$3, val$1, idx) { b$3[idx] = val$1 & 255; b$3[idx + 1] = val$1 >>> 8 & 255; b$3[idx + 2] = val$1 >>> 16 & 255; b$3[idx + 3] = val$1 >>> 24 & 255; }; __writeInt32LE = function(b$3, val$1, idx) { b$3[idx] = val$1 & 255; b$3[idx + 1] = val$1 >> 8 & 255; b$3[idx + 2] = val$1 >> 16 & 255; b$3[idx + 3] = val$1 >> 24 & 255; }; __writeUInt16LE = function(b$3, val$1, idx) { b$3[idx] = val$1 & 255; b$3[idx + 1] = val$1 >>> 8 & 255; }; parse_BrtCommentText = parse_RichStr; parse_XLSBCodeName = parse_XLWideString; write_XLSBCodeName = write_XLWideString; parse_XLNameWideString = parse_XLWideString; parse_RelID = parse_XLNullableWideString; write_RelID = write_XLNullableWideString; parse_UncheckedRfX = parse_RfX; write_UncheckedRfX = write_RfX; VT_I2 = 2; VT_I4 = 3; VT_BOOL = 11; VT_VARIANT = 12; VT_UI4 = 19; VT_FILETIME = 64; VT_BLOB = 65; VT_CF = 71; VT_VECTOR_VARIANT = 4108; VT_VECTOR_LPSTR = 4126; VT_STRING = 80; VT_USTR = 81; VT_CUSTOM = [VT_STRING, VT_USTR]; DocSummaryPIDDSI = { 1: { n: "CodePage", t: VT_I2 }, 2: { n: "Category", t: VT_STRING }, 3: { n: "PresentationFormat", t: VT_STRING }, 4: { n: "ByteCount", t: VT_I4 }, 5: { n: "LineCount", t: VT_I4 }, 6: { n: "ParagraphCount", t: VT_I4 }, 7: { n: "SlideCount", t: VT_I4 }, 8: { n: "NoteCount", t: VT_I4 }, 9: { n: "HiddenCount", t: VT_I4 }, 10: { n: "MultimediaClipCount", t: VT_I4 }, 11: { n: "ScaleCrop", t: VT_BOOL }, 12: { n: "HeadingPairs", t: VT_VECTOR_VARIANT }, 13: { n: "TitlesOfParts", t: VT_VECTOR_LPSTR }, 14: { n: "Manager", t: VT_STRING }, 15: { n: "Company", t: VT_STRING }, 16: { n: "LinksUpToDate", t: VT_BOOL }, 17: { n: "CharacterCount", t: VT_I4 }, 19: { n: "SharedDoc", t: VT_BOOL }, 22: { n: "HyperlinksChanged", t: VT_BOOL }, 23: { n: "AppVersion", t: VT_I4, p: "version" }, 24: { n: "DigSig", t: VT_BLOB }, 26: { n: "ContentType", t: VT_STRING }, 27: { n: "ContentStatus", t: VT_STRING }, 28: { n: "Language", t: VT_STRING }, 29: { n: "Version", t: VT_STRING }, 255: {}, 2147483648: { n: "Locale", t: VT_UI4 }, 2147483651: { n: "Behavior", t: VT_UI4 }, 1919054434: {} }; SummaryPIDSI = { 1: { n: "CodePage", t: VT_I2 }, 2: { n: "Title", t: VT_STRING }, 3: { n: "Subject", t: VT_STRING }, 4: { n: "Author", t: VT_STRING }, 5: { n: "Keywords", t: VT_STRING }, 6: { n: "Comments", t: VT_STRING }, 7: { n: "Template", t: VT_STRING }, 8: { n: "LastAuthor", t: VT_STRING }, 9: { n: "RevNumber", t: VT_STRING }, 10: { n: "EditTime", t: VT_FILETIME }, 11: { n: "LastPrinted", t: VT_FILETIME }, 12: { n: "CreatedDate", t: VT_FILETIME }, 13: { n: "ModifiedDate", t: VT_FILETIME }, 14: { n: "PageCount", t: VT_I4 }, 15: { n: "WordCount", t: VT_I4 }, 16: { n: "CharCount", t: VT_I4 }, 17: { n: "Thumbnail", t: VT_CF }, 18: { n: "Application", t: VT_STRING }, 19: { n: "DocSecurity", t: VT_I4 }, 255: {}, 2147483648: { n: "Locale", t: VT_UI4 }, 2147483651: { n: "Behavior", t: VT_UI4 }, 1919054434: {} }; CountryEnum = { 1: "US", 2: "CA", 3: "", 7: "RU", 20: "EG", 30: "GR", 31: "NL", 32: "BE", 33: "FR", 34: "ES", 36: "HU", 39: "IT", 41: "CH", 43: "AT", 44: "GB", 45: "DK", 46: "SE", 47: "NO", 48: "PL", 49: "DE", 52: "MX", 55: "BR", 61: "AU", 64: "NZ", 66: "TH", 81: "JP", 82: "KR", 84: "VN", 86: "CN", 90: "TR", 105: "JS", 213: "DZ", 216: "MA", 218: "LY", 351: "PT", 354: "IS", 358: "FI", 420: "CZ", 886: "TW", 961: "LB", 962: "JO", 963: "SY", 964: "IQ", 965: "KW", 966: "SA", 971: "AE", 972: "IL", 974: "QA", 981: "IR", 65535: "US" }; XLSFillPattern = [ null, "solid", "mediumGray", "darkGray", "lightGray", "darkHorizontal", "darkVertical", "darkDown", "darkUp", "darkGrid", "darkTrellis", "lightHorizontal", "lightVertical", "lightDown", "lightUp", "lightGrid", "lightTrellis", "gray125", "gray0625" ]; _XLSIcv = /* @__PURE__ */ rgbify([ 0, 16777215, 16711680, 65280, 255, 16776960, 16711935, 65535, 0, 16777215, 16711680, 65280, 255, 16776960, 16711935, 65535, 8388608, 32768, 128, 8421376, 8388736, 32896, 12632256, 8421504, 10066431, 10040166, 16777164, 13434879, 6684774, 16744576, 26316, 13421823, 128, 16711935, 16776960, 65535, 8388736, 8388608, 32896, 255, 52479, 13434879, 13434828, 16777113, 10079487, 16751052, 13408767, 16764057, 3368703, 3394764, 10079232, 16763904, 16750848, 16737792, 6710937, 9868950, 13158, 3381606, 13056, 3355392, 10040064, 10040166, 3355545, 3355443, 0, 16777215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]); XLSIcv = /* @__PURE__ */ dup(_XLSIcv); BErr = { 0: "#NULL!", 7: "#DIV/0!", 15: "#VALUE!", 23: "#REF!", 29: "#NAME?", 36: "#NUM!", 42: "#N/A", 43: "#GETTING_DATA", 255: "#WTF?" }; RBErr = { "#NULL!": 0, "#DIV/0!": 7, "#VALUE!": 15, "#REF!": 23, "#NAME?": 29, "#NUM!": 36, "#N/A": 42, "#GETTING_DATA": 43, "#WTF?": 255 }; XLSLblBuiltIn = [ "_xlnm.Consolidate_Area", "_xlnm.Auto_Open", "_xlnm.Auto_Close", "_xlnm.Extract", "_xlnm.Database", "_xlnm.Criteria", "_xlnm.Print_Area", "_xlnm.Print_Titles", "_xlnm.Recorder", "_xlnm.Data_Form", "_xlnm.Auto_Activate", "_xlnm.Auto_Deactivate", "_xlnm.Sheet_Title", "_xlnm._FilterDatabase" ]; ct2type = { "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": "workbooks", "application/vnd.ms-excel.sheet.macroEnabled.main+xml": "workbooks", "application/vnd.ms-excel.sheet.binary.macroEnabled.main": "workbooks", "application/vnd.ms-excel.addin.macroEnabled.main+xml": "workbooks", "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": "workbooks", "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": "sheets", "application/vnd.ms-excel.worksheet": "sheets", "application/vnd.ms-excel.binIndexWs": "TODO", "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": "charts", "application/vnd.ms-excel.chartsheet": "charts", "application/vnd.ms-excel.macrosheet+xml": "macros", "application/vnd.ms-excel.macrosheet": "macros", "application/vnd.ms-excel.intlmacrosheet": "TODO", "application/vnd.ms-excel.binIndexMs": "TODO", "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": "dialogs", "application/vnd.ms-excel.dialogsheet": "dialogs", "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml": "strs", "application/vnd.ms-excel.sharedStrings": "strs", "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": "styles", "application/vnd.ms-excel.styles": "styles", "application/vnd.openxmlformats-package.core-properties+xml": "coreprops", "application/vnd.openxmlformats-officedocument.custom-properties+xml": "custprops", "application/vnd.openxmlformats-officedocument.extended-properties+xml": "extprops", "application/vnd.openxmlformats-officedocument.customXmlProperties+xml": "TODO", "application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty": "TODO", "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": "comments", "application/vnd.ms-excel.comments": "comments", "application/vnd.ms-excel.threadedcomments+xml": "threadedcomments", "application/vnd.ms-excel.person+xml": "people", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml": "metadata", "application/vnd.ms-excel.sheetMetadata": "metadata", "application/vnd.ms-excel.pivotTable": "TODO", "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml": "TODO", "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": "TODO", "application/vnd.ms-office.chartcolorstyle+xml": "TODO", "application/vnd.ms-office.chartstyle+xml": "TODO", "application/vnd.ms-office.chartex+xml": "TODO", "application/vnd.ms-excel.calcChain": "calcchains", "application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml": "calcchains", "application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings": "TODO", "application/vnd.ms-office.activeX": "TODO", "application/vnd.ms-office.activeX+xml": "TODO", "application/vnd.ms-excel.attachedToolbars": "TODO", "application/vnd.ms-excel.connections": "TODO", "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": "TODO", "application/vnd.ms-excel.externalLink": "links", "application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml": "links", "application/vnd.ms-excel.pivotCacheDefinition": "TODO", "application/vnd.ms-excel.pivotCacheRecords": "TODO", "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml": "TODO", "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml": "TODO", "application/vnd.ms-excel.queryTable": "TODO", "application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml": "TODO", "application/vnd.ms-excel.userNames": "TODO", "application/vnd.ms-excel.revisionHeaders": "TODO", "application/vnd.ms-excel.revisionLog": "TODO", "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml": "TODO", "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml": "TODO", "application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml": "TODO", "application/vnd.ms-excel.tableSingleCells": "TODO", "application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml": "TODO", "application/vnd.ms-excel.slicer": "TODO", "application/vnd.ms-excel.slicerCache": "TODO", "application/vnd.ms-excel.slicer+xml": "TODO", "application/vnd.ms-excel.slicerCache+xml": "TODO", "application/vnd.ms-excel.wsSortMap": "TODO", "application/vnd.ms-excel.table": "TODO", "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": "TODO", "application/vnd.openxmlformats-officedocument.theme+xml": "themes", "application/vnd.openxmlformats-officedocument.themeOverride+xml": "TODO", "application/vnd.ms-excel.Timeline+xml": "TODO", "application/vnd.ms-excel.TimelineCache+xml": "TODO", "application/vnd.ms-office.vbaProject": "vba", "application/vnd.ms-office.vbaProjectSignature": "TODO", "application/vnd.ms-office.volatileDependencies": "TODO", "application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml": "TODO", "application/vnd.ms-excel.controlproperties+xml": "TODO", "application/vnd.openxmlformats-officedocument.model+data": "TODO", "application/vnd.ms-excel.Survey+xml": "TODO", "application/vnd.openxmlformats-officedocument.drawing+xml": "drawings", "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": "TODO", "application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml": "TODO", "application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml": "TODO", "application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml": "TODO", "application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml": "TODO", "application/vnd.openxmlformats-officedocument.vmlDrawing": "TODO", "application/vnd.openxmlformats-package.relationships+xml": "rels", "application/vnd.openxmlformats-officedocument.oleObject": "TODO", "image/png": "TODO", "sheet": "js" }; CT_LIST = { workbooks: { xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml", xlsm: "application/vnd.ms-excel.sheet.macroEnabled.main+xml", xlsb: "application/vnd.ms-excel.sheet.binary.macroEnabled.main", xlam: "application/vnd.ms-excel.addin.macroEnabled.main+xml", xltx: "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml" }, strs: { xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml", xlsb: "application/vnd.ms-excel.sharedStrings" }, comments: { xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml", xlsb: "application/vnd.ms-excel.comments" }, sheets: { xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml", xlsb: "application/vnd.ms-excel.worksheet" }, charts: { xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml", xlsb: "application/vnd.ms-excel.chartsheet" }, dialogs: { xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml", xlsb: "application/vnd.ms-excel.dialogsheet" }, macros: { xlsx: "application/vnd.ms-excel.macrosheet+xml", xlsb: "application/vnd.ms-excel.macrosheet" }, metadata: { xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml", xlsb: "application/vnd.ms-excel.sheetMetadata" }, styles: { xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml", xlsb: "application/vnd.ms-excel.styles" } }; RELS = { WB: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", SHEET: "http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument", HLINK: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", VML: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing", XPATH: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath", XMISS: "http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing", XLINK: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink", CXML: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CXMLP: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", CMNT: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments", CORE_PROPS: "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties", EXT_PROPS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties", CUST_PROPS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties", SST: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings", STY: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles", THEME: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme", CHART: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart", CHARTEX: "http://schemas.microsoft.com/office/2014/relationships/chartEx", CS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet", WS: ["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet", "http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"], DS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet", MS: "http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet", IMG: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", DRAW: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing", XLMETA: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata", TCMNT: "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment", PEOPLE: "http://schemas.microsoft.com/office/2017/10/relationships/person", CONN: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/connections", VBA: "http://schemas.microsoft.com/office/2006/relationships/vbaProject" }; CT_ODS = "application/vnd.oasis.opendocument.spreadsheet"; CORE_PROPS = [ ["cp:category", "Category"], ["cp:contentStatus", "ContentStatus"], ["cp:keywords", "Keywords"], ["cp:lastModifiedBy", "LastAuthor"], ["cp:lastPrinted", "LastPrinted"], ["cp:revision", "RevNumber"], ["cp:version", "Version"], ["dc:creator", "Author"], ["dc:description", "Comments"], ["dc:identifier", "Identifier"], ["dc:language", "Language"], ["dc:subject", "Subject"], ["dc:title", "Title"], [ "dcterms:created", "CreatedDate", "date" ], [ "dcterms:modified", "ModifiedDate", "date" ] ]; EXT_PROPS = [ [ "Application", "Application", "string" ], [ "AppVersion", "AppVersion", "string" ], [ "Company", "Company", "string" ], [ "DocSecurity", "DocSecurity", "string" ], [ "Manager", "Manager", "string" ], [ "HyperlinksChanged", "HyperlinksChanged", "bool" ], [ "SharedDoc", "SharedDoc", "bool" ], [ "LinksUpToDate", "LinksUpToDate", "bool" ], [ "ScaleCrop", "ScaleCrop", "bool" ], [ "HeadingPairs", "HeadingPairs", "raw" ], [ "TitlesOfParts", "TitlesOfParts", "raw" ] ]; PseudoPropsPairs = [ "Worksheets", "SheetNames", "NamedRanges", "DefinedNames", "Chartsheets", "ChartNames" ]; custregex = /<[^<>]+>[^<]*/g; XLMLDocPropsMap = { Title: "Title", Subject: "Subject", Author: "Author", Keywords: "Keywords", Comments: "Description", LastAuthor: "LastAuthor", RevNumber: "Revision", Application: "AppName", LastPrinted: "LastPrinted", CreatedDate: "Created", ModifiedDate: "LastSaved", Category: "Category", Manager: "Manager", Company: "Company", AppVersion: "Version", ContentStatus: "ContentStatus", Identifier: "Identifier", Language: "Language" }; ; XLSPSSkip = [ "CodePage", "Thumbnail", "_PID_LINKBASE", "_PID_HLINKS", "SystemIdentifier", "FMTID" ]; parse_Ref = parse_RefU; FtTab = { 0: parse_FtSkip, 4: parse_FtSkip, 5: parse_FtSkip, 6: parse_FtSkip, 7: parse_FtCf, 8: parse_FtSkip, 9: parse_FtSkip, 10: parse_FtSkip, 11: parse_FtSkip, 12: parse_FtSkip, 13: parse_FtNts, 14: parse_FtSkip, 15: parse_FtSkip, 16: parse_FtSkip, 17: parse_FtSkip, 18: parse_FtSkip, 19: parse_FtSkip, 20: parse_FtSkip, 21: parse_FtCmo }; parse_BIFF2Format = parse_XLUnicodeString2; write_BIFF4XF = write_BIFF3XF; parse_XLHeaderFooter = parse_OptXLUnicodeString; parse_BIFF5OT = { 8: function(blob, length) { var tgt = blob.l + length; blob.l += 10; var cf = blob.read_shift(2); blob.l += 4; blob.l += 2; blob.l += 2; blob.l += 2; blob.l += 4; var cchName = blob.read_shift(1); blob.l += cchName; blob.l = tgt; return { fmt: cf }; } }; parse_Blank = parse_XLSCell; parse_Scl = parseuint16a; parse_String = parse_XLUnicodeString; DBF_SUPPORTED_VERSIONS = [ 2, 3, 48, 49, 131, 139, 140, 245 ]; DBF = /* @__PURE__ */ (function() { var dbf_codepage_map = { 1: 437, 2: 850, 3: 1252, 4: 1e4, 100: 852, 101: 866, 102: 865, 103: 861, 104: 895, 105: 620, 106: 737, 107: 857, 120: 950, 121: 949, 122: 936, 123: 932, 124: 874, 125: 1255, 126: 1256, 150: 10007, 151: 10029, 152: 10006, 200: 1250, 201: 1251, 202: 1254, 203: 1253, 0: 20127, 8: 865, 9: 437, 10: 850, 11: 437, 13: 437, 14: 850, 15: 437, 16: 850, 17: 437, 18: 850, 19: 932, 20: 850, 21: 437, 22: 850, 23: 865, 24: 437, 25: 437, 26: 850, 27: 437, 28: 863, 29: 850, 31: 852, 34: 852, 35: 852, 36: 860, 37: 850, 38: 866, 55: 850, 64: 852, 77: 936, 78: 949, 79: 950, 80: 874, 87: 1252, 88: 1252, 89: 1252, 108: 863, 134: 737, 135: 852, 136: 857, 204: 1257, 255: 16969 }; var dbf_reverse_map = evert({ 1: 437, 2: 850, 3: 1252, 4: 1e4, 100: 852, 101: 866, 102: 865, 103: 861, 104: 895, 105: 620, 106: 737, 107: 857, 120: 950, 121: 949, 122: 936, 123: 932, 124: 874, 125: 1255, 126: 1256, 150: 10007, 151: 10029, 152: 10006, 200: 1250, 201: 1251, 202: 1254, 203: 1253, 0: 20127 }); function dbf_to_aoa(buf, opts) { var out = []; var d$5 = new_raw_buf(1); switch (opts.type) { case "base64": d$5 = s2a(Base64_decode(buf)); break; case "binary": d$5 = s2a(buf); break; case "buffer": case "array": d$5 = buf; break; } prep_blob(d$5, 0); var ft = d$5.read_shift(1); var memo = !!(ft & 136); var vfp = false, l7 = false; switch (ft) { case 2: break; case 3: break; case 48: vfp = true; memo = true; break; case 49: vfp = true; memo = true; break; case 131: break; case 139: break; case 140: l7 = true; break; case 245: break; default: throw new Error("DBF Unsupported Version: " + ft.toString(16)); } var nrow = 0, fpos = 521; if (ft == 2) nrow = d$5.read_shift(2); d$5.l += 3; if (ft != 2) nrow = d$5.read_shift(4); if (nrow > 1048576) nrow = 1e6; if (ft != 2) fpos = d$5.read_shift(2); var rlen = d$5.read_shift(2); var current_cp = opts.codepage || 1252; if (ft != 2) { d$5.l += 16; d$5.read_shift(1); if (d$5[d$5.l] !== 0) current_cp = dbf_codepage_map[d$5[d$5.l]]; d$5.l += 1; d$5.l += 2; } if (l7) d$5.l += 36; var fields = [], field = {}; var hend = Math.min(d$5.length, ft == 2 ? 521 : fpos - 10 - (vfp ? 264 : 0)); var ww = l7 ? 32 : 11; while (d$5.l < hend && d$5[d$5.l] != 13) { field = {}; field.name = (typeof $cptable !== "undefined" ? $cptable.utils.decode(current_cp, d$5.slice(d$5.l, d$5.l + ww)) : a2s(d$5.slice(d$5.l, d$5.l + ww))).replace(/[\u0000\r\n][\S\s]*$/g, ""); d$5.l += ww; field.type = String.fromCharCode(d$5.read_shift(1)); if (ft != 2 && !l7) field.offset = d$5.read_shift(4); field.len = d$5.read_shift(1); if (ft == 2) field.offset = d$5.read_shift(2); field.dec = d$5.read_shift(1); if (field.name.length) fields.push(field); if (ft != 2) d$5.l += l7 ? 13 : 14; switch (field.type) { case "B": if ((!vfp || field.len != 8) && opts.WTF) console.log("Skipping " + field.name + ":" + field.type); break; case "G": case "P": if (opts.WTF) console.log("Skipping " + field.name + ":" + field.type); break; case "+": case "0": case "@": case "C": case "D": case "F": case "I": case "L": case "M": case "N": case "O": case "T": case "Y": break; default: throw new Error("Unknown Field Type: " + field.type); } } if (d$5[d$5.l] !== 13) d$5.l = fpos - 1; if (d$5.read_shift(1) !== 13) throw new Error("DBF Terminator not found " + d$5.l + " " + d$5[d$5.l]); d$5.l = fpos; var R$1 = 0, C$2 = 0; out[0] = []; for (C$2 = 0; C$2 != fields.length; ++C$2) out[0][C$2] = fields[C$2].name; while (nrow-- > 0) { if (d$5[d$5.l] === 42) { d$5.l += rlen; continue; } ++d$5.l; out[++R$1] = []; C$2 = 0; for (C$2 = 0; C$2 != fields.length; ++C$2) { var dd = d$5.slice(d$5.l, d$5.l + fields[C$2].len); d$5.l += fields[C$2].len; prep_blob(dd, 0); var s$5 = typeof $cptable !== "undefined" ? $cptable.utils.decode(current_cp, dd) : a2s(dd); switch (fields[C$2].type) { case "C": if (s$5.trim().length) out[R$1][C$2] = s$5.replace(/([^\s])\s+$/, "$1"); break; case "D": if (s$5.length === 8) { out[R$1][C$2] = new Date(Date.UTC(+s$5.slice(0, 4), +s$5.slice(4, 6) - 1, +s$5.slice(6, 8), 0, 0, 0, 0)); if (!(opts && opts.UTC)) { out[R$1][C$2] = utc_to_local(out[R$1][C$2]); } } else out[R$1][C$2] = s$5; break; case "F": out[R$1][C$2] = parseFloat(s$5.trim()); break; case "+": case "I": out[R$1][C$2] = l7 ? dd.read_shift(-4, "i") ^ 2147483648 : dd.read_shift(4, "i"); break; case "L": switch (s$5.trim().toUpperCase()) { case "Y": case "T": out[R$1][C$2] = true; break; case "N": case "F": out[R$1][C$2] = false; break; case "": case "\0": case "?": break; default: throw new Error("DBF Unrecognized L:|" + s$5 + "|"); } break; case "M": if (!memo) throw new Error("DBF Unexpected MEMO for type " + ft.toString(16)); out[R$1][C$2] = "##MEMO##" + (l7 ? parseInt(s$5.trim(), 10) : dd.read_shift(4)); break; case "N": s$5 = s$5.replace(/\u0000/g, "").trim(); if (s$5 && s$5 != ".") out[R$1][C$2] = +s$5 || 0; break; case "@": out[R$1][C$2] = new Date(dd.read_shift(-8, "f") - 621356832e5); break; case "T": { var hi = dd.read_shift(4), lo = dd.read_shift(4); if (hi == 0 && lo == 0) break; out[R$1][C$2] = new Date((hi - 2440588) * 864e5 + lo); if (!(opts && opts.UTC)) out[R$1][C$2] = utc_to_local(out[R$1][C$2]); } break; case "Y": out[R$1][C$2] = dd.read_shift(4, "i") / 1e4 + dd.read_shift(4, "i") / 1e4 * Math.pow(2, 32); break; case "O": out[R$1][C$2] = -dd.read_shift(-8, "f"); break; case "B": if (vfp && fields[C$2].len == 8) { out[R$1][C$2] = dd.read_shift(8, "f"); break; } case "G": case "P": dd.l += fields[C$2].len; break; case "0": if (fields[C$2].name === "_NullFlags") break; default: throw new Error("DBF Unsupported data type " + fields[C$2].type); } } } if (ft != 2) { if (d$5.l < d$5.length && d$5[d$5.l++] != 26) throw new Error("DBF EOF Marker missing " + (d$5.l - 1) + " of " + d$5.length + " " + d$5[d$5.l - 1].toString(16)); } if (opts && opts.sheetRows) out = out.slice(0, opts.sheetRows); opts.DBF = fields; return out; } function dbf_to_sheet(buf, opts) { var o$10 = opts || {}; if (!o$10.dateNF) o$10.dateNF = "yyyymmdd"; var ws = aoa_to_sheet(dbf_to_aoa(buf, o$10), o$10); ws["!cols"] = o$10.DBF.map(function(field) { return { wch: field.len, DBF: field }; }); delete o$10.DBF; return ws; } function dbf_to_workbook(buf, opts) { try { var o$10 = sheet_to_workbook(dbf_to_sheet(buf, opts), opts); o$10.bookType = "dbf"; return o$10; } catch (e$10) { if (opts && opts.WTF) throw e$10; } return { SheetNames: [], Sheets: {} }; } var _RLEN = { "B": 8, "C": 250, "L": 1, "D": 8, "?": 0, "": 0 }; function sheet_to_dbf(ws, opts) { if (!ws["!ref"]) throw new Error("Cannot export empty sheet to DBF"); var o$10 = opts || {}; var old_cp = current_codepage; if (+o$10.codepage >= 0) set_cp(+o$10.codepage); if (o$10.type == "string") throw new Error("Cannot write DBF to JS string"); var ba = buf_array(); var aoa = sheet_to_json(ws, { header: 1, raw: true, cellDates: true }); var headers = aoa[0], data = aoa.slice(1), cols = ws["!cols"] || []; var i$7 = 0, j$2 = 0, hcnt = 0, rlen = 1; for (i$7 = 0; i$7 < headers.length; ++i$7) { if (((cols[i$7] || {}).DBF || {}).name) { headers[i$7] = cols[i$7].DBF.name; ++hcnt; continue; } if (headers[i$7] == null) continue; ++hcnt; if (typeof headers[i$7] === "number") headers[i$7] = headers[i$7].toString(10); if (typeof headers[i$7] !== "string") throw new Error("DBF Invalid column name " + headers[i$7] + " |" + typeof headers[i$7] + "|"); if (headers.indexOf(headers[i$7]) !== i$7) { for (j$2 = 0; j$2 < 1024; ++j$2) if (headers.indexOf(headers[i$7] + "_" + j$2) == -1) { headers[i$7] += "_" + j$2; break; } } } var range = safe_decode_range(ws["!ref"]); var coltypes = []; var colwidths = []; var coldecimals = []; for (i$7 = 0; i$7 <= range.e.c - range.s.c; ++i$7) { var guess = "", _guess = "", maxlen = 0; var col = []; for (j$2 = 0; j$2 < data.length; ++j$2) { if (data[j$2][i$7] != null) col.push(data[j$2][i$7]); } if (col.length == 0 || headers[i$7] == null) { coltypes[i$7] = "?"; continue; } for (j$2 = 0; j$2 < col.length; ++j$2) { switch (typeof col[j$2]) { case "number": _guess = "B"; break; case "string": _guess = "C"; break; case "boolean": _guess = "L"; break; case "object": _guess = col[j$2] instanceof Date ? "D" : "C"; break; default: _guess = "C"; } maxlen = Math.max(maxlen, (typeof $cptable !== "undefined" && typeof col[j$2] == "string" ? $cptable.utils.encode(current_ansi, col[j$2]) : String(col[j$2])).length); guess = guess && guess != _guess ? "C" : _guess; } if (maxlen > 250) maxlen = 250; _guess = ((cols[i$7] || {}).DBF || {}).type; if (_guess == "C") { if (cols[i$7].DBF.len > maxlen) maxlen = cols[i$7].DBF.len; } if (guess == "B" && _guess == "N") { guess = "N"; coldecimals[i$7] = cols[i$7].DBF.dec; maxlen = cols[i$7].DBF.len; } colwidths[i$7] = guess == "C" || _guess == "N" ? maxlen : _RLEN[guess] || 0; rlen += colwidths[i$7]; coltypes[i$7] = guess; } var h$5 = ba.next(32); h$5.write_shift(4, 318902576); h$5.write_shift(4, data.length); h$5.write_shift(2, 296 + 32 * hcnt); h$5.write_shift(2, rlen); for (i$7 = 0; i$7 < 4; ++i$7) h$5.write_shift(4, 0); var cp = +dbf_reverse_map[current_codepage] || 3; h$5.write_shift(4, 0 | cp << 8); if (dbf_codepage_map[cp] != +o$10.codepage) { if (o$10.codepage) console.error("DBF Unsupported codepage " + current_codepage + ", using 1252"); current_codepage = 1252; } for (i$7 = 0, j$2 = 0; i$7 < headers.length; ++i$7) { if (headers[i$7] == null) continue; var hf = ba.next(32); var _f = (headers[i$7].slice(-10) + "\0\0\0\0\0\0\0\0\0\0\0").slice(0, 11); hf.write_shift(1, _f, "sbcs"); hf.write_shift(1, coltypes[i$7] == "?" ? "C" : coltypes[i$7], "sbcs"); hf.write_shift(4, j$2); hf.write_shift(1, colwidths[i$7] || _RLEN[coltypes[i$7]] || 0); hf.write_shift(1, coldecimals[i$7] || 0); hf.write_shift(1, 2); hf.write_shift(4, 0); hf.write_shift(1, 0); hf.write_shift(4, 0); hf.write_shift(4, 0); j$2 += colwidths[i$7] || _RLEN[coltypes[i$7]] || 0; } var hb = ba.next(264); hb.write_shift(4, 13); for (i$7 = 0; i$7 < 65; ++i$7) hb.write_shift(4, 0); for (i$7 = 0; i$7 < data.length; ++i$7) { var rout = ba.next(rlen); rout.write_shift(1, 0); for (j$2 = 0; j$2 < headers.length; ++j$2) { if (headers[j$2] == null) continue; switch (coltypes[j$2]) { case "L": rout.write_shift(1, data[i$7][j$2] == null ? 63 : data[i$7][j$2] ? 84 : 70); break; case "B": rout.write_shift(8, data[i$7][j$2] || 0, "f"); break; case "N": var _n = "0"; if (typeof data[i$7][j$2] == "number") _n = data[i$7][j$2].toFixed(coldecimals[j$2] || 0); if (_n.length > colwidths[j$2]) _n = _n.slice(0, colwidths[j$2]); for (hcnt = 0; hcnt < colwidths[j$2] - _n.length; ++hcnt) rout.write_shift(1, 32); rout.write_shift(1, _n, "sbcs"); break; case "D": if (!data[i$7][j$2]) rout.write_shift(8, "00000000", "sbcs"); else { rout.write_shift(4, ("0000" + data[i$7][j$2].getFullYear()).slice(-4), "sbcs"); rout.write_shift(2, ("00" + (data[i$7][j$2].getMonth() + 1)).slice(-2), "sbcs"); rout.write_shift(2, ("00" + data[i$7][j$2].getDate()).slice(-2), "sbcs"); } break; case "C": var _l = rout.l; var _s = String(data[i$7][j$2] != null ? data[i$7][j$2] : "").slice(0, colwidths[j$2]); rout.write_shift(1, _s, "cpstr"); _l += colwidths[j$2] - rout.l; for (hcnt = 0; hcnt < _l; ++hcnt) rout.write_shift(1, 32); break; } } } current_codepage = old_cp; ba.next(1).write_shift(1, 26); return ba.end(); } return { to_workbook: dbf_to_workbook, to_sheet: dbf_to_sheet, from_sheet: sheet_to_dbf }; })(); SYLK = /* @__PURE__ */ (function() { var sylk_escapes = { AA: "À", BA: "Á", CA: "Â", DA: 195, HA: "Ä", JA: 197, AE: "È", BE: "É", CE: "Ê", HE: "Ë", AI: "Ì", BI: "Í", CI: "Î", HI: "Ï", AO: "Ò", BO: "Ó", CO: "Ô", DO: 213, HO: "Ö", AU: "Ù", BU: "Ú", CU: "Û", HU: "Ü", Aa: "à", Ba: "á", Ca: "â", Da: 227, Ha: "ä", Ja: 229, Ae: "è", Be: "é", Ce: "ê", He: "ë", Ai: "ì", Bi: "í", Ci: "î", Hi: "ï", Ao: "ò", Bo: "ó", Co: "ô", Do: 245, Ho: "ö", Au: "ù", Bu: "ú", Cu: "û", Hu: "ü", KC: "Ç", Kc: "ç", q: "æ", z: "œ", a: "Æ", j: "Œ", DN: 209, Dn: 241, Hy: 255, S: 169, c: 170, R: 174, "B ": 180, 0: 176, 1: 177, 2: 178, 3: 179, 5: 181, 6: 182, 7: 183, Q: 185, k: 186, b: 208, i: 216, l: 222, s: 240, y: 248, "!": 161, "\"": 162, "#": 163, "(": 164, "%": 165, "'": 167, "H ": 168, "+": 171, ";": 187, "<": 188, "=": 189, ">": 190, "?": 191, "{": 223 }; var sylk_char_regex = new RegExp("\x1BN(" + keys(sylk_escapes).join("|").replace(/\|\|\|/, "|\\||").replace(/([?()+])/g, "\\$1").replace("{", "\\{") + "|\\|)", "gm"); try { sylk_char_regex = new RegExp("\x1BN(" + keys(sylk_escapes).join("|").replace(/\|\|\|/, "|\\||").replace(/([?()+])/g, "\\$1") + "|\\|)", "gm"); } catch (e$10) {} var sylk_char_fn = function(_$2, $1) { var o$10 = sylk_escapes[$1]; return typeof o$10 == "number" ? _getansi(o$10) : o$10; }; var decode_sylk_char = function($$, $1, $2) { var newcc = $1.charCodeAt(0) - 32 << 4 | $2.charCodeAt(0) - 48; return newcc == 59 ? $$ : _getansi(newcc); }; sylk_escapes["|"] = 254; var encode_sylk_str = function($$) { return $$.replace(/\n/g, "\x1B :").replace(/\r/g, "\x1B ="); }; function sylk_to_aoa(d$5, opts) { switch (opts.type) { case "base64": return sylk_to_aoa_str(Base64_decode(d$5), opts); case "binary": return sylk_to_aoa_str(d$5, opts); case "buffer": return sylk_to_aoa_str(has_buf && Buffer.isBuffer(d$5) ? d$5.toString("binary") : a2s(d$5), opts); case "array": return sylk_to_aoa_str(cc2str(d$5), opts); } throw new Error("Unrecognized type " + opts.type); } function sylk_to_aoa_str(str, opts) { var records = str.split(/[\n\r]+/), R$1 = -1, C$2 = -1, ri = 0, rj = 0, arr = []; var formats = []; var next_cell_format = null; var sht = {}, rowinfo = [], colinfo = [], cw = []; var Mval = 0, j$2; var wb = { Workbook: { WBProps: {}, Names: [] } }; if (+opts.codepage >= 0) set_cp(+opts.codepage); for (; ri !== records.length; ++ri) { Mval = 0; var rstr = records[ri].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g, decode_sylk_char).replace(sylk_char_regex, sylk_char_fn); var record = rstr.replace(/;;/g, "\0").split(";").map(function(x$2) { return x$2.replace(/\u0000/g, ";"); }); var RT = record[0], val$1; if (rstr.length > 0) switch (RT) { case "ID": break; case "E": break; case "B": break; case "O": for (rj = 1; rj < record.length; ++rj) switch (record[rj].charAt(0)) { case "V": { var d1904 = parseInt(record[rj].slice(1), 10); if (d1904 >= 1 && d1904 <= 4) wb.Workbook.WBProps.date1904 = true; } break; } break; case "W": break; case "P": switch (record[1].charAt(0)) { case "P": formats.push(rstr.slice(3).replace(/;;/g, ";")); break; } break; case "NN": { var nn = { Sheet: 0 }; for (rj = 1; rj < record.length; ++rj) switch (record[rj].charAt(0)) { case "N": nn.Name = record[rj].slice(1); break; case "E": nn.Ref = (opts && opts.sheet || "Sheet1") + "!" + rc_to_a1(record[rj].slice(1)); break; } wb.Workbook.Names.push(nn); } break; case "C": var C_seen_K = false, C_seen_X = false, C_seen_S = false, C_seen_E = false, _R = -1, _C = -1, formula = "", cell_t = "z"; var cmnt = ""; for (rj = 1; rj < record.length; ++rj) switch (record[rj].charAt(0)) { case "A": cmnt = record[rj].slice(1); break; case "X": C$2 = parseInt(record[rj].slice(1), 10) - 1; C_seen_X = true; break; case "Y": R$1 = parseInt(record[rj].slice(1), 10) - 1; if (!C_seen_X) C$2 = 0; for (j$2 = arr.length; j$2 <= R$1; ++j$2) arr[j$2] = []; break; case "K": val$1 = record[rj].slice(1); if (val$1.charAt(0) === "\"") { val$1 = val$1.slice(1, val$1.length - 1); cell_t = "s"; } else if (val$1 === "TRUE" || val$1 === "FALSE") { val$1 = val$1 === "TRUE"; cell_t = "b"; } else if (val$1.charAt(0) == "#" && RBErr[val$1] != null) { cell_t = "e"; val$1 = RBErr[val$1]; } else if (!isNaN(fuzzynum(val$1))) { val$1 = fuzzynum(val$1); cell_t = "n"; if (next_cell_format !== null && fmt_is_date(next_cell_format) && opts.cellDates) { val$1 = numdate(wb.Workbook.WBProps.date1904 ? val$1 + 1462 : val$1); cell_t = typeof val$1 == "number" ? "n" : "d"; } } if (typeof $cptable !== "undefined" && typeof val$1 == "string" && (opts || {}).type != "string" && (opts || {}).codepage) val$1 = $cptable.utils.decode(opts.codepage, val$1); C_seen_K = true; break; case "E": C_seen_E = true; formula = rc_to_a1(record[rj].slice(1), { r: R$1, c: C$2 }); break; case "S": C_seen_S = true; break; case "G": break; case "R": _R = parseInt(record[rj].slice(1), 10) - 1; break; case "C": _C = parseInt(record[rj].slice(1), 10) - 1; break; default: if (opts && opts.WTF) throw new Error("SYLK bad record " + rstr); } if (C_seen_K) { if (!arr[R$1][C$2]) arr[R$1][C$2] = { t: cell_t, v: val$1 }; else { arr[R$1][C$2].t = cell_t; arr[R$1][C$2].v = val$1; } if (next_cell_format) arr[R$1][C$2].z = next_cell_format; if (opts.cellText !== false && next_cell_format) arr[R$1][C$2].w = SSF_format(arr[R$1][C$2].z, arr[R$1][C$2].v, { date1904: wb.Workbook.WBProps.date1904 }); next_cell_format = null; } if (C_seen_S) { if (C_seen_E) throw new Error("SYLK shared formula cannot have own formula"); var shrbase = _R > -1 && arr[_R][_C]; if (!shrbase || !shrbase[1]) throw new Error("SYLK shared formula cannot find base"); formula = shift_formula_str(shrbase[1], { r: R$1 - _R, c: C$2 - _C }); } if (formula) { if (!arr[R$1][C$2]) arr[R$1][C$2] = { t: "n", f: formula }; else arr[R$1][C$2].f = formula; } if (cmnt) { if (!arr[R$1][C$2]) arr[R$1][C$2] = { t: "z" }; arr[R$1][C$2].c = [{ a: "SheetJSYLK", t: cmnt }]; } break; case "F": var F_seen = 0; for (rj = 1; rj < record.length; ++rj) switch (record[rj].charAt(0)) { case "X": C$2 = parseInt(record[rj].slice(1), 10) - 1; ++F_seen; break; case "Y": R$1 = parseInt(record[rj].slice(1), 10) - 1; for (j$2 = arr.length; j$2 <= R$1; ++j$2) arr[j$2] = []; break; case "M": Mval = parseInt(record[rj].slice(1), 10) / 20; break; case "F": break; case "G": break; case "P": next_cell_format = formats[parseInt(record[rj].slice(1), 10)]; break; case "S": break; case "D": break; case "N": break; case "W": cw = record[rj].slice(1).split(" "); for (j$2 = parseInt(cw[0], 10); j$2 <= parseInt(cw[1], 10); ++j$2) { Mval = parseInt(cw[2], 10); colinfo[j$2 - 1] = Mval === 0 ? { hidden: true } : { wch: Mval }; } break; case "C": C$2 = parseInt(record[rj].slice(1), 10) - 1; if (!colinfo[C$2]) colinfo[C$2] = {}; break; case "R": R$1 = parseInt(record[rj].slice(1), 10) - 1; if (!rowinfo[R$1]) rowinfo[R$1] = {}; if (Mval > 0) { rowinfo[R$1].hpt = Mval; rowinfo[R$1].hpx = pt2px(Mval); } else if (Mval === 0) rowinfo[R$1].hidden = true; break; default: if (opts && opts.WTF) throw new Error("SYLK bad record " + rstr); } if (F_seen < 1) next_cell_format = null; break; default: if (opts && opts.WTF) throw new Error("SYLK bad record " + rstr); } } if (rowinfo.length > 0) sht["!rows"] = rowinfo; if (colinfo.length > 0) sht["!cols"] = colinfo; colinfo.forEach(function(col) { process_col(col); }); if (opts && opts.sheetRows) arr = arr.slice(0, opts.sheetRows); return [ arr, sht, wb ]; } function sylk_to_workbook(d$5, opts) { var aoasht = sylk_to_aoa(d$5, opts); var aoa = aoasht[0], ws = aoasht[1], wb = aoasht[2]; var _opts = dup(opts); _opts.date1904 = (((wb || {}).Workbook || {}).WBProps || {}).date1904; var o$10 = aoa_to_sheet(aoa, _opts); keys(ws).forEach(function(k$2) { o$10[k$2] = ws[k$2]; }); var outwb = sheet_to_workbook(o$10, opts); keys(wb).forEach(function(k$2) { outwb[k$2] = wb[k$2]; }); outwb.bookType = "sylk"; return outwb; } function write_ws_cell_sylk(cell, ws, R$1, C$2, opts, date1904) { var o$10 = "C;Y" + (R$1 + 1) + ";X" + (C$2 + 1) + ";K"; switch (cell.t) { case "n": o$10 += isFinite(cell.v) ? cell.v || 0 : BErr[isNaN(cell.v) ? 36 : 7]; if (cell.f && !cell.F) o$10 += ";E" + a1_to_rc(cell.f, { r: R$1, c: C$2 }); break; case "b": o$10 += cell.v ? "TRUE" : "FALSE"; break; case "e": o$10 += cell.w || BErr[cell.v] || cell.v; break; case "d": o$10 += datenum(parseDate(cell.v, date1904), date1904); break; case "s": o$10 += "\"" + (cell.v == null ? "" : String(cell.v)).replace(/"/g, "").replace(/;/g, ";;") + "\""; break; } return o$10; } function write_ws_cmnt_sylk(cmnt, R$1, C$2) { var o$10 = "C;Y" + (R$1 + 1) + ";X" + (C$2 + 1) + ";A"; o$10 += encode_sylk_str(cmnt.map(function(c$7) { return c$7.t; }).join("")); return o$10; } function write_ws_cols_sylk(out, cols) { cols.forEach(function(col, i$7) { var rec = "F;W" + (i$7 + 1) + " " + (i$7 + 1) + " "; if (col.hidden) rec += "0"; else { if (typeof col.width == "number" && !col.wpx) col.wpx = width2px(col.width); if (typeof col.wpx == "number" && !col.wch) col.wch = px2char(col.wpx); if (typeof col.wch == "number") rec += Math.round(col.wch); } if (rec.charAt(rec.length - 1) != " ") out.push(rec); }); } function write_ws_rows_sylk(out, rows) { rows.forEach(function(row, i$7) { var rec = "F;"; if (row.hidden) rec += "M0;"; else if (row.hpt) rec += "M" + 20 * row.hpt + ";"; else if (row.hpx) rec += "M" + 20 * px2pt(row.hpx) + ";"; if (rec.length > 2) out.push(rec + "R" + (i$7 + 1)); }); } function sheet_to_sylk(ws, opts, wb) { if (!opts) opts = {}; opts._formats = ["General"]; var preamble = ["ID;PSheetJS;N;E"], o$10 = []; var r$10 = safe_decode_range(ws["!ref"] || "A1"), cell; var dense = ws["!data"] != null; var RS = "\r\n"; var d1904 = (((wb || {}).Workbook || {}).WBProps || {}).date1904; var _lastfmt = "General"; preamble.push("P;PGeneral"); var R$1 = r$10.s.r, C$2 = r$10.s.c, p$3 = []; if (ws["!ref"]) for (R$1 = r$10.s.r; R$1 <= r$10.e.r; ++R$1) { if (dense && !ws["!data"][R$1]) continue; p$3 = []; for (C$2 = r$10.s.c; C$2 <= r$10.e.c; ++C$2) { cell = dense ? ws["!data"][R$1][C$2] : ws[encode_col(C$2) + encode_row(R$1)]; if (!cell || !cell.c) continue; p$3.push(write_ws_cmnt_sylk(cell.c, R$1, C$2)); } if (p$3.length) o$10.push(p$3.join(RS)); } if (ws["!ref"]) for (R$1 = r$10.s.r; R$1 <= r$10.e.r; ++R$1) { if (dense && !ws["!data"][R$1]) continue; p$3 = []; for (C$2 = r$10.s.c; C$2 <= r$10.e.c; ++C$2) { cell = dense ? ws["!data"][R$1][C$2] : ws[encode_col(C$2) + encode_row(R$1)]; if (!cell || cell.v == null && (!cell.f || cell.F)) continue; if ((cell.z || (cell.t == "d" ? table_fmt[14] : "General")) != _lastfmt) { var ifmt = opts._formats.indexOf(cell.z); if (ifmt == -1) { opts._formats.push(cell.z); ifmt = opts._formats.length - 1; preamble.push("P;P" + cell.z.replace(/;/g, ";;")); } p$3.push("F;P" + ifmt + ";Y" + (R$1 + 1) + ";X" + (C$2 + 1)); } p$3.push(write_ws_cell_sylk(cell, ws, R$1, C$2, opts, d1904)); } o$10.push(p$3.join(RS)); } preamble.push("F;P0;DG0G8;M255"); if (ws["!cols"]) write_ws_cols_sylk(preamble, ws["!cols"]); if (ws["!rows"]) write_ws_rows_sylk(preamble, ws["!rows"]); if (ws["!ref"]) preamble.push("B;Y" + (r$10.e.r - r$10.s.r + 1) + ";X" + (r$10.e.c - r$10.s.c + 1) + ";D" + [ r$10.s.c, r$10.s.r, r$10.e.c, r$10.e.r ].join(" ")); preamble.push("O;L;D;B" + (d1904 ? ";V4" : "") + ";K47;G100 0.001"); delete opts._formats; return preamble.join(RS) + RS + o$10.join(RS) + RS + "E" + RS; } return { to_workbook: sylk_to_workbook, from_sheet: sheet_to_sylk }; })(); DIF = /* @__PURE__ */ (function() { function dif_to_aoa(d$5, opts) { switch (opts.type) { case "base64": return dif_to_aoa_str(Base64_decode(d$5), opts); case "binary": return dif_to_aoa_str(d$5, opts); case "buffer": return dif_to_aoa_str(has_buf && Buffer.isBuffer(d$5) ? d$5.toString("binary") : a2s(d$5), opts); case "array": return dif_to_aoa_str(cc2str(d$5), opts); } throw new Error("Unrecognized type " + opts.type); } function dif_to_aoa_str(str, opts) { var records = str.split("\n"), R$1 = -1, C$2 = -1, ri = 0, arr = []; for (; ri !== records.length; ++ri) { if (records[ri].trim() === "BOT") { arr[++R$1] = []; C$2 = 0; continue; } if (R$1 < 0) continue; var metadata = records[ri].trim().split(","); var type = metadata[0], value = metadata[1]; ++ri; var data = records[ri] || ""; while ((data.match(/["]/g) || []).length & 1 && ri < records.length - 1) data += "\n" + records[++ri]; data = data.trim(); switch (+type) { case -1: if (data === "BOT") { arr[++R$1] = []; C$2 = 0; continue; } else if (data !== "EOD") throw new Error("Unrecognized DIF special command " + data); break; case 0: if (data === "TRUE") arr[R$1][C$2] = true; else if (data === "FALSE") arr[R$1][C$2] = false; else if (!isNaN(fuzzynum(value))) arr[R$1][C$2] = fuzzynum(value); else if (!isNaN(fuzzydate(value).getDate())) { arr[R$1][C$2] = parseDate(value); if (!(opts && opts.UTC)) { arr[R$1][C$2] = utc_to_local(arr[R$1][C$2]); } } else arr[R$1][C$2] = value; ++C$2; break; case 1: data = data.slice(1, data.length - 1); data = data.replace(/""/g, "\""); if (DIF_XL && data && data.match(/^=".*"$/)) data = data.slice(2, -1); arr[R$1][C$2++] = data !== "" ? data : null; break; } if (data === "EOD") break; } if (opts && opts.sheetRows) arr = arr.slice(0, opts.sheetRows); return arr; } function dif_to_sheet(str, opts) { return aoa_to_sheet(dif_to_aoa(str, opts), opts); } function dif_to_workbook(str, opts) { var o$10 = sheet_to_workbook(dif_to_sheet(str, opts), opts); o$10.bookType = "dif"; return o$10; } function make_value(v$3, s$5) { return "0," + String(v$3) + "\r\n" + s$5; } function make_value_str(s$5) { return "1,0\r\n\"" + s$5.replace(/"/g, "\"\"") + "\""; } function sheet_to_dif(ws) { var _DIF_XL = DIF_XL; if (!ws["!ref"]) throw new Error("Cannot export empty sheet to DIF"); var r$10 = safe_decode_range(ws["!ref"]); var dense = ws["!data"] != null; var o$10 = [ "TABLE\r\n0,1\r\n\"sheetjs\"\r\n", "VECTORS\r\n0," + (r$10.e.r - r$10.s.r + 1) + "\r\n\"\"\r\n", "TUPLES\r\n0," + (r$10.e.c - r$10.s.c + 1) + "\r\n\"\"\r\n", "DATA\r\n0,0\r\n\"\"\r\n" ]; for (var R$1 = r$10.s.r; R$1 <= r$10.e.r; ++R$1) { var row = dense ? ws["!data"][R$1] : []; var p$3 = "-1,0\r\nBOT\r\n"; for (var C$2 = r$10.s.c; C$2 <= r$10.e.c; ++C$2) { var cell = dense ? row && row[C$2] : ws[encode_cell({ r: R$1, c: C$2 })]; if (cell == null) { p$3 += "1,0\r\n\"\"\r\n"; continue; } switch (cell.t) { case "n": if (_DIF_XL) { if (cell.w != null) p$3 += "0," + cell.w + "\r\nV"; else if (cell.v != null) p$3 += make_value(cell.v, "V"); else if (cell.f != null && !cell.F) p$3 += make_value_str("=" + cell.f); else p$3 += "1,0\r\n\"\""; } else { if (cell.v == null) p$3 += "1,0\r\n\"\""; else p$3 += make_value(cell.v, "V"); } break; case "b": p$3 += cell.v ? make_value(1, "TRUE") : make_value(0, "FALSE"); break; case "s": p$3 += make_value_str(!_DIF_XL || isNaN(+cell.v) ? cell.v : "=\"" + cell.v + "\""); break; case "d": if (!cell.w) cell.w = SSF_format(cell.z || table_fmt[14], datenum(parseDate(cell.v))); if (_DIF_XL) p$3 += make_value(cell.w, "V"); else p$3 += make_value_str(cell.w); break; default: p$3 += "1,0\r\n\"\""; } p$3 += "\r\n"; } o$10.push(p$3); } return o$10.join("") + "-1,0\r\nEOD"; } return { to_workbook: dif_to_workbook, to_sheet: dif_to_sheet, from_sheet: sheet_to_dif }; })(); ETH = /* @__PURE__ */ (function() { function decode(s$5) { return s$5.replace(/\\b/g, "\\").replace(/\\c/g, ":").replace(/\\n/g, "\n"); } function encode(s$5) { return s$5.replace(/\\/g, "\\b").replace(/:/g, "\\c").replace(/\n/g, "\\n"); } function eth_to_aoa(str, opts) { var records = str.split("\n"), R$1 = -1, C$2 = -1, ri = 0, arr = []; for (; ri !== records.length; ++ri) { var record = records[ri].trim().split(":"); if (record[0] !== "cell") continue; var addr = decode_cell(record[1]); if (arr.length <= addr.r) { for (R$1 = arr.length; R$1 <= addr.r; ++R$1) if (!arr[R$1]) arr[R$1] = []; } R$1 = addr.r; C$2 = addr.c; switch (record[2]) { case "t": arr[R$1][C$2] = decode(record[3]); break; case "v": arr[R$1][C$2] = +record[3]; break; case "vtf": var _f = record[record.length - 1]; case "vtc": switch (record[3]) { case "nl": arr[R$1][C$2] = +record[4] ? true : false; break; default: arr[R$1][C$2] = record[record.length - 1].charAt(0) == "#" ? { t: "e", v: RBErr[record[record.length - 1]] } : +record[4]; break; } if (record[2] == "vtf") arr[R$1][C$2] = [arr[R$1][C$2], _f]; } } if (opts && opts.sheetRows) arr = arr.slice(0, opts.sheetRows); return arr; } function eth_to_sheet(d$5, opts) { return aoa_to_sheet(eth_to_aoa(d$5, opts), opts); } function eth_to_workbook(d$5, opts) { return sheet_to_workbook(eth_to_sheet(d$5, opts), opts); } var header = [ "socialcalc:version:1.5", "MIME-Version: 1.0", "Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave" ].join("\n"); var sep = ["--SocialCalcSpreadsheetControlSave", "Content-type: text/plain; charset=UTF-8"].join("\n") + "\n"; var meta = ["# SocialCalc Spreadsheet Control Save", "part:sheet"].join("\n"); var end = "--SocialCalcSpreadsheetControlSave--"; function sheet_to_eth_data(ws) { if (!ws || !ws["!ref"]) return ""; var o$10 = [], oo = [], cell, coord = ""; var r$10 = decode_range(ws["!ref"]); var dense = ws["!data"] != null; for (var R$1 = r$10.s.r; R$1 <= r$10.e.r; ++R$1) { for (var C$2 = r$10.s.c; C$2 <= r$10.e.c; ++C$2) { coord = encode_cell({ r: R$1, c: C$2 }); cell = dense ? (ws["!data"][R$1] || [])[C$2] : ws[coord]; if (!cell || cell.v == null || cell.t === "z") continue; oo = [ "cell", coord, "t" ]; switch (cell.t) { case "s": oo.push(encode(cell.v)); break; case "b": oo[2] = "vt" + (cell.f ? "f" : "c"); oo[3] = "nl"; oo[4] = cell.v ? "1" : "0"; oo[5] = encode(cell.f || (cell.v ? "TRUE" : "FALSE")); break; case "d": var t$6 = datenum(parseDate(cell.v)); oo[2] = "vtc"; oo[3] = "nd"; oo[4] = "" + t$6; oo[5] = cell.w || SSF_format(cell.z || table_fmt[14], t$6); break; case "n": if (isFinite(cell.v)) { if (!cell.f) { oo[2] = "v"; oo[3] = cell.v; } else { oo[2] = "vtf"; oo[3] = "n"; oo[4] = cell.v; oo[5] = encode(cell.f); } } else { oo[2] = "vt" + (cell.f ? "f" : "c"); oo[3] = "e" + BErr[isNaN(cell.v) ? 36 : 7]; oo[4] = "0"; oo[5] = cell.f || oo[3].slice(1); oo[6] = "e"; oo[7] = oo[3].slice(1); } break; case "e": continue; } o$10.push(oo.join(":")); } } o$10.push("sheet:c:" + (r$10.e.c - r$10.s.c + 1) + ":r:" + (r$10.e.r - r$10.s.r + 1) + ":tvf:1"); o$10.push("valueformat:1:text-wiki"); return o$10.join("\n"); } function sheet_to_eth(ws) { return [ header, sep, meta, sep, sheet_to_eth_data(ws), end ].join("\n"); } return { to_workbook: eth_to_workbook, to_sheet: eth_to_sheet, from_sheet: sheet_to_eth }; })(); PRN = /* @__PURE__ */ (function() { function set_text_arr(data, arr, R$1, C$2, o$10) { if (o$10.raw) arr[R$1][C$2] = data; else if (data === "") {} else if (data === "TRUE") arr[R$1][C$2] = true; else if (data === "FALSE") arr[R$1][C$2] = false; else if (!isNaN(fuzzynum(data))) arr[R$1][C$2] = fuzzynum(data); else if (!isNaN(fuzzydate(data).getDate())) arr[R$1][C$2] = parseDate(data); else if (data.charCodeAt(0) == 35 && RBErr[data] != null) arr[R$1][C$2] = { t: "e", v: RBErr[data], w: data }; else arr[R$1][C$2] = data; } function prn_to_aoa_str(f$4, opts) { var o$10 = opts || {}; var arr = []; if (!f$4 || f$4.length === 0) return arr; var lines = f$4.split(/[\r\n]/); var L$2 = lines.length - 1; while (L$2 >= 0 && lines[L$2].length === 0) --L$2; var start = 10, idx = 0; var R$1 = 0; for (; R$1 <= L$2; ++R$1) { idx = lines[R$1].indexOf(" "); if (idx == -1) idx = lines[R$1].length; else idx++; start = Math.max(start, idx); } for (R$1 = 0; R$1 <= L$2; ++R$1) { arr[R$1] = []; var C$2 = 0; set_text_arr(lines[R$1].slice(0, start).trim(), arr, R$1, C$2, o$10); for (C$2 = 1; C$2 <= (lines[R$1].length - start) / 10 + 1; ++C$2) set_text_arr(lines[R$1].slice(start + (C$2 - 1) * 10, start + C$2 * 10).trim(), arr, R$1, C$2, o$10); } if (o$10.sheetRows) arr = arr.slice(0, o$10.sheetRows); return arr; } var guess_seps = { 44: ",", 9: " ", 59: ";", 124: "|" }; var guess_sep_weights = { 44: 3, 9: 2, 59: 1, 124: 0 }; function guess_sep(str) { var cnt = {}, instr = false, end = 0, cc = 0; for (; end < str.length; ++end) { if ((cc = str.charCodeAt(end)) == 34) instr = !instr; else if (!instr && cc in guess_seps) cnt[cc] = (cnt[cc] || 0) + 1; } cc = []; for (end in cnt) if (Object.prototype.hasOwnProperty.call(cnt, end)) { cc.push([cnt[end], end]); } if (!cc.length) { cnt = guess_sep_weights; for (end in cnt) if (Object.prototype.hasOwnProperty.call(cnt, end)) { cc.push([cnt[end], end]); } } cc.sort(function(a$2, b$3) { return a$2[0] - b$3[0] || guess_sep_weights[a$2[1]] - guess_sep_weights[b$3[1]]; }); return guess_seps[cc.pop()[1]] || 44; } function dsv_to_sheet_str(str, opts) { var o$10 = opts || {}; var sep = ""; if (DENSE != null && o$10.dense == null) o$10.dense = DENSE; var ws = {}; if (o$10.dense) ws["!data"] = []; var range = { s: { c: 0, r: 0 }, e: { c: 0, r: 0 } }; if (str.slice(0, 4) == "sep=") { if (str.charCodeAt(5) == 13 && str.charCodeAt(6) == 10) { sep = str.charAt(4); str = str.slice(7); } else if (str.charCodeAt(5) == 13 || str.charCodeAt(5) == 10) { sep = str.charAt(4); str = str.slice(6); } else sep = guess_sep(str.slice(0, 1024)); } else if (o$10 && o$10.FS) sep = o$10.FS; else sep = guess_sep(str.slice(0, 1024)); var R$1 = 0, C$2 = 0, v$3 = 0; var start = 0, end = 0, sepcc = sep.charCodeAt(0), instr = false, cc = 0, startcc = str.charCodeAt(0); var _re = o$10.dateNF != null ? dateNF_regex(o$10.dateNF) : null; function finish_cell() { var s$5 = str.slice(start, end); if (s$5.slice(-1) == "\r") s$5 = s$5.slice(0, -1); var cell = {}; if (s$5.charAt(0) == "\"" && s$5.charAt(s$5.length - 1) == "\"") s$5 = s$5.slice(1, -1).replace(/""/g, "\""); if (o$10.cellText !== false) cell.w = s$5; if (s$5.length === 0) cell.t = "z"; else if (o$10.raw) { cell.t = "s"; cell.v = s$5; } else if (s$5.trim().length === 0) { cell.t = "s"; cell.v = s$5; } else if (s$5.charCodeAt(0) == 61) { if (s$5.charCodeAt(1) == 34 && s$5.charCodeAt(s$5.length - 1) == 34) { cell.t = "s"; cell.v = s$5.slice(2, -1).replace(/""/g, "\""); } else if (fuzzyfmla(s$5)) { cell.t = "s"; cell.f = s$5.slice(1); cell.v = s$5; } else { cell.t = "s"; cell.v = s$5; } } else if (s$5 == "TRUE") { cell.t = "b"; cell.v = true; } else if (s$5 == "FALSE") { cell.t = "b"; cell.v = false; } else if (!isNaN(v$3 = fuzzynum(s$5))) { cell.t = "n"; cell.v = v$3; } else if (!isNaN((v$3 = fuzzydate(s$5)).getDate()) || _re && s$5.match(_re)) { cell.z = o$10.dateNF || table_fmt[14]; if (_re && s$5.match(_re)) { var news = dateNF_fix(s$5, o$10.dateNF, s$5.match(_re) || []); v$3 = parseDate(news); if (o$10 && o$10.UTC === false) v$3 = utc_to_local(v$3); } else if (o$10 && o$10.UTC === false) v$3 = utc_to_local(v$3); else if (o$10.cellText !== false && o$10.dateNF) cell.w = SSF_format(cell.z, v$3); if (o$10.cellDates) { cell.t = "d"; cell.v = v$3; } else { cell.t = "n"; cell.v = datenum(v$3); } if (!o$10.cellNF) delete cell.z; } else if (s$5.charCodeAt(0) == 35 && RBErr[s$5] != null) { cell.t = "e"; cell.w = s$5; cell.v = RBErr[s$5]; } else { cell.t = "s"; cell.v = s$5; } if (cell.t == "z") {} else if (o$10.dense) { if (!ws["!data"][R$1]) ws["!data"][R$1] = []; ws["!data"][R$1][C$2] = cell; } else ws[encode_cell({ c: C$2, r: R$1 })] = cell; start = end + 1; startcc = str.charCodeAt(start); if (range.e.c < C$2) range.e.c = C$2; if (range.e.r < R$1) range.e.r = R$1; if (cc == sepcc) ++C$2; else { C$2 = 0; ++R$1; if (o$10.sheetRows && o$10.sheetRows <= R$1) return true; } } outer: for (; end < str.length; ++end) switch (cc = str.charCodeAt(end)) { case 34: if (startcc === 34) instr = !instr; break; case 13: if (instr) break; if (str.charCodeAt(end + 1) == 10) ++end; case sepcc: case 10: if (!instr && finish_cell()) break outer; break; default: break; } if (end - start > 0) finish_cell(); ws["!ref"] = encode_range(range); return ws; } function prn_to_sheet_str(str, opts) { if (!(opts && opts.PRN)) return dsv_to_sheet_str(str, opts); if (opts.FS) return dsv_to_sheet_str(str, opts); if (str.slice(0, 4) == "sep=") return dsv_to_sheet_str(str, opts); if (str.indexOf(" ") >= 0 || str.indexOf(",") >= 0 || str.indexOf(";") >= 0) return dsv_to_sheet_str(str, opts); return aoa_to_sheet(prn_to_aoa_str(str, opts), opts); } function prn_to_sheet(d$5, opts) { var str = "", bytes = opts.type == "string" ? [ 0, 0, 0, 0 ] : firstbyte(d$5, opts); switch (opts.type) { case "base64": str = Base64_decode(d$5); break; case "binary": str = d$5; break; case "buffer": if (opts.codepage == 65001) str = d$5.toString("utf8"); else if (opts.codepage && typeof $cptable !== "undefined") str = $cptable.utils.decode(opts.codepage, d$5); else str = has_buf && Buffer.isBuffer(d$5) ? d$5.toString("binary") : a2s(d$5); break; case "array": str = cc2str(d$5); break; case "string": str = d$5; break; default: throw new Error("Unrecognized type " + opts.type); } if (bytes[0] == 239 && bytes[1] == 187 && bytes[2] == 191) str = utf8read(str.slice(3)); else if (opts.type != "string" && opts.type != "buffer" && opts.codepage == 65001) str = utf8read(str); else if (opts.type == "binary" && typeof $cptable !== "undefined" && opts.codepage) str = $cptable.utils.decode(opts.codepage, $cptable.utils.encode(28591, str)); if (str.slice(0, 19) == "socialcalc:version:") return ETH.to_sheet(opts.type == "string" ? str : utf8read(str), opts); return prn_to_sheet_str(str, opts); } function prn_to_workbook(d$5, opts) { return sheet_to_workbook(prn_to_sheet(d$5, opts), opts); } function sheet_to_prn(ws) { var o$10 = []; if (!ws["!ref"]) return ""; var r$10 = safe_decode_range(ws["!ref"]), cell; var dense = ws["!data"] != null; for (var R$1 = r$10.s.r; R$1 <= r$10.e.r; ++R$1) { var oo = []; for (var C$2 = r$10.s.c; C$2 <= r$10.e.c; ++C$2) { var coord = encode_cell({ r: R$1, c: C$2 }); cell = dense ? (ws["!data"][R$1] || [])[C$2] : ws[coord]; if (!cell || cell.v == null) { oo.push(" "); continue; } var w$2 = (cell.w || (format_cell(cell), cell.w) || "").slice(0, 10); while (w$2.length < 10) w$2 += " "; oo.push(w$2 + (C$2 === 0 ? " " : "")); } o$10.push(oo.join("")); } return o$10.join("\n"); } return { to_workbook: prn_to_workbook, to_sheet: prn_to_sheet, from_sheet: sheet_to_prn }; })(); WK_ = /* @__PURE__ */ (function() { function lotushopper(data, cb, opts) { if (!data) return; prep_blob(data, data.l || 0); var Enum$1 = opts.Enum || WK1Enum; while (data.l < data.length) { var RT = data.read_shift(2); var R$1 = Enum$1[RT] || Enum$1[65535]; var length = data.read_shift(2); var tgt = data.l + length; var d$5 = R$1.f && R$1.f(data, length, opts); data.l = tgt; if (cb(d$5, R$1, RT)) return; } } function lotus_to_workbook(d$5, opts) { switch (opts.type) { case "base64": return lotus_to_workbook_buf(s2a(Base64_decode(d$5)), opts); case "binary": return lotus_to_workbook_buf(s2a(d$5), opts); case "buffer": case "array": return lotus_to_workbook_buf(d$5, opts); } throw "Unsupported type " + opts.type; } var LOTUS_DATE_FMTS = [ "mmmm", "dd-mmm-yyyy", "dd-mmm", "mmm-yyyy", "@", "mm/dd", "hh:mm:ss AM/PM", "hh:mm AM/PM", "mm/dd/yyyy", "mm/dd", "hh:mm:ss", "hh:mm" ]; function lotus_to_workbook_buf(d$5, opts) { if (!d$5) return d$5; var o$10 = opts || {}; if (DENSE != null && o$10.dense == null) o$10.dense = DENSE; var s$5 = {}, n$9 = "Sheet1", next_n = "", sidx = 0; var sheets = {}, snames = [], realnames = [], sdata = []; if (o$10.dense) sdata = s$5["!data"] = []; var refguess = { s: { r: 0, c: 0 }, e: { r: 0, c: 0 } }; var sheetRows = o$10.sheetRows || 0; var lastcell = {}; if (d$5[4] == 81 && d$5[5] == 80 && d$5[6] == 87) return qpw_to_workbook_buf(d$5, opts); if (d$5[2] == 0) { if (d$5[3] == 8 || d$5[3] == 9) { if (d$5.length >= 16 && d$5[14] == 5 && d$5[15] === 108) throw new Error("Unsupported Works 3 for Mac file"); } } if (d$5[2] == 2) { o$10.Enum = WK1Enum; lotushopper(d$5, function(val$1, R$1, RT) { switch (RT) { case 0: o$10.vers = val$1; if (val$1 >= 4096) o$10.qpro = true; break; case 255: o$10.vers = val$1; o$10.works = true; break; case 6: refguess = val$1; break; case 204: if (val$1) next_n = val$1; break; case 222: next_n = val$1; break; case 15: case 51: if ((!o$10.qpro && !o$10.works || RT == 51) && val$1[1].v.charCodeAt(0) < 48) val$1[1].v = val$1[1].v.slice(1); if (o$10.works || o$10.works2) val$1[1].v = val$1[1].v.replace(/\r\n/g, "\n"); case 13: case 14: case 16: if ((val$1[2] & 112) == 112 && (val$1[2] & 15) > 1 && (val$1[2] & 15) < 15) { val$1[1].z = o$10.dateNF || LOTUS_DATE_FMTS[(val$1[2] & 15) - 1] || table_fmt[14]; if (o$10.cellDates) { val$1[1].v = numdate(val$1[1].v); val$1[1].t = typeof val$1[1].v == "number" ? "n" : "d"; } } if (o$10.qpro) { if (val$1[3] > sidx) { s$5["!ref"] = encode_range(refguess); sheets[n$9] = s$5; snames.push(n$9); s$5 = {}; if (o$10.dense) sdata = s$5["!data"] = []; refguess = { s: { r: 0, c: 0 }, e: { r: 0, c: 0 } }; sidx = val$1[3]; n$9 = next_n || "Sheet" + (sidx + 1); next_n = ""; } } var tmpcell = o$10.dense ? (sdata[val$1[0].r] || [])[val$1[0].c] : s$5[encode_cell(val$1[0])]; if (tmpcell) { tmpcell.t = val$1[1].t; tmpcell.v = val$1[1].v; if (val$1[1].z != null) tmpcell.z = val$1[1].z; if (val$1[1].f != null) tmpcell.f = val$1[1].f; lastcell = tmpcell; break; } if (o$10.dense) { if (!sdata[val$1[0].r]) sdata[val$1[0].r] = []; sdata[val$1[0].r][val$1[0].c] = val$1[1]; } else s$5[encode_cell(val$1[0])] = val$1[1]; lastcell = val$1[1]; break; case 21509: o$10.works2 = true; break; case 21506: { if (val$1 == 5281) { lastcell.z = "hh:mm:ss"; if (o$10.cellDates && lastcell.t == "n") { lastcell.v = numdate(lastcell.v); lastcell.t = typeof lastcell.v == "number" ? "n" : "d"; } } } break; } }, o$10); } else if (d$5[2] == 26 || d$5[2] == 14) { o$10.Enum = WK3Enum; if (d$5[2] == 14) { o$10.qpro = true; d$5.l = 0; } lotushopper(d$5, function(val$1, R$1, RT) { switch (RT) { case 204: n$9 = val$1; break; case 22: if (val$1[1].v.charCodeAt(0) < 48) val$1[1].v = val$1[1].v.slice(1); val$1[1].v = val$1[1].v.replace(/\x0F./g, function($$) { return String.fromCharCode($$.charCodeAt(1) - 32); }).replace(/\r\n/g, "\n"); case 23: case 24: case 25: case 37: case 39: case 40: if (val$1[3] > sidx) { s$5["!ref"] = encode_range(refguess); sheets[n$9] = s$5; snames.push(n$9); s$5 = {}; if (o$10.dense) sdata = s$5["!data"] = []; refguess = { s: { r: 0, c: 0 }, e: { r: 0, c: 0 } }; sidx = val$1[3]; n$9 = "Sheet" + (sidx + 1); } if (sheetRows > 0 && val$1[0].r >= sheetRows) break; if (o$10.dense) { if (!sdata[val$1[0].r]) sdata[val$1[0].r] = []; sdata[val$1[0].r][val$1[0].c] = val$1[1]; } else s$5[encode_cell(val$1[0])] = val$1[1]; if (refguess.e.c < val$1[0].c) refguess.e.c = val$1[0].c; if (refguess.e.r < val$1[0].r) refguess.e.r = val$1[0].r; break; case 27: if (val$1[14e3]) realnames[val$1[14e3][0]] = val$1[14e3][1]; break; case 1537: realnames[val$1[0]] = val$1[1]; if (val$1[0] == sidx) n$9 = val$1[1]; break; default: break; } }, o$10); } else throw new Error("Unrecognized LOTUS BOF " + d$5[2]); s$5["!ref"] = encode_range(refguess); sheets[next_n || n$9] = s$5; snames.push(next_n || n$9); if (!realnames.length) return { SheetNames: snames, Sheets: sheets }; var osheets = {}, rnames = []; for (var i$7 = 0; i$7 < realnames.length; ++i$7) if (sheets[snames[i$7]]) { rnames.push(realnames[i$7] || snames[i$7]); osheets[realnames[i$7]] = sheets[realnames[i$7]] || sheets[snames[i$7]]; } else { rnames.push(realnames[i$7]); osheets[realnames[i$7]] = { "!ref": "A1" }; } return { SheetNames: rnames, Sheets: osheets }; } function sheet_to_wk1(ws, opts) { var o$10 = opts || {}; if (+o$10.codepage >= 0) set_cp(+o$10.codepage); if (o$10.type == "string") throw new Error("Cannot write WK1 to JS string"); var ba = buf_array(); if (!ws["!ref"]) throw new Error("Cannot export empty sheet to WK1"); var range = safe_decode_range(ws["!ref"]); var dense = ws["!data"] != null; var cols = []; write_biff_rec(ba, 0, write_BOF_WK1(1030)); write_biff_rec(ba, 6, write_RANGE(range)); var max_R = Math.min(range.e.r, 8191); for (var C$2 = range.s.c; C$2 <= range.e.c; ++C$2) cols[C$2] = encode_col(C$2); for (var R$1 = range.s.r; R$1 <= max_R; ++R$1) { var rr = encode_row(R$1); for (C$2 = range.s.c; C$2 <= range.e.c; ++C$2) { var cell = dense ? (ws["!data"][R$1] || [])[C$2] : ws[cols[C$2] + rr]; if (!cell || cell.t == "z") continue; switch (cell.t) { case "n": if ((cell.v | 0) == cell.v && cell.v >= -32768 && cell.v <= 32767) write_biff_rec(ba, 13, write_INTEGER(R$1, C$2, cell)); else write_biff_rec(ba, 14, write_NUMBER(R$1, C$2, cell)); break; case "d": var dc = datenum(cell.v); if ((dc | 0) == dc && dc >= -32768 && dc <= 32767) write_biff_rec(ba, 13, write_INTEGER(R$1, C$2, { t: "n", v: dc, z: cell.z || table_fmt[14] })); else write_biff_rec(ba, 14, write_NUMBER(R$1, C$2, { t: "n", v: dc, z: cell.z || table_fmt[14] })); break; default: var str = format_cell(cell); write_biff_rec(ba, 15, write_LABEL(R$1, C$2, str.slice(0, 239))); } } } write_biff_rec(ba, 1); return ba.end(); } function book_to_wk3(wb, opts) { var o$10 = opts || {}; if (+o$10.codepage >= 0) set_cp(+o$10.codepage); if (o$10.type == "string") throw new Error("Cannot write WK3 to JS string"); var ba = buf_array(); write_biff_rec(ba, 0, write_BOF_WK3(wb)); for (var i$7 = 0, cnt = 0; i$7 < wb.SheetNames.length; ++i$7) if ((wb.Sheets[wb.SheetNames[i$7]] || {})["!ref"]) write_biff_rec(ba, 27, write_XFORMAT_SHEETNAME(wb.SheetNames[i$7], cnt++)); var wsidx = 0; for (i$7 = 0; i$7 < wb.SheetNames.length; ++i$7) { var ws = wb.Sheets[wb.SheetNames[i$7]]; if (!ws || !ws["!ref"]) continue; var range = safe_decode_range(ws["!ref"]); var dense = ws["!data"] != null; var cols = []; var max_R = Math.min(range.e.r, 8191); for (var R$1 = range.s.r; R$1 <= max_R; ++R$1) { var rr = encode_row(R$1); for (var C$2 = range.s.c; C$2 <= range.e.c; ++C$2) { if (R$1 === range.s.r) cols[C$2] = encode_col(C$2); var ref = cols[C$2] + rr; var cell = dense ? (ws["!data"][R$1] || [])[C$2] : ws[ref]; if (!cell || cell.t == "z") continue; if (cell.t == "n") { write_biff_rec(ba, 23, write_NUMBER_17(R$1, C$2, wsidx, cell.v)); } else { var str = format_cell(cell); write_biff_rec(ba, 22, write_LABEL_16(R$1, C$2, wsidx, str.slice(0, 239))); } } } ++wsidx; } write_biff_rec(ba, 1); return ba.end(); } function write_BOF_WK1(v$3) { var out = new_buf(2); out.write_shift(2, v$3); return out; } function write_BOF_WK3(wb) { var out = new_buf(26); out.write_shift(2, 4096); out.write_shift(2, 4); out.write_shift(4, 0); var rows = 0, cols = 0, wscnt = 0; for (var i$7 = 0; i$7 < wb.SheetNames.length; ++i$7) { var name = wb.SheetNames[i$7]; var ws = wb.Sheets[name]; if (!ws || !ws["!ref"]) continue; ++wscnt; var range = decode_range(ws["!ref"]); if (rows < range.e.r) rows = range.e.r; if (cols < range.e.c) cols = range.e.c; } if (rows > 8191) rows = 8191; out.write_shift(2, rows); out.write_shift(1, wscnt); out.write_shift(1, cols); out.write_shift(2, 0); out.write_shift(2, 0); out.write_shift(1, 1); out.write_shift(1, 2); out.write_shift(4, 0); out.write_shift(4, 0); return out; } function parse_RANGE(blob, length, opts) { var o$10 = { s: { c: 0, r: 0 }, e: { c: 0, r: 0 } }; if (length == 8 && opts.qpro) { o$10.s.c = blob.read_shift(1); blob.l++; o$10.s.r = blob.read_shift(2); o$10.e.c = blob.read_shift(1); blob.l++; o$10.e.r = blob.read_shift(2); return o$10; } o$10.s.c = blob.read_shift(2); o$10.s.r = blob.read_shift(2); if (length == 12 && opts.qpro) blob.l += 2; o$10.e.c = blob.read_shift(2); o$10.e.r = blob.read_shift(2); if (length == 12 && opts.qpro) blob.l += 2; if (o$10.s.c == 65535) o$10.s.c = o$10.e.c = o$10.s.r = o$10.e.r = 0; return o$10; } function write_RANGE(range) { var out = new_buf(8); out.write_shift(2, range.s.c); out.write_shift(2, range.s.r); out.write_shift(2, range.e.c); out.write_shift(2, range.e.r); return out; } function parse_cell(blob, length, opts) { var o$10 = [ { c: 0, r: 0 }, { t: "n", v: 0 }, 0, 0 ]; if (opts.qpro && opts.vers != 20768) { o$10[0].c = blob.read_shift(1); o$10[3] = blob.read_shift(1); o$10[0].r = blob.read_shift(2); blob.l += 2; } else if (opts.works) { o$10[0].c = blob.read_shift(2); o$10[0].r = blob.read_shift(2); o$10[2] = blob.read_shift(2); } else { o$10[2] = blob.read_shift(1); o$10[0].c = blob.read_shift(2); o$10[0].r = blob.read_shift(2); } return o$10; } function get_wk1_fmt(cell) { if (cell.z && fmt_is_date(cell.z)) { return 240 | (LOTUS_DATE_FMTS.indexOf(cell.z) + 1 || 2); } return 255; } function parse_LABEL(blob, length, opts) { var tgt = blob.l + length; var o$10 = parse_cell(blob, length, opts); o$10[1].t = "s"; if ((opts.vers & 65534) == 20768) { blob.l++; var len = blob.read_shift(1); o$10[1].v = blob.read_shift(len, "utf8"); return o$10; } if (opts.qpro) blob.l++; o$10[1].v = blob.read_shift(tgt - blob.l, "cstr"); return o$10; } function write_LABEL(R$1, C$2, s$5) { var o$10 = new_buf(7 + s$5.length); o$10.write_shift(1, 255); o$10.write_shift(2, C$2); o$10.write_shift(2, R$1); o$10.write_shift(1, 39); for (var i$7 = 0; i$7 < o$10.length; ++i$7) { var cc = s$5.charCodeAt(i$7); o$10.write_shift(1, cc >= 128 ? 95 : cc); } o$10.write_shift(1, 0); return o$10; } function parse_STRING(blob, length, opts) { var tgt = blob.l + length; var o$10 = parse_cell(blob, length, opts); o$10[1].t = "s"; if (opts.vers == 20768) { var len = blob.read_shift(1); o$10[1].v = blob.read_shift(len, "utf8"); return o$10; } o$10[1].v = blob.read_shift(tgt - blob.l, "cstr"); return o$10; } function parse_INTEGER(blob, length, opts) { var o$10 = parse_cell(blob, length, opts); o$10[1].v = blob.read_shift(2, "i"); return o$10; } function write_INTEGER(R$1, C$2, cell) { var o$10 = new_buf(7); o$10.write_shift(1, get_wk1_fmt(cell)); o$10.write_shift(2, C$2); o$10.write_shift(2, R$1); o$10.write_shift(2, cell.v, "i"); return o$10; } function parse_NUMBER(blob, length, opts) { var o$10 = parse_cell(blob, length, opts); o$10[1].v = blob.read_shift(8, "f"); return o$10; } function write_NUMBER(R$1, C$2, cell) { var o$10 = new_buf(13); o$10.write_shift(1, get_wk1_fmt(cell)); o$10.write_shift(2, C$2); o$10.write_shift(2, R$1); o$10.write_shift(8, cell.v, "f"); return o$10; } function parse_FORMULA(blob, length, opts) { var tgt = blob.l + length; var o$10 = parse_cell(blob, length, opts); o$10[1].v = blob.read_shift(8, "f"); if (opts.qpro) blob.l = tgt; else { var flen = blob.read_shift(2); wk1_fmla_to_csf(blob.slice(blob.l, blob.l + flen), o$10); blob.l += flen; } return o$10; } function wk1_parse_rc(B$2, V$2, col) { var rel$1 = V$2 & 32768; V$2 &= ~32768; V$2 = (rel$1 ? B$2 : 0) + (V$2 >= 8192 ? V$2 - 16384 : V$2); return (rel$1 ? "" : "$") + (col ? encode_col(V$2) : encode_row(V$2)); } var FuncTab = { 31: ["NA", 0], 33: ["ABS", 1], 34: ["TRUNC", 1], 35: ["SQRT", 1], 36: ["LOG", 1], 37: ["LN", 1], 38: ["PI", 0], 39: ["SIN", 1], 40: ["COS", 1], 41: ["TAN", 1], 42: ["ATAN2", 2], 43: ["ATAN", 1], 44: ["ASIN", 1], 45: ["ACOS", 1], 46: ["EXP", 1], 47: ["MOD", 2], 49: ["ISNA", 1], 50: ["ISERR", 1], 51: ["FALSE", 0], 52: ["TRUE", 0], 53: ["RAND", 0], 54: ["DATE", 3], 63: ["ROUND", 2], 64: ["TIME", 3], 68: ["ISNUMBER", 1], 69: ["ISTEXT", 1], 70: ["LEN", 1], 71: ["VALUE", 1], 73: ["MID", 3], 74: ["CHAR", 1], 80: ["SUM", 69], 81: ["AVERAGEA", 69], 82: ["COUNTA", 69], 83: ["MINA", 69], 84: ["MAXA", 69], 102: ["UPPER", 1], 103: ["LOWER", 1], 107: ["PROPER", 1], 109: ["TRIM", 1], 111: ["T", 1] }; var BinOpTab = [ "", "", "", "", "", "", "", "", "", "+", "-", "*", "/", "^", "=", "<>", "<=", ">=", "<", ">", "", "", "", "", "&", "", "", "", "", "", "", "" ]; function wk1_fmla_to_csf(blob, o$10) { prep_blob(blob, 0); var out = [], argc = 0, R$1 = "", C$2 = "", argL = "", argR = ""; while (blob.l < blob.length) { var cc = blob[blob.l++]; switch (cc) { case 0: out.push(blob.read_shift(8, "f")); break; case 1: { C$2 = wk1_parse_rc(o$10[0].c, blob.read_shift(2), true); R$1 = wk1_parse_rc(o$10[0].r, blob.read_shift(2), false); out.push(C$2 + R$1); } break; case 2: { var c$7 = wk1_parse_rc(o$10[0].c, blob.read_shift(2), true); var r$10 = wk1_parse_rc(o$10[0].r, blob.read_shift(2), false); C$2 = wk1_parse_rc(o$10[0].c, blob.read_shift(2), true); R$1 = wk1_parse_rc(o$10[0].r, blob.read_shift(2), false); out.push(c$7 + r$10 + ":" + C$2 + R$1); } break; case 3: if (blob.l < blob.length) { console.error("WK1 premature formula end"); return; } break; case 4: out.push("(" + out.pop() + ")"); break; case 5: out.push(blob.read_shift(2)); break; case 6: { var Z$1 = ""; while (cc = blob[blob.l++]) Z$1 += String.fromCharCode(cc); out.push("\"" + Z$1.replace(/"/g, "\"\"") + "\""); } break; case 8: out.push("-" + out.pop()); break; case 23: out.push("+" + out.pop()); break; case 22: out.push("NOT(" + out.pop() + ")"); break; case 20: case 21: { argR = out.pop(); argL = out.pop(); out.push(["AND", "OR"][cc - 20] + "(" + argL + "," + argR + ")"); } break; default: if (cc < 32 && BinOpTab[cc]) { argR = out.pop(); argL = out.pop(); out.push(argL + BinOpTab[cc] + argR); } else if (FuncTab[cc]) { argc = FuncTab[cc][1]; if (argc == 69) argc = blob[blob.l++]; if (argc > out.length) { console.error("WK1 bad formula parse 0x" + cc.toString(16) + ":|" + out.join("|") + "|"); return; } var args = out.slice(-argc); out.length -= argc; out.push(FuncTab[cc][0] + "(" + args.join(",") + ")"); } else if (cc <= 7) return console.error("WK1 invalid opcode " + cc.toString(16)); else if (cc <= 24) return console.error("WK1 unsupported op " + cc.toString(16)); else if (cc <= 30) return console.error("WK1 invalid opcode " + cc.toString(16)); else if (cc <= 115) return console.error("WK1 unsupported function opcode " + cc.toString(16)); else return console.error("WK1 unrecognized opcode " + cc.toString(16)); } } if (out.length == 1) o$10[1].f = "" + out[0]; else console.error("WK1 bad formula parse |" + out.join("|") + "|"); } function parse_cell_3(blob) { var o$10 = [ { c: 0, r: 0 }, { t: "n", v: 0 }, 0 ]; o$10[0].r = blob.read_shift(2); o$10[3] = blob[blob.l++]; o$10[0].c = blob[blob.l++]; return o$10; } function parse_LABEL_16(blob, length) { var o$10 = parse_cell_3(blob, length); o$10[1].t = "s"; o$10[1].v = blob.read_shift(length - 4, "cstr"); return o$10; } function write_LABEL_16(R$1, C$2, wsidx, s$5) { var o$10 = new_buf(6 + s$5.length); o$10.write_shift(2, R$1); o$10.write_shift(1, wsidx); o$10.write_shift(1, C$2); o$10.write_shift(1, 39); for (var i$7 = 0; i$7 < s$5.length; ++i$7) { var cc = s$5.charCodeAt(i$7); o$10.write_shift(1, cc >= 128 ? 95 : cc); } o$10.write_shift(1, 0); return o$10; } function parse_NUMBER_18(blob, length) { var o$10 = parse_cell_3(blob, length); o$10[1].v = blob.read_shift(2); var v$3 = o$10[1].v >> 1; if (o$10[1].v & 1) { switch (v$3 & 7) { case 0: v$3 = (v$3 >> 3) * 5e3; break; case 1: v$3 = (v$3 >> 3) * 500; break; case 2: v$3 = (v$3 >> 3) / 20; break; case 3: v$3 = (v$3 >> 3) / 200; break; case 4: v$3 = (v$3 >> 3) / 2e3; break; case 5: v$3 = (v$3 >> 3) / 2e4; break; case 6: v$3 = (v$3 >> 3) / 16; break; case 7: v$3 = (v$3 >> 3) / 64; break; } } o$10[1].v = v$3; return o$10; } function parse_NUMBER_17(blob, length) { var o$10 = parse_cell_3(blob, length); var v1 = blob.read_shift(4); var v2 = blob.read_shift(4); var e$10 = blob.read_shift(2); if (e$10 == 65535) { if (v1 === 0 && v2 === 3221225472) { o$10[1].t = "e"; o$10[1].v = 15; } else if (v1 === 0 && v2 === 3489660928) { o$10[1].t = "e"; o$10[1].v = 42; } else o$10[1].v = 0; return o$10; } var s$5 = e$10 & 32768; e$10 = (e$10 & 32767) - 16446; o$10[1].v = (1 - s$5 * 2) * (v2 * Math.pow(2, e$10 + 32) + v1 * Math.pow(2, e$10)); return o$10; } function write_NUMBER_17(R$1, C$2, wsidx, v$3) { var o$10 = new_buf(14); o$10.write_shift(2, R$1); o$10.write_shift(1, wsidx); o$10.write_shift(1, C$2); if (v$3 == 0) { o$10.write_shift(4, 0); o$10.write_shift(4, 0); o$10.write_shift(2, 65535); return o$10; } var s$5 = 0, e$10 = 0, v1 = 0, v2 = 0; if (v$3 < 0) { s$5 = 1; v$3 = -v$3; } e$10 = Math.log2(v$3) | 0; v$3 /= Math.pow(2, e$10 - 31); v2 = v$3 >>> 0; if ((v2 & 2147483648) == 0) { v$3 /= 2; ++e$10; v2 = v$3 >>> 0; } v$3 -= v2; v2 |= 2147483648; v2 >>>= 0; v$3 *= Math.pow(2, 32); v1 = v$3 >>> 0; o$10.write_shift(4, v1); o$10.write_shift(4, v2); e$10 += 16383 + (s$5 ? 32768 : 0); o$10.write_shift(2, e$10); return o$10; } function parse_FORMULA_19(blob, length) { var o$10 = parse_NUMBER_17(blob, 14); blob.l += length - 14; return o$10; } function parse_NUMBER_25(blob, length) { var o$10 = parse_cell_3(blob, length); var v1 = blob.read_shift(4); o$10[1].v = v1 >> 6; return o$10; } function parse_NUMBER_27(blob, length) { var o$10 = parse_cell_3(blob, length); var v1 = blob.read_shift(8, "f"); o$10[1].v = v1; return o$10; } function parse_FORMULA_28(blob, length) { var o$10 = parse_NUMBER_27(blob, 12); blob.l += length - 12; return o$10; } function parse_SHEETNAMECS(blob, length) { return blob[blob.l + length - 1] == 0 ? blob.read_shift(length, "cstr") : ""; } function parse_SHEETNAMELP(blob, length) { var len = blob[blob.l++]; if (len > length - 1) len = length - 1; var o$10 = ""; while (o$10.length < len) o$10 += String.fromCharCode(blob[blob.l++]); return o$10; } function parse_SHEETINFOQP(blob, length, opts) { if (!opts.qpro || length < 21) return; var id = blob.read_shift(1); blob.l += 17; blob.l += 1; blob.l += 2; var nm = blob.read_shift(length - 21, "cstr"); return [id, nm]; } function parse_XFORMAT(blob, length) { var o$10 = {}, tgt = blob.l + length; while (blob.l < tgt) { var dt = blob.read_shift(2); if (dt == 14e3) { o$10[dt] = [0, ""]; o$10[dt][0] = blob.read_shift(2); while (blob[blob.l]) { o$10[dt][1] += String.fromCharCode(blob[blob.l]); blob.l++; } blob.l++; } } return o$10; } function write_XFORMAT_SHEETNAME(name, wsidx) { var out = new_buf(5 + name.length); out.write_shift(2, 14e3); out.write_shift(2, wsidx); for (var i$7 = 0; i$7 < name.length; ++i$7) { var cc = name.charCodeAt(i$7); out[out.l++] = cc > 127 ? 95 : cc; } out[out.l++] = 0; return out; } var WK1Enum = { 0: { n: "BOF", f: parseuint16 }, 1: { n: "EOF" }, 2: { n: "CALCMODE" }, 3: { n: "CALCORDER" }, 4: { n: "SPLIT" }, 5: { n: "SYNC" }, 6: { n: "RANGE", f: parse_RANGE }, 7: { n: "WINDOW1" }, 8: { n: "COLW1" }, 9: { n: "WINTWO" }, 10: { n: "COLW2" }, 11: { n: "NAME" }, 12: { n: "BLANK" }, 13: { n: "INTEGER", f: parse_INTEGER }, 14: { n: "NUMBER", f: parse_NUMBER }, 15: { n: "LABEL", f: parse_LABEL }, 16: { n: "FORMULA", f: parse_FORMULA }, 24: { n: "TABLE" }, 25: { n: "ORANGE" }, 26: { n: "PRANGE" }, 27: { n: "SRANGE" }, 28: { n: "FRANGE" }, 29: { n: "KRANGE1" }, 32: { n: "HRANGE" }, 35: { n: "KRANGE2" }, 36: { n: "PROTEC" }, 37: { n: "FOOTER" }, 38: { n: "HEADER" }, 39: { n: "SETUP" }, 40: { n: "MARGINS" }, 41: { n: "LABELFMT" }, 42: { n: "TITLES" }, 43: { n: "SHEETJS" }, 45: { n: "GRAPH" }, 46: { n: "NGRAPH" }, 47: { n: "CALCCOUNT" }, 48: { n: "UNFORMATTED" }, 49: { n: "CURSORW12" }, 50: { n: "WINDOW" }, 51: { n: "STRING", f: parse_STRING }, 55: { n: "PASSWORD" }, 56: { n: "LOCKED" }, 60: { n: "QUERY" }, 61: { n: "QUERYNAME" }, 62: { n: "PRINT" }, 63: { n: "PRINTNAME" }, 64: { n: "GRAPH2" }, 65: { n: "GRAPHNAME" }, 66: { n: "ZOOM" }, 67: { n: "SYMSPLIT" }, 68: { n: "NSROWS" }, 69: { n: "NSCOLS" }, 70: { n: "RULER" }, 71: { n: "NNAME" }, 72: { n: "ACOMM" }, 73: { n: "AMACRO" }, 74: { n: "PARSE" }, 102: { n: "PRANGES??" }, 103: { n: "RRANGES??" }, 104: { n: "FNAME??" }, 105: { n: "MRANGES??" }, 204: { n: "SHEETNAMECS", f: parse_SHEETNAMECS }, 222: { n: "SHEETNAMELP", f: parse_SHEETNAMELP }, 255: { n: "BOF", f: parseuint16 }, 21506: { n: "WKSNF", f: parseuint16 }, 65535: { n: "" } }; var WK3Enum = { 0: { n: "BOF" }, 1: { n: "EOF" }, 2: { n: "PASSWORD" }, 3: { n: "CALCSET" }, 4: { n: "WINDOWSET" }, 5: { n: "SHEETCELLPTR" }, 6: { n: "SHEETLAYOUT" }, 7: { n: "COLUMNWIDTH" }, 8: { n: "HIDDENCOLUMN" }, 9: { n: "USERRANGE" }, 10: { n: "SYSTEMRANGE" }, 11: { n: "ZEROFORCE" }, 12: { n: "SORTKEYDIR" }, 13: { n: "FILESEAL" }, 14: { n: "DATAFILLNUMS" }, 15: { n: "PRINTMAIN" }, 16: { n: "PRINTSTRING" }, 17: { n: "GRAPHMAIN" }, 18: { n: "GRAPHSTRING" }, 19: { n: "??" }, 20: { n: "ERRCELL" }, 21: { n: "NACELL" }, 22: { n: "LABEL16", f: parse_LABEL_16 }, 23: { n: "NUMBER17", f: parse_NUMBER_17 }, 24: { n: "NUMBER18", f: parse_NUMBER_18 }, 25: { n: "FORMULA19", f: parse_FORMULA_19 }, 26: { n: "FORMULA1A" }, 27: { n: "XFORMAT", f: parse_XFORMAT }, 28: { n: "DTLABELMISC" }, 29: { n: "DTLABELCELL" }, 30: { n: "GRAPHWINDOW" }, 31: { n: "CPA" }, 32: { n: "LPLAUTO" }, 33: { n: "QUERY" }, 34: { n: "HIDDENSHEET" }, 35: { n: "??" }, 37: { n: "NUMBER25", f: parse_NUMBER_25 }, 38: { n: "??" }, 39: { n: "NUMBER27", f: parse_NUMBER_27 }, 40: { n: "FORMULA28", f: parse_FORMULA_28 }, 142: { n: "??" }, 147: { n: "??" }, 150: { n: "??" }, 151: { n: "??" }, 152: { n: "??" }, 153: { n: "??" }, 154: { n: "??" }, 155: { n: "??" }, 156: { n: "??" }, 163: { n: "??" }, 174: { n: "??" }, 175: { n: "??" }, 176: { n: "??" }, 177: { n: "??" }, 184: { n: "??" }, 185: { n: "??" }, 186: { n: "??" }, 187: { n: "??" }, 188: { n: "??" }, 195: { n: "??" }, 201: { n: "??" }, 204: { n: "SHEETNAMECS", f: parse_SHEETNAMECS }, 205: { n: "??" }, 206: { n: "??" }, 207: { n: "??" }, 208: { n: "??" }, 256: { n: "??" }, 259: { n: "??" }, 260: { n: "??" }, 261: { n: "??" }, 262: { n: "??" }, 263: { n: "??" }, 265: { n: "??" }, 266: { n: "??" }, 267: { n: "??" }, 268: { n: "??" }, 270: { n: "??" }, 271: { n: "??" }, 384: { n: "??" }, 389: { n: "??" }, 390: { n: "??" }, 393: { n: "??" }, 396: { n: "??" }, 512: { n: "??" }, 514: { n: "??" }, 513: { n: "??" }, 516: { n: "??" }, 517: { n: "??" }, 640: { n: "??" }, 641: { n: "??" }, 642: { n: "??" }, 643: { n: "??" }, 644: { n: "??" }, 645: { n: "??" }, 646: { n: "??" }, 647: { n: "??" }, 648: { n: "??" }, 658: { n: "??" }, 659: { n: "??" }, 660: { n: "??" }, 661: { n: "??" }, 662: { n: "??" }, 665: { n: "??" }, 666: { n: "??" }, 768: { n: "??" }, 772: { n: "??" }, 1537: { n: "SHEETINFOQP", f: parse_SHEETINFOQP }, 1600: { n: "??" }, 1602: { n: "??" }, 1793: { n: "??" }, 1794: { n: "??" }, 1795: { n: "??" }, 1796: { n: "??" }, 1920: { n: "??" }, 2048: { n: "??" }, 2049: { n: "??" }, 2052: { n: "??" }, 2688: { n: "??" }, 10998: { n: "??" }, 12849: { n: "??" }, 28233: { n: "??" }, 28484: { n: "??" }, 65535: { n: "" } }; var QPWNFTable = { 5: "dd-mmm-yy", 6: "dd-mmm", 7: "mmm-yy", 8: "mm/dd/yy", 10: "hh:mm:ss AM/PM", 11: "hh:mm AM/PM", 14: "dd-mmm-yyyy", 15: "mmm-yyyy", 34: "0.00", 50: "0.00;[Red]0.00", 66: "0.00;(0.00)", 82: "0.00;[Red](0.00)", 162: "\"$\"#,##0.00;\\(\"$\"#,##0.00\\)", 288: "0%", 304: "0E+00", 320: "# ?/?" }; function parse_qpw_str(p$3) { var cch = p$3.read_shift(2); var flags = p$3.read_shift(1); if (flags != 0) throw "unsupported QPW string type " + flags.toString(16); return p$3.read_shift(cch, "sbcs-cont"); } function qpw_to_workbook_buf(d$5, opts) { prep_blob(d$5, 0); var o$10 = opts || {}; if (DENSE != null && o$10.dense == null) o$10.dense = DENSE; var s$5 = {}; if (o$10.dense) s$5["!data"] = []; var SST = [], sname = "", formulae = []; var range = { s: { r: -1, c: -1 }, e: { r: -1, c: -1 } }; var cnt = 0, type = 0, C$2 = 0, R$1 = 0; var wb = { SheetNames: [], Sheets: {} }; var FMTS = []; outer: while (d$5.l < d$5.length) { var RT = d$5.read_shift(2), length = d$5.read_shift(2); var p$3 = d$5.slice(d$5.l, d$5.l + length); prep_blob(p$3, 0); switch (RT) { case 1: if (p$3.read_shift(4) != 962023505) throw "Bad QPW9 BOF!"; break; case 2: break outer; case 8: break; case 10: { var fcnt = p$3.read_shift(4); var step = (p$3.length - p$3.l) / fcnt | 0; for (var ifmt = 0; ifmt < fcnt; ++ifmt) { var end = p$3.l + step; var fmt = {}; p$3.l += 2; fmt.numFmtId = p$3.read_shift(2); if (QPWNFTable[fmt.numFmtId]) fmt.z = QPWNFTable[fmt.numFmtId]; p$3.l = end; FMTS.push(fmt); } } break; case 1025: break; case 1026: break; case 1031: { p$3.l += 12; while (p$3.l < p$3.length) { cnt = p$3.read_shift(2); type = p$3.read_shift(1); SST.push(p$3.read_shift(cnt, "cstr")); } } break; case 1032: {} break; case 1537: { var sidx = p$3.read_shift(2); s$5 = {}; if (o$10.dense) s$5["!data"] = []; range.s.c = p$3.read_shift(2); range.e.c = p$3.read_shift(2); range.s.r = p$3.read_shift(4); range.e.r = p$3.read_shift(4); p$3.l += 4; if (p$3.l + 2 < p$3.length) { cnt = p$3.read_shift(2); type = p$3.read_shift(1); sname = cnt == 0 ? "" : p$3.read_shift(cnt, "cstr"); } if (!sname) sname = encode_col(sidx); } break; case 1538: { if (range.s.c > 255 || range.s.r > 999999) break; if (range.e.c < range.s.c) range.e.c = range.s.c; if (range.e.r < range.s.r) range.e.r = range.s.r; s$5["!ref"] = encode_range(range); book_append_sheet(wb, s$5, sname); } break; case 2561: { C$2 = p$3.read_shift(2); if (range.e.c < C$2) range.e.c = C$2; if (range.s.c > C$2) range.s.c = C$2; R$1 = p$3.read_shift(4); if (range.s.r > R$1) range.s.r = R$1; R$1 = p$3.read_shift(4); if (range.e.r < R$1) range.e.r = R$1; } break; case 3073: { R$1 = p$3.read_shift(4), cnt = p$3.read_shift(4); if (range.s.r > R$1) range.s.r = R$1; if (range.e.r < R$1 + cnt - 1) range.e.r = R$1 + cnt - 1; var CC = encode_col(C$2); while (p$3.l < p$3.length) { var cell = { t: "z" }; var flags = p$3.read_shift(1), fmtidx = -1; if (flags & 128) fmtidx = p$3.read_shift(2); var mul = flags & 64 ? p$3.read_shift(2) - 1 : 0; switch (flags & 31) { case 0: break; case 1: break; case 2: cell = { t: "n", v: p$3.read_shift(2) }; break; case 3: cell = { t: "n", v: p$3.read_shift(2, "i") }; break; case 4: cell = { t: "n", v: parse_RkNumber(p$3) }; break; case 5: cell = { t: "n", v: p$3.read_shift(8, "f") }; break; case 7: cell = { t: "s", v: SST[type = p$3.read_shift(4) - 1] }; break; case 8: cell = { t: "n", v: p$3.read_shift(8, "f") }; p$3.l += 2; p$3.l += 4; if (isNaN(cell.v)) cell = { t: "e", v: 15 }; break; default: throw "Unrecognized QPW cell type " + (flags & 31); } if (fmtidx != -1 && (FMTS[fmtidx - 1] || {}).z) cell.z = FMTS[fmtidx - 1].z; var delta = 0; if (flags & 32) switch (flags & 31) { case 2: delta = p$3.read_shift(2); break; case 3: delta = p$3.read_shift(2, "i"); break; case 7: delta = p$3.read_shift(2); break; default: throw "Unsupported delta for QPW cell type " + (flags & 31); } if (!(!o$10.sheetStubs && cell.t == "z")) { var newcell = dup(cell); if (cell.t == "n" && cell.z && fmt_is_date(cell.z) && o$10.cellDates) { newcell.v = numdate(cell.v); newcell.t = typeof newcell.v == "number" ? "n" : "d"; } if (s$5["!data"] != null) { if (!s$5["!data"][R$1]) s$5["!data"][R$1] = []; s$5["!data"][R$1][C$2] = newcell; } else s$5[CC + encode_row(R$1)] = newcell; } ++R$1; --cnt; while (mul-- > 0 && cnt >= 0) { if (flags & 32) switch (flags & 31) { case 2: cell = { t: "n", v: cell.v + delta & 65535 }; break; case 3: cell = { t: "n", v: cell.v + delta & 65535 }; if (cell.v > 32767) cell.v -= 65536; break; case 7: cell = { t: "s", v: SST[type = type + delta >>> 0] }; break; default: throw "Cannot apply delta for QPW cell type " + (flags & 31); } else switch (flags & 31) { case 1: cell = { t: "z" }; break; case 2: cell = { t: "n", v: p$3.read_shift(2) }; break; case 7: cell = { t: "s", v: SST[type = p$3.read_shift(4) - 1] }; break; default: throw "Cannot apply repeat for QPW cell type " + (flags & 31); } if (fmtidx != -1); if (!(!o$10.sheetStubs && cell.t == "z")) { if (s$5["!data"] != null) { if (!s$5["!data"][R$1]) s$5["!data"][R$1] = []; s$5["!data"][R$1][C$2] = cell; } else s$5[CC + encode_row(R$1)] = cell; } ++R$1; --cnt; } } } break; case 3074: { C$2 = p$3.read_shift(2); R$1 = p$3.read_shift(4); var str = parse_qpw_str(p$3); if (s$5["!data"] != null) { if (!s$5["!data"][R$1]) s$5["!data"][R$1] = []; s$5["!data"][R$1][C$2] = { t: "s", v: str }; } else s$5[encode_col(C$2) + encode_row(R$1)] = { t: "s", v: str }; } break; default: break; } d$5.l += length; } return wb; } return { sheet_to_wk1, book_to_wk3, to_workbook: lotus_to_workbook }; })(); parse_rs = /* @__PURE__ */ (function() { function parse_r(r$10) { var t$6 = str_match_xml_ns(r$10, "t"); if (!t$6) return { t: "s", v: "" }; var o$10 = { t: "s", v: unescapexml(t$6[1]) }; var rpr = str_match_xml_ns(r$10, "rPr"); if (rpr) o$10.s = parse_rpr(rpr[1]); return o$10; } var rregex = /<(?:\w+:)?r>/g, rend = /<\/(?:\w+:)?r>/; return function parse_rs$1(rs) { return rs.replace(rregex, "").split(rend).map(parse_r).filter(function(r$10) { return r$10.v; }); }; })(); rs_to_html = /* @__PURE__ */ (function parse_rs_factory() { var nlregex = /(\r\n|\n)/g; function parse_rpr2(font, intro, outro) { var style = []; if (font.u) style.push("text-decoration: underline;"); if (font.uval) style.push("text-underline-style:" + font.uval + ";"); if (font.sz) style.push("font-size:" + font.sz + "pt;"); if (font.outline) style.push("text-effect: outline;"); if (font.shadow) style.push("text-shadow: auto;"); intro.push(""); if (font.b) { intro.push(""); outro.push(""); } if (font.i) { intro.push(""); outro.push(""); } if (font.strike) { intro.push(""); outro.push(""); } var align = font.valign || ""; if (align == "superscript" || align == "super") align = "sup"; else if (align == "subscript") align = "sub"; if (align != "") { intro.push("<" + align + ">"); outro.push(""); } outro.push(""); return font; } function r_to_html(r$10) { var terms = [ [], r$10.v, [] ]; if (!r$10.v) return ""; if (r$10.s) parse_rpr2(r$10.s, terms[0], terms[2]); return terms[0].join("") + terms[1].replace(nlregex, "
") + terms[2].join(""); } return function parse_rs$1(rs) { return rs.map(r_to_html).join(""); }; })(); sitregex = /<(?:\w+:)?t\b[^<>]*>([^<]*)<\/(?:\w+:)?t>/g, sirregex = /<(?:\w+:)?r\b[^<>]*>/; sstr1 = /<(?:\w+:)?(?:si|sstItem)>/g; sstr2 = /<\/(?:\w+:)?(?:si|sstItem)>/; straywsregex = /^\s|\s$|[\t\n\r]/; write_BrtSSTItem = write_RichStr; crypto_CreateXorArray_Method1 = /* @__PURE__ */ (function() { var PadArray = [ 187, 255, 255, 186, 255, 255, 185, 128, 0, 190, 15, 0, 191, 15, 0 ]; var InitialCode = [ 57840, 7439, 52380, 33984, 4364, 3600, 61902, 12606, 6258, 57657, 54287, 34041, 10252, 43370, 20163 ]; var XorMatrix = [ 44796, 19929, 39858, 10053, 20106, 40212, 10761, 31585, 63170, 64933, 60267, 50935, 40399, 11199, 17763, 35526, 1453, 2906, 5812, 11624, 23248, 885, 1770, 3540, 7080, 14160, 28320, 56640, 55369, 41139, 20807, 41614, 21821, 43642, 17621, 28485, 56970, 44341, 19019, 38038, 14605, 29210, 60195, 50791, 40175, 10751, 21502, 43004, 24537, 18387, 36774, 3949, 7898, 15796, 31592, 63184, 47201, 24803, 49606, 37805, 14203, 28406, 56812, 17824, 35648, 1697, 3394, 6788, 13576, 27152, 43601, 17539, 35078, 557, 1114, 2228, 4456, 30388, 60776, 51953, 34243, 7079, 14158, 28316, 14128, 28256, 56512, 43425, 17251, 34502, 7597, 13105, 26210, 52420, 35241, 883, 1766, 3532, 4129, 8258, 16516, 33032, 4657, 9314, 18628 ]; var Ror = function(Byte) { return (Byte / 2 | Byte * 128) & 255; }; var XorRor = function(byte1, byte2) { return Ror(byte1 ^ byte2); }; var CreateXorKey_Method1 = function(Password) { var XorKey = InitialCode[Password.length - 1]; var CurrentElement = 104; for (var i$7 = Password.length - 1; i$7 >= 0; --i$7) { var Char = Password[i$7]; for (var j$2 = 0; j$2 != 7; ++j$2) { if (Char & 64) XorKey ^= XorMatrix[CurrentElement]; Char *= 2; --CurrentElement; } } return XorKey; }; return function(password) { var Password = _JS2ANSI(password); var XorKey = CreateXorKey_Method1(Password); var Index$1 = Password.length; var ObfuscationArray = new_raw_buf(16); for (var i$7 = 0; i$7 != 16; ++i$7) ObfuscationArray[i$7] = 0; var Temp, PasswordLastChar, PadIndex; if ((Index$1 & 1) === 1) { Temp = XorKey >> 8; ObfuscationArray[Index$1] = XorRor(PadArray[0], Temp); --Index$1; Temp = XorKey & 255; PasswordLastChar = Password[Password.length - 1]; ObfuscationArray[Index$1] = XorRor(PasswordLastChar, Temp); } while (Index$1 > 0) { --Index$1; Temp = XorKey >> 8; ObfuscationArray[Index$1] = XorRor(Password[Index$1], Temp); --Index$1; Temp = XorKey & 255; ObfuscationArray[Index$1] = XorRor(Password[Index$1], Temp); } Index$1 = 15; PadIndex = 15 - Password.length; while (PadIndex > 0) { Temp = XorKey >> 8; ObfuscationArray[Index$1] = XorRor(PadArray[PadIndex], Temp); --Index$1; --PadIndex; Temp = XorKey & 255; ObfuscationArray[Index$1] = XorRor(Password[Index$1], Temp); --Index$1; --PadIndex; } return ObfuscationArray; }; })(); crypto_DecryptData_Method1 = function(password, Data, XorArrayIndex, XorArray, O) { if (!O) O = Data; if (!XorArray) XorArray = crypto_CreateXorArray_Method1(password); var Index$1, Value; for (Index$1 = 0; Index$1 != Data.length; ++Index$1) { Value = Data[Index$1]; Value ^= XorArray[XorArrayIndex]; Value = (Value >> 5 | Value << 3) & 255; O[Index$1] = Value; ++XorArrayIndex; } return [ O, XorArrayIndex, XorArray ]; }; crypto_MakeXorDecryptor = function(password) { var XorArrayIndex = 0, XorArray = crypto_CreateXorArray_Method1(password); return function(Data) { var O = crypto_DecryptData_Method1("", Data, XorArrayIndex, XorArray); XorArrayIndex = O[1]; return O[0]; }; }; DEF_MDW = 6, MAX_MDW = 15, MIN_MDW = 1, MDW = DEF_MDW; DEF_PPI = 96, PPI = DEF_PPI; XLMLPatternTypeMap = { "None": "none", "Solid": "solid", "Gray50": "mediumGray", "Gray75": "darkGray", "Gray25": "lightGray", "HorzStripe": "darkHorizontal", "VertStripe": "darkVertical", "ReverseDiagStripe": "darkDown", "DiagStripe": "darkUp", "DiagCross": "darkGrid", "ThickDiagCross": "darkTrellis", "ThinHorzStripe": "lightHorizontal", "ThinVertStripe": "lightVertical", "ThinReverseDiagStripe": "lightDown", "ThinHorzCross": "lightGrid" }; cellXF_uint = [ "numFmtId", "fillId", "fontId", "borderId", "xfId" ]; cellXF_bool = [ "applyAlignment", "applyBorder", "applyFill", "applyFont", "applyNumberFormat", "applyProtection", "pivotButton", "quotePrefix" ]; parse_sty_xml = /* @__PURE__ */ (function make_pstyx() { return function parse_sty_xml$1(data, themes, opts) { var styles$1 = {}; if (!data) return styles$1; data = remove_doctype(str_remove_ng(data, "")); var t$6; if (t$6 = str_match_xml_ns(data, "numFmts")) parse_numFmts(t$6[0], styles$1, opts); if (t$6 = str_match_xml_ns(data, "fonts")) parse_fonts(t$6[0], styles$1, themes, opts); if (t$6 = str_match_xml_ns(data, "fills")) parse_fills(t$6[0], styles$1, themes, opts); if (t$6 = str_match_xml_ns(data, "borders")) parse_borders(t$6[0], styles$1, themes, opts); if (t$6 = str_match_xml_ns(data, "cellXfs")) parse_cellXfs(t$6[0], styles$1, opts); return styles$1; }; })(); XLSBFillPTNames = [ "none", "solid", "mediumGray", "darkGray", "lightGray", "darkHorizontal", "darkVertical", "darkDown", "darkUp", "darkGrid", "darkTrellis", "lightHorizontal", "lightVertical", "lightDown", "lightUp", "lightGrid", "lightTrellis", "gray125", "gray0625" ]; ; parse_BrtFill = parsenoop; parse_BrtBorder = parsenoop; XLSXThemeClrScheme = [ "", "", "", "", "", "", "", "", "", "", "", "" ]; parse_BrtCommentAuthor = parse_XLWideString; CT_VBA = "application/vnd.ms-office.vbaProject"; VBAFMTS = [ "xlsb", "xlsm", "xlam", "biff8", "xla" ]; rc_to_a1 = /* @__PURE__ */ (function() { var rcregex = /(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g; var rcbase = { r: 0, c: 0 }; function rcfunc($$, $1, $2, $3) { var cRel = false, rRel = false; if ($2.length == 0) rRel = true; else if ($2.charAt(0) == "[") { rRel = true; $2 = $2.slice(1, -1); } if ($3.length == 0) cRel = true; else if ($3.charAt(0) == "[") { cRel = true; $3 = $3.slice(1, -1); } var R$1 = $2.length > 0 ? parseInt($2, 10) | 0 : 0, C$2 = $3.length > 0 ? parseInt($3, 10) | 0 : 0; if (cRel) C$2 += rcbase.c; else --C$2; if (rRel) R$1 += rcbase.r; else --R$1; return $1 + (cRel ? "" : "$") + encode_col(C$2) + (rRel ? "" : "$") + encode_row(R$1); } return function rc_to_a1$1(fstr, base) { rcbase = base; return fstr.replace(rcregex, rcfunc); }; })(); crefregex = /(^|[^._A-Z0-9])(\$?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])(\$?)(\d{1,7})(?![_.\(A-Za-z0-9])/g; try { crefregex = /(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g; } catch (e$10) {} a1_to_rc = /* @__PURE__ */ (function() { return function a1_to_rc$1(fstr, base) { return fstr.replace(crefregex, function($0, $1, $2, $3, $4, $5) { var c$7 = decode_col($3) - ($2 ? 0 : base.c); var r$10 = decode_row($5) - ($4 ? 0 : base.r); var R$1 = $4 == "$" ? r$10 + 1 : r$10 == 0 ? "" : "[" + r$10 + "]"; var C$2 = $2 == "$" ? c$7 + 1 : c$7 == 0 ? "" : "[" + c$7 + "]"; return $1 + "R" + R$1 + "C" + C$2; }); }; })(); parse_PtgMemErr = parsenoop; parse_PtgMemNoMem = parsenoop; parse_PtgTbl = parsenoop; parse_PtgElfCol = parse_PtgElfLoc; parse_PtgElfColS = parse_PtgElfNoop; parse_PtgElfColSV = parse_PtgElfNoop; parse_PtgElfColV = parse_PtgElfLoc; parse_PtgElfRadical = parse_PtgElfLoc; parse_PtgElfRadicalLel = parse_PtgElfLel; parse_PtgElfRadicalS = parse_PtgElfNoop; parse_PtgElfRw = parse_PtgElfLoc; parse_PtgElfRwV = parse_PtgElfLoc; PtgListRT = [ "Data", "All", "Headers", "??", "?Data2", "??", "?DataHeaders", "??", "Totals", "??", "??", "??", "?DataTotals", "??", "??", "??", "?Current" ]; PtgTypes = { 1: { n: "PtgExp", f: parse_PtgExp }, 2: { n: "PtgTbl", f: parse_PtgTbl }, 3: { n: "PtgAdd", f: parseread1 }, 4: { n: "PtgSub", f: parseread1 }, 5: { n: "PtgMul", f: parseread1 }, 6: { n: "PtgDiv", f: parseread1 }, 7: { n: "PtgPower", f: parseread1 }, 8: { n: "PtgConcat", f: parseread1 }, 9: { n: "PtgLt", f: parseread1 }, 10: { n: "PtgLe", f: parseread1 }, 11: { n: "PtgEq", f: parseread1 }, 12: { n: "PtgGe", f: parseread1 }, 13: { n: "PtgGt", f: parseread1 }, 14: { n: "PtgNe", f: parseread1 }, 15: { n: "PtgIsect", f: parseread1 }, 16: { n: "PtgUnion", f: parseread1 }, 17: { n: "PtgRange", f: parseread1 }, 18: { n: "PtgUplus", f: parseread1 }, 19: { n: "PtgUminus", f: parseread1 }, 20: { n: "PtgPercent", f: parseread1 }, 21: { n: "PtgParen", f: parseread1 }, 22: { n: "PtgMissArg", f: parseread1 }, 23: { n: "PtgStr", f: parse_PtgStr }, 26: { n: "PtgSheet", f: parse_PtgSheet }, 27: { n: "PtgEndSheet", f: parse_PtgEndSheet }, 28: { n: "PtgErr", f: parse_PtgErr }, 29: { n: "PtgBool", f: parse_PtgBool }, 30: { n: "PtgInt", f: parse_PtgInt }, 31: { n: "PtgNum", f: parse_PtgNum }, 32: { n: "PtgArray", f: parse_PtgArray }, 33: { n: "PtgFunc", f: parse_PtgFunc }, 34: { n: "PtgFuncVar", f: parse_PtgFuncVar }, 35: { n: "PtgName", f: parse_PtgName }, 36: { n: "PtgRef", f: parse_PtgRef }, 37: { n: "PtgArea", f: parse_PtgArea }, 38: { n: "PtgMemArea", f: parse_PtgMemArea }, 39: { n: "PtgMemErr", f: parse_PtgMemErr }, 40: { n: "PtgMemNoMem", f: parse_PtgMemNoMem }, 41: { n: "PtgMemFunc", f: parse_PtgMemFunc }, 42: { n: "PtgRefErr", f: parse_PtgRefErr }, 43: { n: "PtgAreaErr", f: parse_PtgAreaErr }, 44: { n: "PtgRefN", f: parse_PtgRefN }, 45: { n: "PtgAreaN", f: parse_PtgAreaN }, 46: { n: "PtgMemAreaN", f: parse_PtgMemAreaN }, 47: { n: "PtgMemNoMemN", f: parse_PtgMemNoMemN }, 57: { n: "PtgNameX", f: parse_PtgNameX }, 58: { n: "PtgRef3d", f: parse_PtgRef3d }, 59: { n: "PtgArea3d", f: parse_PtgArea3d }, 60: { n: "PtgRefErr3d", f: parse_PtgRefErr3d }, 61: { n: "PtgAreaErr3d", f: parse_PtgAreaErr3d }, 255: {} }; PtgDupes = { 64: 32, 96: 32, 65: 33, 97: 33, 66: 34, 98: 34, 67: 35, 99: 35, 68: 36, 100: 36, 69: 37, 101: 37, 70: 38, 102: 38, 71: 39, 103: 39, 72: 40, 104: 40, 73: 41, 105: 41, 74: 42, 106: 42, 75: 43, 107: 43, 76: 44, 108: 44, 77: 45, 109: 45, 78: 46, 110: 46, 79: 47, 111: 47, 88: 34, 120: 34, 89: 57, 121: 57, 90: 58, 122: 58, 91: 59, 123: 59, 92: 60, 124: 60, 93: 61, 125: 61 }; Ptg18 = { 1: { n: "PtgElfLel", f: parse_PtgElfLel }, 2: { n: "PtgElfRw", f: parse_PtgElfRw }, 3: { n: "PtgElfCol", f: parse_PtgElfCol }, 6: { n: "PtgElfRwV", f: parse_PtgElfRwV }, 7: { n: "PtgElfColV", f: parse_PtgElfColV }, 10: { n: "PtgElfRadical", f: parse_PtgElfRadical }, 11: { n: "PtgElfRadicalS", f: parse_PtgElfRadicalS }, 13: { n: "PtgElfColS", f: parse_PtgElfColS }, 15: { n: "PtgElfColSV", f: parse_PtgElfColSV }, 16: { n: "PtgElfRadicalLel", f: parse_PtgElfRadicalLel }, 25: { n: "PtgList", f: parse_PtgList }, 29: { n: "PtgSxName", f: parse_PtgSxName }, 255: {} }; Ptg19 = { 0: { n: "PtgAttrNoop", f: parse_PtgAttrNoop }, 1: { n: "PtgAttrSemi", f: parse_PtgAttrSemi }, 2: { n: "PtgAttrIf", f: parse_PtgAttrIf }, 4: { n: "PtgAttrChoose", f: parse_PtgAttrChoose }, 8: { n: "PtgAttrGoto", f: parse_PtgAttrGoto }, 16: { n: "PtgAttrSum", f: parse_PtgAttrSum }, 32: { n: "PtgAttrBaxcel", f: parse_PtgAttrBaxcel }, 33: { n: "PtgAttrBaxcel", f: parse_PtgAttrBaxcel }, 64: { n: "PtgAttrSpace", f: parse_PtgAttrSpace }, 65: { n: "PtgAttrSpaceSemi", f: parse_PtgAttrSpaceSemi }, 128: { n: "PtgAttrIfError", f: parse_PtgAttrIfError }, 255: {} }; PtgBinOp = { PtgAdd: "+", PtgConcat: "&", PtgDiv: "/", PtgEq: "=", PtgGe: ">=", PtgGt: ">", PtgLe: "<=", PtgLt: "<", PtgMul: "*", PtgNe: "<>", PtgPower: "^", PtgSub: "-" }; parse_XLSBArrayParsedFormula = parse_XLSBParsedFormula; parse_XLSBCellParsedFormula = parse_XLSBParsedFormula; parse_XLSBNameParsedFormula = parse_XLSBParsedFormula; parse_XLSBSharedParsedFormula = parse_XLSBParsedFormula; write_XLSBNameParsedFormula = write_XLSBFormula; Cetab = { 0: "BEEP", 1: "OPEN", 2: "OPEN.LINKS", 3: "CLOSE.ALL", 4: "SAVE", 5: "SAVE.AS", 6: "FILE.DELETE", 7: "PAGE.SETUP", 8: "PRINT", 9: "PRINTER.SETUP", 10: "QUIT", 11: "NEW.WINDOW", 12: "ARRANGE.ALL", 13: "WINDOW.SIZE", 14: "WINDOW.MOVE", 15: "FULL", 16: "CLOSE", 17: "RUN", 22: "SET.PRINT.AREA", 23: "SET.PRINT.TITLES", 24: "SET.PAGE.BREAK", 25: "REMOVE.PAGE.BREAK", 26: "FONT", 27: "DISPLAY", 28: "PROTECT.DOCUMENT", 29: "PRECISION", 30: "A1.R1C1", 31: "CALCULATE.NOW", 32: "CALCULATION", 34: "DATA.FIND", 35: "EXTRACT", 36: "DATA.DELETE", 37: "SET.DATABASE", 38: "SET.CRITERIA", 39: "SORT", 40: "DATA.SERIES", 41: "TABLE", 42: "FORMAT.NUMBER", 43: "ALIGNMENT", 44: "STYLE", 45: "BORDER", 46: "CELL.PROTECTION", 47: "COLUMN.WIDTH", 48: "UNDO", 49: "CUT", 50: "COPY", 51: "PASTE", 52: "CLEAR", 53: "PASTE.SPECIAL", 54: "EDIT.DELETE", 55: "INSERT", 56: "FILL.RIGHT", 57: "FILL.DOWN", 61: "DEFINE.NAME", 62: "CREATE.NAMES", 63: "FORMULA.GOTO", 64: "FORMULA.FIND", 65: "SELECT.LAST.CELL", 66: "SHOW.ACTIVE.CELL", 67: "GALLERY.AREA", 68: "GALLERY.BAR", 69: "GALLERY.COLUMN", 70: "GALLERY.LINE", 71: "GALLERY.PIE", 72: "GALLERY.SCATTER", 73: "COMBINATION", 74: "PREFERRED", 75: "ADD.OVERLAY", 76: "GRIDLINES", 77: "SET.PREFERRED", 78: "AXES", 79: "LEGEND", 80: "ATTACH.TEXT", 81: "ADD.ARROW", 82: "SELECT.CHART", 83: "SELECT.PLOT.AREA", 84: "PATTERNS", 85: "MAIN.CHART", 86: "OVERLAY", 87: "SCALE", 88: "FORMAT.LEGEND", 89: "FORMAT.TEXT", 90: "EDIT.REPEAT", 91: "PARSE", 92: "JUSTIFY", 93: "HIDE", 94: "UNHIDE", 95: "WORKSPACE", 96: "FORMULA", 97: "FORMULA.FILL", 98: "FORMULA.ARRAY", 99: "DATA.FIND.NEXT", 100: "DATA.FIND.PREV", 101: "FORMULA.FIND.NEXT", 102: "FORMULA.FIND.PREV", 103: "ACTIVATE", 104: "ACTIVATE.NEXT", 105: "ACTIVATE.PREV", 106: "UNLOCKED.NEXT", 107: "UNLOCKED.PREV", 108: "COPY.PICTURE", 109: "SELECT", 110: "DELETE.NAME", 111: "DELETE.FORMAT", 112: "VLINE", 113: "HLINE", 114: "VPAGE", 115: "HPAGE", 116: "VSCROLL", 117: "HSCROLL", 118: "ALERT", 119: "NEW", 120: "CANCEL.COPY", 121: "SHOW.CLIPBOARD", 122: "MESSAGE", 124: "PASTE.LINK", 125: "APP.ACTIVATE", 126: "DELETE.ARROW", 127: "ROW.HEIGHT", 128: "FORMAT.MOVE", 129: "FORMAT.SIZE", 130: "FORMULA.REPLACE", 131: "SEND.KEYS", 132: "SELECT.SPECIAL", 133: "APPLY.NAMES", 134: "REPLACE.FONT", 135: "FREEZE.PANES", 136: "SHOW.INFO", 137: "SPLIT", 138: "ON.WINDOW", 139: "ON.DATA", 140: "DISABLE.INPUT", 142: "OUTLINE", 143: "LIST.NAMES", 144: "FILE.CLOSE", 145: "SAVE.WORKBOOK", 146: "DATA.FORM", 147: "COPY.CHART", 148: "ON.TIME", 149: "WAIT", 150: "FORMAT.FONT", 151: "FILL.UP", 152: "FILL.LEFT", 153: "DELETE.OVERLAY", 155: "SHORT.MENUS", 159: "SET.UPDATE.STATUS", 161: "COLOR.PALETTE", 162: "DELETE.STYLE", 163: "WINDOW.RESTORE", 164: "WINDOW.MAXIMIZE", 166: "CHANGE.LINK", 167: "CALCULATE.DOCUMENT", 168: "ON.KEY", 169: "APP.RESTORE", 170: "APP.MOVE", 171: "APP.SIZE", 172: "APP.MINIMIZE", 173: "APP.MAXIMIZE", 174: "BRING.TO.FRONT", 175: "SEND.TO.BACK", 185: "MAIN.CHART.TYPE", 186: "OVERLAY.CHART.TYPE", 187: "SELECT.END", 188: "OPEN.MAIL", 189: "SEND.MAIL", 190: "STANDARD.FONT", 191: "CONSOLIDATE", 192: "SORT.SPECIAL", 193: "GALLERY.3D.AREA", 194: "GALLERY.3D.COLUMN", 195: "GALLERY.3D.LINE", 196: "GALLERY.3D.PIE", 197: "VIEW.3D", 198: "GOAL.SEEK", 199: "WORKGROUP", 200: "FILL.GROUP", 201: "UPDATE.LINK", 202: "PROMOTE", 203: "DEMOTE", 204: "SHOW.DETAIL", 206: "UNGROUP", 207: "OBJECT.PROPERTIES", 208: "SAVE.NEW.OBJECT", 209: "SHARE", 210: "SHARE.NAME", 211: "DUPLICATE", 212: "APPLY.STYLE", 213: "ASSIGN.TO.OBJECT", 214: "OBJECT.PROTECTION", 215: "HIDE.OBJECT", 216: "SET.EXTRACT", 217: "CREATE.PUBLISHER", 218: "SUBSCRIBE.TO", 219: "ATTRIBUTES", 220: "SHOW.TOOLBAR", 222: "PRINT.PREVIEW", 223: "EDIT.COLOR", 224: "SHOW.LEVELS", 225: "FORMAT.MAIN", 226: "FORMAT.OVERLAY", 227: "ON.RECALC", 228: "EDIT.SERIES", 229: "DEFINE.STYLE", 240: "LINE.PRINT", 243: "ENTER.DATA", 249: "GALLERY.RADAR", 250: "MERGE.STYLES", 251: "EDITION.OPTIONS", 252: "PASTE.PICTURE", 253: "PASTE.PICTURE.LINK", 254: "SPELLING", 256: "ZOOM", 259: "INSERT.OBJECT", 260: "WINDOW.MINIMIZE", 265: "SOUND.NOTE", 266: "SOUND.PLAY", 267: "FORMAT.SHAPE", 268: "EXTEND.POLYGON", 269: "FORMAT.AUTO", 272: "GALLERY.3D.BAR", 273: "GALLERY.3D.SURFACE", 274: "FILL.AUTO", 276: "CUSTOMIZE.TOOLBAR", 277: "ADD.TOOL", 278: "EDIT.OBJECT", 279: "ON.DOUBLECLICK", 280: "ON.ENTRY", 281: "WORKBOOK.ADD", 282: "WORKBOOK.MOVE", 283: "WORKBOOK.COPY", 284: "WORKBOOK.OPTIONS", 285: "SAVE.WORKSPACE", 288: "CHART.WIZARD", 289: "DELETE.TOOL", 290: "MOVE.TOOL", 291: "WORKBOOK.SELECT", 292: "WORKBOOK.ACTIVATE", 293: "ASSIGN.TO.TOOL", 295: "COPY.TOOL", 296: "RESET.TOOL", 297: "CONSTRAIN.NUMERIC", 298: "PASTE.TOOL", 302: "WORKBOOK.NEW", 305: "SCENARIO.CELLS", 306: "SCENARIO.DELETE", 307: "SCENARIO.ADD", 308: "SCENARIO.EDIT", 309: "SCENARIO.SHOW", 310: "SCENARIO.SHOW.NEXT", 311: "SCENARIO.SUMMARY", 312: "PIVOT.TABLE.WIZARD", 313: "PIVOT.FIELD.PROPERTIES", 314: "PIVOT.FIELD", 315: "PIVOT.ITEM", 316: "PIVOT.ADD.FIELDS", 318: "OPTIONS.CALCULATION", 319: "OPTIONS.EDIT", 320: "OPTIONS.VIEW", 321: "ADDIN.MANAGER", 322: "MENU.EDITOR", 323: "ATTACH.TOOLBARS", 324: "VBAActivate", 325: "OPTIONS.CHART", 328: "VBA.INSERT.FILE", 330: "VBA.PROCEDURE.DEFINITION", 336: "ROUTING.SLIP", 338: "ROUTE.DOCUMENT", 339: "MAIL.LOGON", 342: "INSERT.PICTURE", 343: "EDIT.TOOL", 344: "GALLERY.DOUGHNUT", 350: "CHART.TREND", 352: "PIVOT.ITEM.PROPERTIES", 354: "WORKBOOK.INSERT", 355: "OPTIONS.TRANSITION", 356: "OPTIONS.GENERAL", 370: "FILTER.ADVANCED", 373: "MAIL.ADD.MAILER", 374: "MAIL.DELETE.MAILER", 375: "MAIL.REPLY", 376: "MAIL.REPLY.ALL", 377: "MAIL.FORWARD", 378: "MAIL.NEXT.LETTER", 379: "DATA.LABEL", 380: "INSERT.TITLE", 381: "FONT.PROPERTIES", 382: "MACRO.OPTIONS", 383: "WORKBOOK.HIDE", 384: "WORKBOOK.UNHIDE", 385: "WORKBOOK.DELETE", 386: "WORKBOOK.NAME", 388: "GALLERY.CUSTOM", 390: "ADD.CHART.AUTOFORMAT", 391: "DELETE.CHART.AUTOFORMAT", 392: "CHART.ADD.DATA", 393: "AUTO.OUTLINE", 394: "TAB.ORDER", 395: "SHOW.DIALOG", 396: "SELECT.ALL", 397: "UNGROUP.SHEETS", 398: "SUBTOTAL.CREATE", 399: "SUBTOTAL.REMOVE", 400: "RENAME.OBJECT", 412: "WORKBOOK.SCROLL", 413: "WORKBOOK.NEXT", 414: "WORKBOOK.PREV", 415: "WORKBOOK.TAB.SPLIT", 416: "FULL.SCREEN", 417: "WORKBOOK.PROTECT", 420: "SCROLLBAR.PROPERTIES", 421: "PIVOT.SHOW.PAGES", 422: "TEXT.TO.COLUMNS", 423: "FORMAT.CHARTTYPE", 424: "LINK.FORMAT", 425: "TRACER.DISPLAY", 430: "TRACER.NAVIGATE", 431: "TRACER.CLEAR", 432: "TRACER.ERROR", 433: "PIVOT.FIELD.GROUP", 434: "PIVOT.FIELD.UNGROUP", 435: "CHECKBOX.PROPERTIES", 436: "LABEL.PROPERTIES", 437: "LISTBOX.PROPERTIES", 438: "EDITBOX.PROPERTIES", 439: "PIVOT.REFRESH", 440: "LINK.COMBO", 441: "OPEN.TEXT", 442: "HIDE.DIALOG", 443: "SET.DIALOG.FOCUS", 444: "ENABLE.OBJECT", 445: "PUSHBUTTON.PROPERTIES", 446: "SET.DIALOG.DEFAULT", 447: "FILTER", 448: "FILTER.SHOW.ALL", 449: "CLEAR.OUTLINE", 450: "FUNCTION.WIZARD", 451: "ADD.LIST.ITEM", 452: "SET.LIST.ITEM", 453: "REMOVE.LIST.ITEM", 454: "SELECT.LIST.ITEM", 455: "SET.CONTROL.VALUE", 456: "SAVE.COPY.AS", 458: "OPTIONS.LISTS.ADD", 459: "OPTIONS.LISTS.DELETE", 460: "SERIES.AXES", 461: "SERIES.X", 462: "SERIES.Y", 463: "ERRORBAR.X", 464: "ERRORBAR.Y", 465: "FORMAT.CHART", 466: "SERIES.ORDER", 467: "MAIL.LOGOFF", 468: "CLEAR.ROUTING.SLIP", 469: "APP.ACTIVATE.MICROSOFT", 470: "MAIL.EDIT.MAILER", 471: "ON.SHEET", 472: "STANDARD.WIDTH", 473: "SCENARIO.MERGE", 474: "SUMMARY.INFO", 475: "FIND.FILE", 476: "ACTIVE.CELL.FONT", 477: "ENABLE.TIPWIZARD", 478: "VBA.MAKE.ADDIN", 480: "INSERTDATATABLE", 481: "WORKGROUP.OPTIONS", 482: "MAIL.SEND.MAILER", 485: "AUTOCORRECT", 489: "POST.DOCUMENT", 491: "PICKLIST", 493: "VIEW.SHOW", 494: "VIEW.DEFINE", 495: "VIEW.DELETE", 509: "SHEET.BACKGROUND", 510: "INSERT.MAP.OBJECT", 511: "OPTIONS.MENONO", 517: "MSOCHECKS", 518: "NORMAL", 519: "LAYOUT", 520: "RM.PRINT.AREA", 521: "CLEAR.PRINT.AREA", 522: "ADD.PRINT.AREA", 523: "MOVE.BRK", 545: "HIDECURR.NOTE", 546: "HIDEALL.NOTES", 547: "DELETE.NOTE", 548: "TRAVERSE.NOTES", 549: "ACTIVATE.NOTES", 620: "PROTECT.REVISIONS", 621: "UNPROTECT.REVISIONS", 647: "OPTIONS.ME", 653: "WEB.PUBLISH", 667: "NEWWEBQUERY", 673: "PIVOT.TABLE.CHART", 753: "OPTIONS.SAVE", 755: "OPTIONS.SPELL", 808: "HIDEALL.INKANNOTS" }; Ftab = { 0: "COUNT", 1: "IF", 2: "ISNA", 3: "ISERROR", 4: "SUM", 5: "AVERAGE", 6: "MIN", 7: "MAX", 8: "ROW", 9: "COLUMN", 10: "NA", 11: "NPV", 12: "STDEV", 13: "DOLLAR", 14: "FIXED", 15: "SIN", 16: "COS", 17: "TAN", 18: "ATAN", 19: "PI", 20: "SQRT", 21: "EXP", 22: "LN", 23: "LOG10", 24: "ABS", 25: "INT", 26: "SIGN", 27: "ROUND", 28: "LOOKUP", 29: "INDEX", 30: "REPT", 31: "MID", 32: "LEN", 33: "VALUE", 34: "TRUE", 35: "FALSE", 36: "AND", 37: "OR", 38: "NOT", 39: "MOD", 40: "DCOUNT", 41: "DSUM", 42: "DAVERAGE", 43: "DMIN", 44: "DMAX", 45: "DSTDEV", 46: "VAR", 47: "DVAR", 48: "TEXT", 49: "LINEST", 50: "TREND", 51: "LOGEST", 52: "GROWTH", 53: "GOTO", 54: "HALT", 55: "RETURN", 56: "PV", 57: "FV", 58: "NPER", 59: "PMT", 60: "RATE", 61: "MIRR", 62: "IRR", 63: "RAND", 64: "MATCH", 65: "DATE", 66: "TIME", 67: "DAY", 68: "MONTH", 69: "YEAR", 70: "WEEKDAY", 71: "HOUR", 72: "MINUTE", 73: "SECOND", 74: "NOW", 75: "AREAS", 76: "ROWS", 77: "COLUMNS", 78: "OFFSET", 79: "ABSREF", 80: "RELREF", 81: "ARGUMENT", 82: "SEARCH", 83: "TRANSPOSE", 84: "ERROR", 85: "STEP", 86: "TYPE", 87: "ECHO", 88: "SET.NAME", 89: "CALLER", 90: "DEREF", 91: "WINDOWS", 92: "SERIES", 93: "DOCUMENTS", 94: "ACTIVE.CELL", 95: "SELECTION", 96: "RESULT", 97: "ATAN2", 98: "ASIN", 99: "ACOS", 100: "CHOOSE", 101: "HLOOKUP", 102: "VLOOKUP", 103: "LINKS", 104: "INPUT", 105: "ISREF", 106: "GET.FORMULA", 107: "GET.NAME", 108: "SET.VALUE", 109: "LOG", 110: "EXEC", 111: "CHAR", 112: "LOWER", 113: "UPPER", 114: "PROPER", 115: "LEFT", 116: "RIGHT", 117: "EXACT", 118: "TRIM", 119: "REPLACE", 120: "SUBSTITUTE", 121: "CODE", 122: "NAMES", 123: "DIRECTORY", 124: "FIND", 125: "CELL", 126: "ISERR", 127: "ISTEXT", 128: "ISNUMBER", 129: "ISBLANK", 130: "T", 131: "N", 132: "FOPEN", 133: "FCLOSE", 134: "FSIZE", 135: "FREADLN", 136: "FREAD", 137: "FWRITELN", 138: "FWRITE", 139: "FPOS", 140: "DATEVALUE", 141: "TIMEVALUE", 142: "SLN", 143: "SYD", 144: "DDB", 145: "GET.DEF", 146: "REFTEXT", 147: "TEXTREF", 148: "INDIRECT", 149: "REGISTER", 150: "CALL", 151: "ADD.BAR", 152: "ADD.MENU", 153: "ADD.COMMAND", 154: "ENABLE.COMMAND", 155: "CHECK.COMMAND", 156: "RENAME.COMMAND", 157: "SHOW.BAR", 158: "DELETE.MENU", 159: "DELETE.COMMAND", 160: "GET.CHART.ITEM", 161: "DIALOG.BOX", 162: "CLEAN", 163: "MDETERM", 164: "MINVERSE", 165: "MMULT", 166: "FILES", 167: "IPMT", 168: "PPMT", 169: "COUNTA", 170: "CANCEL.KEY", 171: "FOR", 172: "WHILE", 173: "BREAK", 174: "NEXT", 175: "INITIATE", 176: "REQUEST", 177: "POKE", 178: "EXECUTE", 179: "TERMINATE", 180: "RESTART", 181: "HELP", 182: "GET.BAR", 183: "PRODUCT", 184: "FACT", 185: "GET.CELL", 186: "GET.WORKSPACE", 187: "GET.WINDOW", 188: "GET.DOCUMENT", 189: "DPRODUCT", 190: "ISNONTEXT", 191: "GET.NOTE", 192: "NOTE", 193: "STDEVP", 194: "VARP", 195: "DSTDEVP", 196: "DVARP", 197: "TRUNC", 198: "ISLOGICAL", 199: "DCOUNTA", 200: "DELETE.BAR", 201: "UNREGISTER", 204: "USDOLLAR", 205: "FINDB", 206: "SEARCHB", 207: "REPLACEB", 208: "LEFTB", 209: "RIGHTB", 210: "MIDB", 211: "LENB", 212: "ROUNDUP", 213: "ROUNDDOWN", 214: "ASC", 215: "DBCS", 216: "RANK", 219: "ADDRESS", 220: "DAYS360", 221: "TODAY", 222: "VDB", 223: "ELSE", 224: "ELSE.IF", 225: "END.IF", 226: "FOR.CELL", 227: "MEDIAN", 228: "SUMPRODUCT", 229: "SINH", 230: "COSH", 231: "TANH", 232: "ASINH", 233: "ACOSH", 234: "ATANH", 235: "DGET", 236: "CREATE.OBJECT", 237: "VOLATILE", 238: "LAST.ERROR", 239: "CUSTOM.UNDO", 240: "CUSTOM.REPEAT", 241: "FORMULA.CONVERT", 242: "GET.LINK.INFO", 243: "TEXT.BOX", 244: "INFO", 245: "GROUP", 246: "GET.OBJECT", 247: "DB", 248: "PAUSE", 251: "RESUME", 252: "FREQUENCY", 253: "ADD.TOOLBAR", 254: "DELETE.TOOLBAR", 255: "User", 256: "RESET.TOOLBAR", 257: "EVALUATE", 258: "GET.TOOLBAR", 259: "GET.TOOL", 260: "SPELLING.CHECK", 261: "ERROR.TYPE", 262: "APP.TITLE", 263: "WINDOW.TITLE", 264: "SAVE.TOOLBAR", 265: "ENABLE.TOOL", 266: "PRESS.TOOL", 267: "REGISTER.ID", 268: "GET.WORKBOOK", 269: "AVEDEV", 270: "BETADIST", 271: "GAMMALN", 272: "BETAINV", 273: "BINOMDIST", 274: "CHIDIST", 275: "CHIINV", 276: "COMBIN", 277: "CONFIDENCE", 278: "CRITBINOM", 279: "EVEN", 280: "EXPONDIST", 281: "FDIST", 282: "FINV", 283: "FISHER", 284: "FISHERINV", 285: "FLOOR", 286: "GAMMADIST", 287: "GAMMAINV", 288: "CEILING", 289: "HYPGEOMDIST", 290: "LOGNORMDIST", 291: "LOGINV", 292: "NEGBINOMDIST", 293: "NORMDIST", 294: "NORMSDIST", 295: "NORMINV", 296: "NORMSINV", 297: "STANDARDIZE", 298: "ODD", 299: "PERMUT", 300: "POISSON", 301: "TDIST", 302: "WEIBULL", 303: "SUMXMY2", 304: "SUMX2MY2", 305: "SUMX2PY2", 306: "CHITEST", 307: "CORREL", 308: "COVAR", 309: "FORECAST", 310: "FTEST", 311: "INTERCEPT", 312: "PEARSON", 313: "RSQ", 314: "STEYX", 315: "SLOPE", 316: "TTEST", 317: "PROB", 318: "DEVSQ", 319: "GEOMEAN", 320: "HARMEAN", 321: "SUMSQ", 322: "KURT", 323: "SKEW", 324: "ZTEST", 325: "LARGE", 326: "SMALL", 327: "QUARTILE", 328: "PERCENTILE", 329: "PERCENTRANK", 330: "MODE", 331: "TRIMMEAN", 332: "TINV", 334: "MOVIE.COMMAND", 335: "GET.MOVIE", 336: "CONCATENATE", 337: "POWER", 338: "PIVOT.ADD.DATA", 339: "GET.PIVOT.TABLE", 340: "GET.PIVOT.FIELD", 341: "GET.PIVOT.ITEM", 342: "RADIANS", 343: "DEGREES", 344: "SUBTOTAL", 345: "SUMIF", 346: "COUNTIF", 347: "COUNTBLANK", 348: "SCENARIO.GET", 349: "OPTIONS.LISTS.GET", 350: "ISPMT", 351: "DATEDIF", 352: "DATESTRING", 353: "NUMBERSTRING", 354: "ROMAN", 355: "OPEN.DIALOG", 356: "SAVE.DIALOG", 357: "VIEW.GET", 358: "GETPIVOTDATA", 359: "HYPERLINK", 360: "PHONETIC", 361: "AVERAGEA", 362: "MAXA", 363: "MINA", 364: "STDEVPA", 365: "VARPA", 366: "STDEVA", 367: "VARA", 368: "BAHTTEXT", 369: "THAIDAYOFWEEK", 370: "THAIDIGIT", 371: "THAIMONTHOFYEAR", 372: "THAINUMSOUND", 373: "THAINUMSTRING", 374: "THAISTRINGLENGTH", 375: "ISTHAIDIGIT", 376: "ROUNDBAHTDOWN", 377: "ROUNDBAHTUP", 378: "THAIYEAR", 379: "RTD", 380: "CUBEVALUE", 381: "CUBEMEMBER", 382: "CUBEMEMBERPROPERTY", 383: "CUBERANKEDMEMBER", 384: "HEX2BIN", 385: "HEX2DEC", 386: "HEX2OCT", 387: "DEC2BIN", 388: "DEC2HEX", 389: "DEC2OCT", 390: "OCT2BIN", 391: "OCT2HEX", 392: "OCT2DEC", 393: "BIN2DEC", 394: "BIN2OCT", 395: "BIN2HEX", 396: "IMSUB", 397: "IMDIV", 398: "IMPOWER", 399: "IMABS", 400: "IMSQRT", 401: "IMLN", 402: "IMLOG2", 403: "IMLOG10", 404: "IMSIN", 405: "IMCOS", 406: "IMEXP", 407: "IMARGUMENT", 408: "IMCONJUGATE", 409: "IMAGINARY", 410: "IMREAL", 411: "COMPLEX", 412: "IMSUM", 413: "IMPRODUCT", 414: "SERIESSUM", 415: "FACTDOUBLE", 416: "SQRTPI", 417: "QUOTIENT", 418: "DELTA", 419: "GESTEP", 420: "ISEVEN", 421: "ISODD", 422: "MROUND", 423: "ERF", 424: "ERFC", 425: "BESSELJ", 426: "BESSELK", 427: "BESSELY", 428: "BESSELI", 429: "XIRR", 430: "XNPV", 431: "PRICEMAT", 432: "YIELDMAT", 433: "INTRATE", 434: "RECEIVED", 435: "DISC", 436: "PRICEDISC", 437: "YIELDDISC", 438: "TBILLEQ", 439: "TBILLPRICE", 440: "TBILLYIELD", 441: "PRICE", 442: "YIELD", 443: "DOLLARDE", 444: "DOLLARFR", 445: "NOMINAL", 446: "EFFECT", 447: "CUMPRINC", 448: "CUMIPMT", 449: "EDATE", 450: "EOMONTH", 451: "YEARFRAC", 452: "COUPDAYBS", 453: "COUPDAYS", 454: "COUPDAYSNC", 455: "COUPNCD", 456: "COUPNUM", 457: "COUPPCD", 458: "DURATION", 459: "MDURATION", 460: "ODDLPRICE", 461: "ODDLYIELD", 462: "ODDFPRICE", 463: "ODDFYIELD", 464: "RANDBETWEEN", 465: "WEEKNUM", 466: "AMORDEGRC", 467: "AMORLINC", 468: "CONVERT", 724: "SHEETJS", 469: "ACCRINT", 470: "ACCRINTM", 471: "WORKDAY", 472: "NETWORKDAYS", 473: "GCD", 474: "MULTINOMIAL", 475: "LCM", 476: "FVSCHEDULE", 477: "CUBEKPIMEMBER", 478: "CUBESET", 479: "CUBESETCOUNT", 480: "IFERROR", 481: "COUNTIFS", 482: "SUMIFS", 483: "AVERAGEIF", 484: "AVERAGEIFS" }; FtabArgc = { 2: 1, 3: 1, 10: 0, 15: 1, 16: 1, 17: 1, 18: 1, 19: 0, 20: 1, 21: 1, 22: 1, 23: 1, 24: 1, 25: 1, 26: 1, 27: 2, 30: 2, 31: 3, 32: 1, 33: 1, 34: 0, 35: 0, 38: 1, 39: 2, 40: 3, 41: 3, 42: 3, 43: 3, 44: 3, 45: 3, 47: 3, 48: 2, 53: 1, 61: 3, 63: 0, 65: 3, 66: 3, 67: 1, 68: 1, 69: 1, 70: 1, 71: 1, 72: 1, 73: 1, 74: 0, 75: 1, 76: 1, 77: 1, 79: 2, 80: 2, 83: 1, 85: 0, 86: 1, 89: 0, 90: 1, 94: 0, 95: 0, 97: 2, 98: 1, 99: 1, 101: 3, 102: 3, 105: 1, 106: 1, 108: 2, 111: 1, 112: 1, 113: 1, 114: 1, 117: 2, 118: 1, 119: 4, 121: 1, 126: 1, 127: 1, 128: 1, 129: 1, 130: 1, 131: 1, 133: 1, 134: 1, 135: 1, 136: 2, 137: 2, 138: 2, 140: 1, 141: 1, 142: 3, 143: 4, 144: 4, 161: 1, 162: 1, 163: 1, 164: 1, 165: 2, 172: 1, 175: 2, 176: 2, 177: 3, 178: 2, 179: 1, 184: 1, 186: 1, 189: 3, 190: 1, 195: 3, 196: 3, 197: 1, 198: 1, 199: 3, 201: 1, 207: 4, 210: 3, 211: 1, 212: 2, 213: 2, 214: 1, 215: 1, 225: 0, 229: 1, 230: 1, 231: 1, 232: 1, 233: 1, 234: 1, 235: 3, 244: 1, 247: 4, 252: 2, 257: 1, 261: 1, 271: 1, 273: 4, 274: 2, 275: 2, 276: 2, 277: 3, 278: 3, 279: 1, 280: 3, 281: 3, 282: 3, 283: 1, 284: 1, 285: 2, 286: 4, 287: 3, 288: 2, 289: 4, 290: 3, 291: 3, 292: 3, 293: 4, 294: 1, 295: 3, 296: 1, 297: 3, 298: 1, 299: 2, 300: 3, 301: 3, 302: 4, 303: 2, 304: 2, 305: 2, 306: 2, 307: 2, 308: 2, 309: 3, 310: 2, 311: 2, 312: 2, 313: 2, 314: 2, 315: 2, 316: 4, 325: 2, 326: 2, 327: 2, 328: 2, 331: 2, 332: 2, 337: 2, 342: 1, 343: 1, 346: 2, 347: 1, 350: 4, 351: 3, 352: 1, 353: 2, 360: 1, 368: 1, 369: 1, 370: 1, 371: 1, 372: 1, 373: 1, 374: 1, 375: 1, 376: 1, 377: 1, 378: 1, 382: 3, 385: 1, 392: 1, 393: 1, 396: 2, 397: 2, 398: 2, 399: 1, 400: 1, 401: 1, 402: 1, 403: 1, 404: 1, 405: 1, 406: 1, 407: 1, 408: 1, 409: 1, 410: 1, 414: 4, 415: 1, 416: 1, 417: 2, 420: 1, 421: 1, 422: 2, 424: 1, 425: 2, 426: 2, 427: 2, 428: 2, 430: 3, 438: 3, 439: 3, 440: 3, 443: 2, 444: 2, 445: 2, 446: 2, 447: 6, 448: 6, 449: 2, 450: 2, 464: 2, 468: 3, 476: 2, 479: 1, 480: 2, 65535: 0 }; strs = {}; _ssfopts = {}; browser_has_Map = typeof Map !== "undefined"; mergecregex = /<(?:\w+:)?mergeCell ref=["'][A-Z0-9:]+['"]\s*[\/]?>/g; hlinkregex = /<(?:\w+:)?hyperlink [^<>]*>/gm; dimregex = /"(\w*:\w*)"/; colregex = /<(?:\w+:)?col\b[^<>]*[\/]?>/g; afregex = /<(?:\w+:)?autoFilter[^>]*/g; marginregex = /<(?:\w+:)?pageMargins[^<>]*\/>/g; sheetprregex = /<(?:\w+:)?sheetPr\b[^<>]*?\/>/; sheetprot_deffalse = [ "objects", "scenarios", "selectLockedCells", "selectUnlockedCells" ]; sheetprot_deftrue = [ "formatColumns", "formatRows", "formatCells", "insertColumns", "insertRows", "insertHyperlinks", "deleteColumns", "deleteRows", "sort", "autoFilter", "pivotTables" ]; sviewregex = /<(?:\w:)?sheetView(?:[^<>a-z][^<>]*)?\/?>/g; parse_ws_xml_data = /* @__PURE__ */ (function() { var cellregex = /<(?:\w+:)?c[ \/>]/, rowregex = /<\/(?:\w+:)?row>/; var rregex = /r=["']([^"']*)["']/; var refregex = /ref=["']([^"']*)["']/; return function parse_ws_xml_data$1(sdata, s$5, opts, guess, themes, styles$1, wb) { var ri = 0, x$2 = "", cells = [], cref = [], idx = 0, i$7 = 0, cc = 0, d$5 = "", p$3; var tag, tagr = 0, tagc = 0; var sstr, ftag; var fmtid = 0, fillid = 0; var do_format = Array.isArray(styles$1.CellXf), cf; var arrayf = []; var sharedf = []; var dense = s$5["!data"] != null; var rows = [], rowobj = {}, rowrite = false; var sheetStubs = !!opts.sheetStubs; var date1904 = !!((wb || {}).WBProps || {}).date1904; for (var marr = sdata.split(rowregex), mt = 0, marrlen = marr.length; mt != marrlen; ++mt) { x$2 = marr[mt].trim(); var xlen = x$2.length; if (xlen === 0) continue; var rstarti = 0; outa: for (ri = 0; ri < xlen; ++ri) switch (x$2[ri]) { case ">": if (x$2[ri - 1] != "/") { ++ri; break outa; } if (opts && opts.cellStyles) { tag = parsexmltag(x$2.slice(rstarti, ri), true); tagr = tag.r != null ? parseInt(tag.r, 10) : tagr + 1; tagc = -1; if (opts.sheetRows && opts.sheetRows < tagr) continue; rowobj = {}; rowrite = false; if (tag.ht) { rowrite = true; rowobj.hpt = parseFloat(tag.ht); rowobj.hpx = pt2px(rowobj.hpt); } if (tag.hidden && parsexmlbool(tag.hidden)) { rowrite = true; rowobj.hidden = true; } if (tag.outlineLevel != null) { rowrite = true; rowobj.level = +tag.outlineLevel; } if (rowrite) rows[tagr - 1] = rowobj; } break; case "<": rstarti = ri; break; } if (rstarti >= ri) break; tag = parsexmltag(x$2.slice(rstarti, ri), true); tagr = tag.r != null ? parseInt(tag.r, 10) : tagr + 1; tagc = -1; if (opts.sheetRows && opts.sheetRows < tagr) continue; if (!opts.nodim) { if (guess.s.r > tagr - 1) guess.s.r = tagr - 1; if (guess.e.r < tagr - 1) guess.e.r = tagr - 1; } if (opts && opts.cellStyles) { rowobj = {}; rowrite = false; if (tag.ht) { rowrite = true; rowobj.hpt = parseFloat(tag.ht); rowobj.hpx = pt2px(rowobj.hpt); } if (tag.hidden && parsexmlbool(tag.hidden)) { rowrite = true; rowobj.hidden = true; } if (tag.outlineLevel != null) { rowrite = true; rowobj.level = +tag.outlineLevel; } if (rowrite) rows[tagr - 1] = rowobj; } cells = x$2.slice(ri).split(cellregex); for (var rslice = 0; rslice != cells.length; ++rslice) if (cells[rslice].trim().charAt(0) != "<") break; cells = cells.slice(rslice); for (ri = 0; ri != cells.length; ++ri) { x$2 = cells[ri].trim(); if (x$2.length === 0) continue; cref = x$2.match(rregex); idx = ri; i$7 = 0; cc = 0; x$2 = "" : "") + x$2; if (cref != null && cref.length === 2) { idx = 0; d$5 = cref[1]; for (i$7 = 0; i$7 != d$5.length; ++i$7) { if ((cc = d$5.charCodeAt(i$7) - 64) < 1 || cc > 26) break; idx = 26 * idx + cc; } --idx; tagc = idx; } else ++tagc; for (i$7 = 0; i$7 != x$2.length; ++i$7) if (x$2.charCodeAt(i$7) === 62) break; ++i$7; tag = parsexmltag(x$2.slice(0, i$7), true); if (!tag.r) tag.r = encode_cell({ r: tagr - 1, c: tagc }); d$5 = x$2.slice(i$7); p$3 = { t: "" }; if ((cref = str_match_xml_ns(d$5, "v")) != null && cref[1] !== "") p$3.v = unescapexml(cref[1]); if (opts.cellFormula) { if ((cref = str_match_xml_ns(d$5, "f")) != null) { if (cref[1] == "") { if (cref[0].indexOf("t=\"shared\"") > -1) { ftag = parsexmltag(cref[0]); if (sharedf[ftag.si]) p$3.f = shift_formula_xlsx(sharedf[ftag.si][1], sharedf[ftag.si][2], tag.r); } } else { p$3.f = unescapexml(utf8read(cref[1]), true); if (!opts.xlfn) p$3.f = _xlfn(p$3.f); if (cref[0].indexOf("t=\"array\"") > -1) { p$3.F = (d$5.match(refregex) || [])[1]; if (p$3.F.indexOf(":") > -1) arrayf.push([safe_decode_range(p$3.F), p$3.F]); } else if (cref[0].indexOf("t=\"shared\"") > -1) { ftag = parsexmltag(cref[0]); var ___f = unescapexml(utf8read(cref[1])); if (!opts.xlfn) ___f = _xlfn(___f); sharedf[parseInt(ftag.si, 10)] = [ ftag, ___f, tag.r ]; } } } else if (cref = d$5.match(/]*\/>/)) { ftag = parsexmltag(cref[0]); if (sharedf[ftag.si]) p$3.f = shift_formula_xlsx(sharedf[ftag.si][1], sharedf[ftag.si][2], tag.r); } var _tag = decode_cell(tag.r); for (i$7 = 0; i$7 < arrayf.length; ++i$7) if (_tag.r >= arrayf[i$7][0].s.r && _tag.r <= arrayf[i$7][0].e.r) { if (_tag.c >= arrayf[i$7][0].s.c && _tag.c <= arrayf[i$7][0].e.c) p$3.F = arrayf[i$7][1]; } } if (tag.t == null && p$3.v === undefined) { if (p$3.f || p$3.F) { p$3.v = 0; p$3.t = "n"; } else if (!sheetStubs) continue; else p$3.t = "z"; } else p$3.t = tag.t || "n"; if (guess.s.c > tagc) guess.s.c = tagc; if (guess.e.c < tagc) guess.e.c = tagc; switch (p$3.t) { case "n": if (p$3.v == "" || p$3.v == null) { if (!sheetStubs) continue; p$3.t = "z"; } else p$3.v = parseFloat(p$3.v); break; case "s": if (typeof p$3.v == "undefined") { if (!sheetStubs) continue; p$3.t = "z"; } else { sstr = strs[parseInt(p$3.v, 10)]; p$3.v = sstr.t; p$3.r = sstr.r; if (opts.cellHTML) p$3.h = sstr.h; } break; case "str": p$3.t = "s"; p$3.v = p$3.v != null ? unescapexml(utf8read(p$3.v), true) : ""; if (opts.cellHTML) p$3.h = escapehtml(p$3.v); break; case "inlineStr": cref = str_match_xml_ns(d$5, "is"); p$3.t = "s"; if (cref != null && (sstr = parse_si(cref[1]))) { p$3.v = sstr.t; if (opts.cellHTML) p$3.h = sstr.h; } else p$3.v = ""; break; case "b": p$3.v = parsexmlbool(p$3.v); break; case "d": if (opts.cellDates) p$3.v = parseDate(p$3.v, date1904); else { p$3.v = datenum(parseDate(p$3.v, date1904), date1904); p$3.t = "n"; } break; case "e": if (!opts || opts.cellText !== false) p$3.w = p$3.v; p$3.v = RBErr[p$3.v]; break; } fmtid = fillid = 0; cf = null; if (do_format && tag.s !== undefined) { cf = styles$1.CellXf[tag.s]; if (cf != null) { if (cf.numFmtId != null) fmtid = cf.numFmtId; if (opts.cellStyles) { if (cf.fillId != null) fillid = cf.fillId; } } } safe_format(p$3, fmtid, fillid, opts, themes, styles$1, date1904); if (opts.cellDates && do_format && p$3.t == "n" && fmt_is_date(table_fmt[fmtid])) { p$3.v = numdate(p$3.v + (date1904 ? 1462 : 0)); p$3.t = typeof p$3.v == "number" ? "n" : "d"; } if (tag.cm && opts.xlmeta) { var cm = (opts.xlmeta.Cell || [])[+tag.cm - 1]; if (cm && cm.type == "XLDAPR") p$3.D = true; } var _r; if (opts.nodim) { _r = decode_cell(tag.r); if (guess.s.r > _r.r) guess.s.r = _r.r; if (guess.e.r < _r.r) guess.e.r = _r.r; } if (dense) { _r = decode_cell(tag.r); if (!s$5["!data"][_r.r]) s$5["!data"][_r.r] = []; s$5["!data"][_r.r][_r.c] = p$3; } else s$5[tag.r] = p$3; } } if (rows.length > 0) s$5["!rows"] = rows; }; })(); parse_BrtWsDim = parse_UncheckedRfX; write_BrtWsDim = write_UncheckedRfX; parse_BrtMergeCell = parse_UncheckedRfX; write_BrtMergeCell = write_UncheckedRfX; BrtMarginKeys = [ "left", "right", "top", "bottom", "header", "footer" ]; WBPropsDef = [ [ "allowRefreshQuery", false, "bool" ], [ "autoCompressPictures", true, "bool" ], [ "backupFile", false, "bool" ], [ "checkCompatibility", false, "bool" ], ["CodeName", ""], [ "date1904", false, "bool" ], [ "defaultThemeVersion", 0, "int" ], [ "filterPrivacy", false, "bool" ], [ "hidePivotFieldList", false, "bool" ], [ "promptedSolutions", false, "bool" ], [ "publishItems", false, "bool" ], [ "refreshAllConnections", false, "bool" ], [ "saveExternalLinkValues", true, "bool" ], [ "showBorderUnselectedTables", true, "bool" ], [ "showInkAnnotation", true, "bool" ], ["showObjects", "all"], [ "showPivotChartFilter", false, "bool" ], ["updateLinks", "userSet"] ]; WBViewDef = [ [ "activeTab", 0, "int" ], [ "autoFilterDateGrouping", true, "bool" ], [ "firstSheet", 0, "int" ], [ "minimized", false, "bool" ], [ "showHorizontalScroll", true, "bool" ], [ "showSheetTabs", true, "bool" ], [ "showVerticalScroll", true, "bool" ], [ "tabRatio", 600, "int" ], ["visibility", "visible"] ]; SheetDef = []; CalcPrDef = [ ["calcCompleted", "true"], ["calcMode", "auto"], ["calcOnSave", "true"], ["concurrentCalc", "true"], ["fullCalcOnLoad", "false"], ["fullPrecision", "true"], ["iterate", "false"], ["iterateCount", "100"], ["iterateDelta", "0.001"], ["refMode", "A1"] ]; badchars = /* @__PURE__ */ ":][*?/\\".split(""); wbnsregex = /<\w+:workbook/; attregexg2 = /\b((?:\w+:)?[\w]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:'))/g; attregex2 = /\b((?:\w+:)?[\w]+)=((?:")(?:[^"]*)(?:")|(?:')(?:[^']*)(?:'))/; ; CONTINUE_RT = [ 60, 1084, 2066, 2165, 2175 ]; PSCLSID = { SI: "e0859ff2f94f6810ab9108002b27b3d9", DSI: "02d5cdd59c2e1b10939708002b2cf9ae", UDI: "05d5cdd59c2e1b10939708002b2cf9ae" }; XLSBRecordEnum = { 0: { f: parse_BrtRowHdr }, 1: { f: parse_BrtCellBlank }, 2: { f: parse_BrtCellRk }, 3: { f: parse_BrtCellError }, 4: { f: parse_BrtCellBool }, 5: { f: parse_BrtCellReal }, 6: { f: parse_BrtCellSt }, 7: { f: parse_BrtCellIsst }, 8: { f: parse_BrtFmlaString }, 9: { f: parse_BrtFmlaNum }, 10: { f: parse_BrtFmlaBool }, 11: { f: parse_BrtFmlaError }, 12: { f: parse_BrtShortBlank }, 13: { f: parse_BrtShortRk }, 14: { f: parse_BrtShortError }, 15: { f: parse_BrtShortBool }, 16: { f: parse_BrtShortReal }, 17: { f: parse_BrtShortSt }, 18: { f: parse_BrtShortIsst }, 19: { f: parse_RichStr }, 20: {}, 21: {}, 22: {}, 23: {}, 24: {}, 25: {}, 26: {}, 27: {}, 28: {}, 29: {}, 30: {}, 31: {}, 32: {}, 33: {}, 34: {}, 35: { T: 1 }, 36: { T: -1 }, 37: { T: 1 }, 38: { T: -1 }, 39: { f: parse_BrtName }, 40: {}, 42: {}, 43: { f: parse_BrtFont }, 44: { f: parse_BrtFmt }, 45: { f: parse_BrtFill }, 46: { f: parse_BrtBorder }, 47: { f: parse_BrtXF }, 48: {}, 49: { f: parse_Int32LE }, 50: {}, 51: { f: parse_BrtMdb }, 52: { T: 1 }, 53: { T: -1 }, 54: { T: 1 }, 55: { T: -1 }, 56: { T: 1 }, 57: { T: -1 }, 58: {}, 59: {}, 60: { f: parse_ColInfo }, 62: { f: parse_BrtCellRString }, 63: { f: parse_BrtCalcChainItem$ }, 64: { f: parse_BrtDVal }, 65: {}, 66: {}, 67: {}, 68: {}, 69: {}, 70: {}, 128: {}, 129: { T: 1 }, 130: { T: -1 }, 131: { T: 1, f: parsenoop, p: 0 }, 132: { T: -1 }, 133: { T: 1 }, 134: { T: -1 }, 135: { T: 1 }, 136: { T: -1 }, 137: { T: 1, f: parse_BrtBeginWsView }, 138: { T: -1 }, 139: { T: 1 }, 140: { T: -1 }, 141: { T: 1 }, 142: { T: -1 }, 143: { T: 1 }, 144: { T: -1 }, 145: { T: 1 }, 146: { T: -1 }, 147: { f: parse_BrtWsProp }, 148: { f: parse_BrtWsDim, p: 16 }, 151: { f: parse_BrtPane }, 152: {}, 153: { f: parse_BrtWbProp }, 154: {}, 155: {}, 156: { f: parse_BrtBundleSh }, 157: {}, 158: {}, 159: { T: 1, f: parse_BrtBeginSst }, 160: { T: -1 }, 161: { T: 1, f: parse_UncheckedRfX }, 162: { T: -1 }, 163: { T: 1 }, 164: { T: -1 }, 165: { T: 1 }, 166: { T: -1 }, 167: {}, 168: {}, 169: {}, 170: {}, 171: {}, 172: { T: 1 }, 173: { T: -1 }, 174: {}, 175: {}, 176: { f: parse_BrtMergeCell }, 177: { T: 1 }, 178: { T: -1 }, 179: { T: 1 }, 180: { T: -1 }, 181: { T: 1 }, 182: { T: -1 }, 183: { T: 1 }, 184: { T: -1 }, 185: { T: 1 }, 186: { T: -1 }, 187: { T: 1 }, 188: { T: -1 }, 189: { T: 1 }, 190: { T: -1 }, 191: { T: 1 }, 192: { T: -1 }, 193: { T: 1 }, 194: { T: -1 }, 195: { T: 1 }, 196: { T: -1 }, 197: { T: 1 }, 198: { T: -1 }, 199: { T: 1 }, 200: { T: -1 }, 201: { T: 1 }, 202: { T: -1 }, 203: { T: 1 }, 204: { T: -1 }, 205: { T: 1 }, 206: { T: -1 }, 207: { T: 1 }, 208: { T: -1 }, 209: { T: 1 }, 210: { T: -1 }, 211: { T: 1 }, 212: { T: -1 }, 213: { T: 1 }, 214: { T: -1 }, 215: { T: 1 }, 216: { T: -1 }, 217: { T: 1 }, 218: { T: -1 }, 219: { T: 1 }, 220: { T: -1 }, 221: { T: 1 }, 222: { T: -1 }, 223: { T: 1 }, 224: { T: -1 }, 225: { T: 1 }, 226: { T: -1 }, 227: { T: 1 }, 228: { T: -1 }, 229: { T: 1 }, 230: { T: -1 }, 231: { T: 1 }, 232: { T: -1 }, 233: { T: 1 }, 234: { T: -1 }, 235: { T: 1 }, 236: { T: -1 }, 237: { T: 1 }, 238: { T: -1 }, 239: { T: 1 }, 240: { T: -1 }, 241: { T: 1 }, 242: { T: -1 }, 243: { T: 1 }, 244: { T: -1 }, 245: { T: 1 }, 246: { T: -1 }, 247: { T: 1 }, 248: { T: -1 }, 249: { T: 1 }, 250: { T: -1 }, 251: { T: 1 }, 252: { T: -1 }, 253: { T: 1 }, 254: { T: -1 }, 255: { T: 1 }, 256: { T: -1 }, 257: { T: 1 }, 258: { T: -1 }, 259: { T: 1 }, 260: { T: -1 }, 261: { T: 1 }, 262: { T: -1 }, 263: { T: 1 }, 264: { T: -1 }, 265: { T: 1 }, 266: { T: -1 }, 267: { T: 1 }, 268: { T: -1 }, 269: { T: 1 }, 270: { T: -1 }, 271: { T: 1 }, 272: { T: -1 }, 273: { T: 1 }, 274: { T: -1 }, 275: { T: 1 }, 276: { T: -1 }, 277: {}, 278: { T: 1 }, 279: { T: -1 }, 280: { T: 1 }, 281: { T: -1 }, 282: { T: 1 }, 283: { T: 1 }, 284: { T: -1 }, 285: { T: 1 }, 286: { T: -1 }, 287: { T: 1 }, 288: { T: -1 }, 289: { T: 1 }, 290: { T: -1 }, 291: { T: 1 }, 292: { T: -1 }, 293: { T: 1 }, 294: { T: -1 }, 295: { T: 1 }, 296: { T: -1 }, 297: { T: 1 }, 298: { T: -1 }, 299: { T: 1 }, 300: { T: -1 }, 301: { T: 1 }, 302: { T: -1 }, 303: { T: 1 }, 304: { T: -1 }, 305: { T: 1 }, 306: { T: -1 }, 307: { T: 1 }, 308: { T: -1 }, 309: { T: 1 }, 310: { T: -1 }, 311: { T: 1 }, 312: { T: -1 }, 313: { T: -1 }, 314: { T: 1 }, 315: { T: -1 }, 316: { T: 1 }, 317: { T: -1 }, 318: { T: 1 }, 319: { T: -1 }, 320: { T: 1 }, 321: { T: -1 }, 322: { T: 1 }, 323: { T: -1 }, 324: { T: 1 }, 325: { T: -1 }, 326: { T: 1 }, 327: { T: -1 }, 328: { T: 1 }, 329: { T: -1 }, 330: { T: 1 }, 331: { T: -1 }, 332: { T: 1 }, 333: { T: -1 }, 334: { T: 1 }, 335: { f: parse_BrtMdtinfo }, 336: { T: -1 }, 337: { f: parse_BrtBeginEsmdb, T: 1 }, 338: { T: -1 }, 339: { T: 1 }, 340: { T: -1 }, 341: { T: 1 }, 342: { T: -1 }, 343: { T: 1 }, 344: { T: -1 }, 345: { T: 1 }, 346: { T: -1 }, 347: { T: 1 }, 348: { T: -1 }, 349: { T: 1 }, 350: { T: -1 }, 351: {}, 352: {}, 353: { T: 1 }, 354: { T: -1 }, 355: { f: parse_RelID }, 357: {}, 358: {}, 359: {}, 360: { T: 1 }, 361: {}, 362: { f: parse_ExternSheet }, 363: {}, 364: {}, 366: {}, 367: {}, 368: {}, 369: {}, 370: {}, 371: {}, 372: { T: 1 }, 373: { T: -1 }, 374: { T: 1 }, 375: { T: -1 }, 376: { T: 1 }, 377: { T: -1 }, 378: { T: 1 }, 379: { T: -1 }, 380: { T: 1 }, 381: { T: -1 }, 382: { T: 1 }, 383: { T: -1 }, 384: { T: 1 }, 385: { T: -1 }, 386: { T: 1 }, 387: { T: -1 }, 388: { T: 1 }, 389: { T: -1 }, 390: { T: 1 }, 391: { T: -1 }, 392: { T: 1 }, 393: { T: -1 }, 394: { T: 1 }, 395: { T: -1 }, 396: {}, 397: {}, 398: {}, 399: {}, 400: {}, 401: { T: 1 }, 403: {}, 404: {}, 405: {}, 406: {}, 407: {}, 408: {}, 409: {}, 410: {}, 411: {}, 412: {}, 413: {}, 414: {}, 415: {}, 416: {}, 417: {}, 418: {}, 419: {}, 420: {}, 421: {}, 422: { T: 1 }, 423: { T: 1 }, 424: { T: -1 }, 425: { T: -1 }, 426: { f: parse_BrtArrFmla }, 427: { f: parse_BrtShrFmla }, 428: {}, 429: { T: 1 }, 430: { T: -1 }, 431: { T: 1 }, 432: { T: -1 }, 433: { T: 1 }, 434: { T: -1 }, 435: { T: 1 }, 436: { T: -1 }, 437: { T: 1 }, 438: { T: -1 }, 439: { T: 1 }, 440: { T: -1 }, 441: { T: 1 }, 442: { T: -1 }, 443: { T: 1 }, 444: { T: -1 }, 445: { T: 1 }, 446: { T: -1 }, 447: { T: 1 }, 448: { T: -1 }, 449: { T: 1 }, 450: { T: -1 }, 451: { T: 1 }, 452: { T: -1 }, 453: { T: 1 }, 454: { T: -1 }, 455: { T: 1 }, 456: { T: -1 }, 457: { T: 1 }, 458: { T: -1 }, 459: { T: 1 }, 460: { T: -1 }, 461: { T: 1 }, 462: { T: -1 }, 463: { T: 1 }, 464: { T: -1 }, 465: { T: 1 }, 466: { T: -1 }, 467: { T: 1 }, 468: { T: -1 }, 469: { T: 1 }, 470: { T: -1 }, 471: {}, 472: {}, 473: { T: 1 }, 474: { T: -1 }, 475: {}, 476: { f: parse_BrtMargins }, 477: {}, 478: {}, 479: { T: 1 }, 480: { T: -1 }, 481: { T: 1 }, 482: { T: -1 }, 483: { T: 1 }, 484: { T: -1 }, 485: { f: parse_BrtWsFmtInfo }, 486: { T: 1 }, 487: { T: -1 }, 488: { T: 1 }, 489: { T: -1 }, 490: { T: 1 }, 491: { T: -1 }, 492: { T: 1 }, 493: { T: -1 }, 494: { f: parse_BrtHLink }, 495: { T: 1 }, 496: { T: -1 }, 497: { T: 1 }, 498: { T: -1 }, 499: {}, 500: { T: 1 }, 501: { T: -1 }, 502: { T: 1 }, 503: { T: -1 }, 504: {}, 505: { T: 1 }, 506: { T: -1 }, 507: {}, 508: { T: 1 }, 509: { T: -1 }, 510: { T: 1 }, 511: { T: -1 }, 512: {}, 513: {}, 514: { T: 1 }, 515: { T: -1 }, 516: { T: 1 }, 517: { T: -1 }, 518: { T: 1 }, 519: { T: -1 }, 520: { T: 1 }, 521: { T: -1 }, 522: {}, 523: {}, 524: {}, 525: {}, 526: {}, 527: {}, 528: { T: 1 }, 529: { T: -1 }, 530: { T: 1 }, 531: { T: -1 }, 532: { T: 1 }, 533: { T: -1 }, 534: {}, 535: {}, 536: {}, 537: {}, 538: { T: 1 }, 539: { T: -1 }, 540: { T: 1 }, 541: { T: -1 }, 542: { T: 1 }, 548: {}, 549: {}, 550: { f: parse_RelID }, 551: { f: parse_XLNullableWideString }, 552: {}, 553: {}, 554: { T: 1 }, 555: { T: -1 }, 556: { T: 1 }, 557: { T: -1 }, 558: { T: 1 }, 559: { T: -1 }, 560: { T: 1 }, 561: { T: -1 }, 562: {}, 564: {}, 565: { T: 1 }, 566: { T: -1 }, 569: { T: 1 }, 570: { T: -1 }, 572: {}, 573: { T: 1 }, 574: { T: -1 }, 577: {}, 578: {}, 579: {}, 580: {}, 581: {}, 582: {}, 583: {}, 584: {}, 585: {}, 586: {}, 587: {}, 588: { T: -1 }, 589: {}, 590: { T: 1 }, 591: { T: -1 }, 592: { T: 1 }, 593: { T: -1 }, 594: { T: 1 }, 595: { T: -1 }, 596: {}, 597: { T: 1 }, 598: { T: -1 }, 599: { T: 1 }, 600: { T: -1 }, 601: { T: 1 }, 602: { T: -1 }, 603: { T: 1 }, 604: { T: -1 }, 605: { T: 1 }, 606: { T: -1 }, 607: {}, 608: { T: 1 }, 609: { T: -1 }, 610: {}, 611: { T: 1 }, 612: { T: -1 }, 613: { T: 1 }, 614: { T: -1 }, 615: { T: 1 }, 616: { T: -1 }, 617: { T: 1 }, 618: { T: -1 }, 619: { T: 1 }, 620: { T: -1 }, 625: {}, 626: { T: 1 }, 627: { T: -1 }, 628: { T: 1 }, 629: { T: -1 }, 630: { T: 1 }, 631: { T: -1 }, 632: { f: parse_BrtCommentAuthor }, 633: { T: 1 }, 634: { T: -1 }, 635: { T: 1, f: parse_BrtBeginComment }, 636: { T: -1 }, 637: { f: parse_BrtCommentText }, 638: { T: 1 }, 639: {}, 640: { T: -1 }, 641: { T: 1 }, 642: { T: -1 }, 643: { T: 1 }, 644: {}, 645: { T: -1 }, 646: { T: 1 }, 648: { T: 1 }, 649: {}, 650: { T: -1 }, 651: { f: parse_BrtCsProp }, 652: {}, 653: { T: 1 }, 654: { T: -1 }, 655: { T: 1 }, 656: { T: -1 }, 657: { T: 1 }, 658: { T: -1 }, 659: {}, 660: { T: 1 }, 661: {}, 662: { T: -1 }, 663: {}, 664: { T: 1 }, 665: {}, 666: { T: -1 }, 667: {}, 668: {}, 669: {}, 671: { T: 1 }, 672: { T: -1 }, 673: { T: 1 }, 674: { T: -1 }, 675: {}, 676: {}, 677: {}, 678: {}, 679: {}, 680: {}, 681: {}, 1024: {}, 1025: {}, 1026: { T: 1 }, 1027: { T: -1 }, 1028: { T: 1 }, 1029: { T: -1 }, 1030: {}, 1031: { T: 1 }, 1032: { T: -1 }, 1033: { T: 1 }, 1034: { T: -1 }, 1035: {}, 1036: {}, 1037: {}, 1038: { T: 1 }, 1039: { T: -1 }, 1040: {}, 1041: { T: 1 }, 1042: { T: -1 }, 1043: {}, 1044: {}, 1045: {}, 1046: { T: 1 }, 1047: { T: -1 }, 1048: { T: 1 }, 1049: { T: -1 }, 1050: {}, 1051: { T: 1 }, 1052: { T: 1 }, 1053: { f: parse_BrtDVal14 }, 1054: { T: 1 }, 1055: {}, 1056: { T: 1 }, 1057: { T: -1 }, 1058: { T: 1 }, 1059: { T: -1 }, 1061: {}, 1062: { T: 1 }, 1063: { T: -1 }, 1064: { T: 1 }, 1065: { T: -1 }, 1066: { T: 1 }, 1067: { T: -1 }, 1068: { T: 1 }, 1069: { T: -1 }, 1070: { T: 1 }, 1071: { T: -1 }, 1072: { T: 1 }, 1073: { T: -1 }, 1075: { T: 1 }, 1076: { T: -1 }, 1077: { T: 1 }, 1078: { T: -1 }, 1079: { T: 1 }, 1080: { T: -1 }, 1081: { T: 1 }, 1082: { T: -1 }, 1083: { T: 1 }, 1084: { T: -1 }, 1085: {}, 1086: { T: 1 }, 1087: { T: -1 }, 1088: { T: 1 }, 1089: { T: -1 }, 1090: { T: 1 }, 1091: { T: -1 }, 1092: { T: 1 }, 1093: { T: -1 }, 1094: { T: 1 }, 1095: { T: -1 }, 1096: {}, 1097: { T: 1 }, 1098: {}, 1099: { T: -1 }, 1100: { T: 1 }, 1101: { T: -1 }, 1102: {}, 1103: {}, 1104: {}, 1105: {}, 1111: {}, 1112: {}, 1113: { T: 1 }, 1114: { T: -1 }, 1115: { T: 1 }, 1116: { T: -1 }, 1117: {}, 1118: { T: 1 }, 1119: { T: -1 }, 1120: { T: 1 }, 1121: { T: -1 }, 1122: { T: 1 }, 1123: { T: -1 }, 1124: { T: 1 }, 1125: { T: -1 }, 1126: {}, 1128: { T: 1 }, 1129: { T: -1 }, 1130: {}, 1131: { T: 1 }, 1132: { T: -1 }, 1133: { T: 1 }, 1134: { T: -1 }, 1135: { T: 1 }, 1136: { T: -1 }, 1137: { T: 1 }, 1138: { T: -1 }, 1139: { T: 1 }, 1140: { T: -1 }, 1141: {}, 1142: { T: 1 }, 1143: { T: -1 }, 1144: { T: 1 }, 1145: { T: -1 }, 1146: {}, 1147: { T: 1 }, 1148: { T: -1 }, 1149: { T: 1 }, 1150: { T: -1 }, 1152: { T: 1 }, 1153: { T: -1 }, 1154: { T: -1 }, 1155: { T: -1 }, 1156: { T: -1 }, 1157: { T: 1 }, 1158: { T: -1 }, 1159: { T: 1 }, 1160: { T: -1 }, 1161: { T: 1 }, 1162: { T: -1 }, 1163: { T: 1 }, 1164: { T: -1 }, 1165: { T: 1 }, 1166: { T: -1 }, 1167: { T: 1 }, 1168: { T: -1 }, 1169: { T: 1 }, 1170: { T: -1 }, 1171: {}, 1172: { T: 1 }, 1173: { T: -1 }, 1177: {}, 1178: { T: 1 }, 1180: {}, 1181: {}, 1182: {}, 2048: { T: 1 }, 2049: { T: -1 }, 2050: {}, 2051: { T: 1 }, 2052: { T: -1 }, 2053: {}, 2054: {}, 2055: { T: 1 }, 2056: { T: -1 }, 2057: { T: 1 }, 2058: { T: -1 }, 2060: {}, 2067: {}, 2068: { T: 1 }, 2069: { T: -1 }, 2070: {}, 2071: {}, 2072: { T: 1 }, 2073: { T: -1 }, 2075: {}, 2076: {}, 2077: { T: 1 }, 2078: { T: -1 }, 2079: {}, 2080: { T: 1 }, 2081: { T: -1 }, 2082: {}, 2083: { T: 1 }, 2084: { T: -1 }, 2085: { T: 1 }, 2086: { T: -1 }, 2087: { T: 1 }, 2088: { T: -1 }, 2089: { T: 1 }, 2090: { T: -1 }, 2091: {}, 2092: {}, 2093: { T: 1 }, 2094: { T: -1 }, 2095: {}, 2096: { T: 1 }, 2097: { T: -1 }, 2098: { T: 1 }, 2099: { T: -1 }, 2100: { T: 1 }, 2101: { T: -1 }, 2102: {}, 2103: { T: 1 }, 2104: { T: -1 }, 2105: {}, 2106: { T: 1 }, 2107: { T: -1 }, 2108: {}, 2109: { T: 1 }, 2110: { T: -1 }, 2111: { T: 1 }, 2112: { T: -1 }, 2113: { T: 1 }, 2114: { T: -1 }, 2115: {}, 2116: {}, 2117: {}, 2118: { T: 1 }, 2119: { T: -1 }, 2120: {}, 2121: { T: 1 }, 2122: { T: -1 }, 2123: { T: 1 }, 2124: { T: -1 }, 2125: {}, 2126: { T: 1 }, 2127: { T: -1 }, 2128: {}, 2129: { T: 1 }, 2130: { T: -1 }, 2131: { T: 1 }, 2132: { T: -1 }, 2133: { T: 1 }, 2134: {}, 2135: {}, 2136: {}, 2137: { T: 1 }, 2138: { T: -1 }, 2139: { T: 1 }, 2140: { T: -1 }, 2141: {}, 3072: {}, 3073: {}, 4096: { T: 1 }, 4097: { T: -1 }, 5002: { T: 1 }, 5003: { T: -1 }, 5081: { T: 1 }, 5082: { T: -1 }, 5083: {}, 5084: { T: 1 }, 5085: { T: -1 }, 5086: { T: 1 }, 5087: { T: -1 }, 5088: {}, 5089: {}, 5090: {}, 5092: { T: 1 }, 5093: { T: -1 }, 5094: {}, 5095: { T: 1 }, 5096: { T: -1 }, 5097: {}, 5099: {}, 65535: { n: "" } }; XLSRecordEnum = { 6: { f: parse_Formula }, 10: { f: parsenoop2 }, 12: { f: parseuint16 }, 13: { f: parseuint16 }, 14: { f: parsebool }, 15: { f: parsebool }, 16: { f: parse_Xnum }, 17: { f: parsebool }, 18: { f: parsebool }, 19: { f: parseuint16 }, 20: { f: parse_XLHeaderFooter }, 21: { f: parse_XLHeaderFooter }, 23: { f: parse_ExternSheet }, 24: { f: parse_Lbl }, 25: { f: parsebool }, 26: {}, 27: {}, 28: { f: parse_Note }, 29: {}, 34: { f: parsebool }, 35: { f: parse_ExternName }, 38: { f: parse_Xnum }, 39: { f: parse_Xnum }, 40: { f: parse_Xnum }, 41: { f: parse_Xnum }, 42: { f: parsebool }, 43: { f: parsebool }, 47: { f: parse_FilePass }, 49: { f: parse_Font }, 51: { f: parseuint16 }, 60: {}, 61: { f: parse_Window1 }, 64: { f: parsebool }, 65: { f: parse_Pane }, 66: { f: parseuint16 }, 77: {}, 80: {}, 81: {}, 82: {}, 85: { f: parseuint16 }, 89: {}, 90: {}, 91: {}, 92: { f: parse_WriteAccess }, 93: { f: parse_Obj }, 94: {}, 95: { f: parsebool }, 96: {}, 97: {}, 99: { f: parsebool }, 125: { f: parse_ColInfo }, 128: { f: parse_Guts }, 129: { f: parse_WsBool }, 130: { f: parseuint16 }, 131: { f: parsebool }, 132: { f: parsebool }, 133: { f: parse_BoundSheet8 }, 134: {}, 140: { f: parse_Country }, 141: { f: parseuint16 }, 144: {}, 146: { f: parse_Palette }, 151: {}, 152: {}, 153: {}, 154: {}, 155: {}, 156: { f: parseuint16 }, 157: {}, 158: {}, 160: { f: parse_Scl }, 161: { f: parse_Setup }, 174: {}, 175: {}, 176: {}, 177: {}, 178: {}, 180: {}, 181: {}, 182: {}, 184: {}, 185: {}, 189: { f: parse_MulRk }, 190: { f: parse_MulBlank }, 193: { f: parsenoop2 }, 197: {}, 198: {}, 199: {}, 200: {}, 201: {}, 202: { f: parsebool }, 203: {}, 204: {}, 205: {}, 206: {}, 207: {}, 208: {}, 209: {}, 210: {}, 211: {}, 213: {}, 215: {}, 216: {}, 217: {}, 218: { f: parseuint16 }, 220: {}, 221: { f: parsebool }, 222: {}, 224: { f: parse_XF }, 225: { f: parse_InterfaceHdr }, 226: { f: parsenoop2 }, 227: {}, 229: { f: parse_MergeCells }, 233: {}, 235: {}, 236: {}, 237: {}, 239: {}, 240: {}, 241: {}, 242: {}, 244: {}, 245: {}, 246: {}, 247: {}, 248: {}, 249: {}, 251: {}, 252: { f: parse_SST }, 253: { f: parse_LabelSst }, 255: { f: parse_ExtSST }, 256: {}, 259: {}, 290: {}, 311: {}, 312: {}, 315: {}, 317: { f: parseuint16a }, 318: {}, 319: {}, 320: {}, 330: {}, 331: {}, 333: {}, 334: {}, 335: {}, 336: {}, 337: {}, 338: {}, 339: {}, 340: {}, 351: {}, 352: { f: parsebool }, 353: { f: parsenoop2 }, 401: {}, 402: {}, 403: {}, 404: {}, 405: {}, 406: {}, 407: {}, 408: {}, 425: {}, 426: {}, 427: {}, 428: {}, 429: {}, 430: { f: parse_SupBook }, 431: { f: parsebool }, 432: {}, 433: {}, 434: {}, 437: {}, 438: { f: parse_TxO }, 439: { f: parsebool }, 440: { f: parse_HLink }, 441: {}, 442: { f: parse_XLUnicodeString }, 443: {}, 444: { f: parseuint16 }, 445: {}, 446: {}, 448: { f: parsenoop2 }, 449: { f: parse_RecalcId, r: 2 }, 450: { f: parsenoop2 }, 512: { f: parse_Dimensions }, 513: { f: parse_Blank }, 515: { f: parse_Number }, 516: { f: parse_Label }, 517: { f: parse_BoolErr }, 519: { f: parse_String }, 520: { f: parse_Row }, 523: {}, 545: { f: parse_Array }, 549: { f: parse_DefaultRowHeight }, 566: {}, 574: { f: parse_Window2 }, 638: { f: parse_RK }, 659: {}, 1048: {}, 1054: { f: parse_Format }, 1084: {}, 1212: { f: parse_ShrFmla }, 2048: { f: parse_HLinkTooltip }, 2049: {}, 2050: {}, 2051: {}, 2052: {}, 2053: {}, 2054: {}, 2055: {}, 2056: {}, 2057: { f: parse_BOF }, 2058: {}, 2059: {}, 2060: {}, 2061: {}, 2062: {}, 2063: {}, 2064: {}, 2066: {}, 2067: {}, 2128: {}, 2129: {}, 2130: {}, 2131: {}, 2132: {}, 2133: {}, 2134: {}, 2135: {}, 2136: {}, 2137: {}, 2138: {}, 2146: {}, 2147: { r: 12 }, 2148: {}, 2149: {}, 2150: {}, 2151: { f: parsenoop2 }, 2152: {}, 2154: {}, 2155: {}, 2156: {}, 2161: {}, 2162: {}, 2164: {}, 2165: {}, 2166: {}, 2167: {}, 2168: {}, 2169: {}, 2170: {}, 2171: {}, 2172: { f: parse_XFCRC, r: 12 }, 2173: { f: parse_XFExt, r: 12 }, 2174: {}, 2175: {}, 2180: {}, 2181: {}, 2182: {}, 2183: {}, 2184: {}, 2185: {}, 2186: {}, 2187: {}, 2188: { f: parsebool, r: 12 }, 2189: {}, 2190: { r: 12 }, 2191: {}, 2192: {}, 2194: {}, 2195: {}, 2196: { f: parse_NameCmt, r: 12 }, 2197: {}, 2198: { f: parse_Theme, r: 12 }, 2199: {}, 2200: {}, 2201: {}, 2202: { f: parse_MTRSettings, r: 12 }, 2203: { f: parsenoop2 }, 2204: {}, 2205: {}, 2206: {}, 2207: {}, 2211: { f: parse_ForceFullCalculation }, 2212: {}, 2213: {}, 2214: {}, 2215: {}, 4097: {}, 4098: {}, 4099: {}, 4102: {}, 4103: {}, 4105: {}, 4106: {}, 4107: {}, 4108: {}, 4109: {}, 4116: {}, 4117: {}, 4118: {}, 4119: {}, 4120: {}, 4121: {}, 4122: {}, 4123: {}, 4124: {}, 4125: {}, 4126: {}, 4127: {}, 4128: {}, 4129: {}, 4130: {}, 4132: {}, 4133: {}, 4134: { f: parseuint16 }, 4135: {}, 4146: {}, 4147: {}, 4148: {}, 4149: {}, 4154: {}, 4156: {}, 4157: {}, 4158: {}, 4159: {}, 4160: {}, 4161: {}, 4163: {}, 4164: { f: parse_ShtProps }, 4165: {}, 4166: {}, 4168: {}, 4170: {}, 4171: {}, 4174: {}, 4175: {}, 4176: {}, 4177: {}, 4187: {}, 4188: { f: parse_ClrtClient }, 4189: {}, 4191: {}, 4192: {}, 4193: {}, 4194: {}, 4195: {}, 4196: {}, 4197: {}, 4198: {}, 4199: {}, 4200: {}, 0: { f: parse_Dimensions }, 1: {}, 2: { f: parse_BIFF2INT }, 3: { f: parse_BIFF2NUM }, 4: { f: parse_BIFF2STR }, 5: { f: parse_BIFF2BOOLERR }, 7: { f: parse_BIFF2STRING }, 8: {}, 9: { f: parse_BOF }, 11: {}, 22: { f: parseuint16 }, 30: { f: parse_BIFF2Format }, 31: {}, 32: {}, 33: { f: parse_Array }, 36: {}, 37: { f: parse_DefaultRowHeight }, 50: { f: parse_BIFF2FONTXTRA }, 62: {}, 52: {}, 67: { f: parse_BIFF2XF }, 68: { f: parseuint16 }, 69: {}, 86: {}, 126: {}, 127: { f: parse_ImData }, 135: {}, 136: {}, 137: {}, 143: { f: parse_BIFF4SheetInfo }, 145: {}, 148: {}, 149: {}, 150: {}, 169: {}, 171: {}, 188: {}, 191: {}, 192: {}, 194: {}, 195: {}, 214: { f: parse_RString }, 223: {}, 234: {}, 354: {}, 421: {}, 518: { f: parse_Formula }, 521: { f: parse_BOF }, 536: { f: parse_Lbl }, 547: { f: parse_ExternName }, 561: {}, 579: { f: parse_BIFF3XF }, 1030: { f: parse_Formula }, 1033: { f: parse_BOF }, 1091: { f: parse_BIFF4XF }, 2157: {}, 2163: {}, 2177: {}, 2240: {}, 2241: {}, 2242: {}, 2243: {}, 2244: {}, 2245: {}, 2246: {}, 2247: {}, 2248: {}, 2249: {}, 2250: {}, 2251: {}, 2262: { r: 12 }, 101: {}, 102: {}, 105: {}, 106: {}, 107: {}, 109: {}, 112: {}, 114: {}, 29282: {} }; b8oid = 1, b8ocnts = []; HTML_BEGIN = "SheetJS Table Export"; HTML_END = ""; write_styles_ods = /* @__PURE__ */ (function() { var master_styles = [ "", "", "", "", "", "", "", "" ].join(""); var payload = "" + master_styles + ""; return function wso() { return XML_HEADER + payload; }; })(); write_content_ods = /* @__PURE__ */ (function() { var write_text_p = function(text$2, span) { return escapexml(text$2).replace(/ +/g, function($$) { return ""; }).replace(/\t/g, "").replace(/\n/g, span ? "" : "").replace(/^ /, "").replace(/ $/, ""); }; var null_cell_xml = " \n"; var write_ws = function(ws, wb, i$7, opts, nfs, date1904) { var o$10 = []; o$10.push(" \n"); var R$1 = 0, C$2 = 0, range = decode_range(ws["!ref"] || "A1"); var marr = ws["!merges"] || [], mi = 0; var dense = ws["!data"] != null; if (ws["!cols"]) { for (C$2 = 0; C$2 <= range.e.c; ++C$2) o$10.push(" \n"); } var H$1 = "", ROWS = ws["!rows"] || []; for (R$1 = 0; R$1 < range.s.r; ++R$1) { H$1 = ROWS[R$1] ? " table:style-name=\"ro" + ROWS[R$1].ods + "\"" : ""; o$10.push(" \n"); } for (; R$1 <= range.e.r; ++R$1) { H$1 = ROWS[R$1] ? " table:style-name=\"ro" + ROWS[R$1].ods + "\"" : ""; o$10.push(" \n"); for (C$2 = 0; C$2 < range.s.c; ++C$2) o$10.push(null_cell_xml); for (; C$2 <= range.e.c; ++C$2) { var skip = false, ct = {}, textp = ""; for (mi = 0; mi != marr.length; ++mi) { if (marr[mi].s.c > C$2) continue; if (marr[mi].s.r > R$1) continue; if (marr[mi].e.c < C$2) continue; if (marr[mi].e.r < R$1) continue; if (marr[mi].s.c != C$2 || marr[mi].s.r != R$1) skip = true; ct["table:number-columns-spanned"] = marr[mi].e.c - marr[mi].s.c + 1; ct["table:number-rows-spanned"] = marr[mi].e.r - marr[mi].s.r + 1; break; } if (skip) { o$10.push(" \n"); continue; } var ref = encode_cell({ r: R$1, c: C$2 }), cell = dense ? (ws["!data"][R$1] || [])[C$2] : ws[ref]; if (cell && cell.f) { ct["table:formula"] = escapexml(csf_to_ods_formula(cell.f)); if (cell.F) { if (cell.F.slice(0, ref.length) == ref) { var _Fref = decode_range(cell.F); ct["table:number-matrix-columns-spanned"] = _Fref.e.c - _Fref.s.c + 1; ct["table:number-matrix-rows-spanned"] = _Fref.e.r - _Fref.s.r + 1; } } } if (!cell) { o$10.push(null_cell_xml); continue; } switch (cell.t) { case "b": textp = cell.v ? "TRUE" : "FALSE"; ct["office:value-type"] = "boolean"; ct["office:boolean-value"] = cell.v ? "true" : "false"; break; case "n": if (!isFinite(cell.v)) { if (isNaN(cell.v)) { textp = "#NUM!"; ct["table:formula"] = "of:=#NUM!"; } else { textp = "#DIV/0!"; ct["table:formula"] = "of:=" + (cell.v < 0 ? "-" : "") + "1/0"; } ct["office:string-value"] = ""; ct["office:value-type"] = "string"; ct["calcext:value-type"] = "error"; } else { textp = cell.w || String(cell.v || 0); ct["office:value-type"] = "float"; ct["office:value"] = cell.v || 0; } break; case "s": case "str": textp = cell.v == null ? "" : cell.v; ct["office:value-type"] = "string"; break; case "d": textp = cell.w || parseDate(cell.v, date1904).toISOString(); ct["office:value-type"] = "date"; ct["office:date-value"] = parseDate(cell.v, date1904).toISOString(); ct["table:style-name"] = "ce1"; break; default: o$10.push(null_cell_xml); continue; } var text_p = write_text_p(textp); if (cell.l && cell.l.Target) { var _tgt = cell.l.Target; _tgt = _tgt.charAt(0) == "#" ? "#" + csf_to_ods_3D(_tgt.slice(1)) : _tgt; if (_tgt.charAt(0) != "#" && !_tgt.match(/^\w+:/)) _tgt = "../" + _tgt; text_p = writextag("text:a", text_p, { "xlink:href": _tgt.replace(/&/g, "&") }); } if (nfs[cell.z]) ct["table:style-name"] = "ce" + nfs[cell.z].slice(1); var payload = writextag("text:p", text_p, {}); if (cell.c) { var acreator = "", apayload = "", aprops = {}; for (var ci = 0; ci < cell.c.length; ++ci) { if (!acreator && cell.c[ci].a) acreator = cell.c[ci].a; apayload += "" + write_text_p(cell.c[ci].t) + ""; } if (!cell.c.hidden) aprops["office:display"] = true; payload = writextag("office:annotation", apayload, aprops) + payload; } o$10.push(" " + writextag("table:table-cell", payload, ct) + "\n"); } o$10.push(" \n"); } if ((wb.Workbook || {}).Names) o$10.push(write_names_ods(wb.Workbook.Names, wb.SheetNames, i$7)); o$10.push(" \n"); return o$10.join(""); }; var write_automatic_styles_ods = function(o$10, wb) { o$10.push(" \n"); var cidx = 0; wb.SheetNames.map(function(n$9) { return wb.Sheets[n$9]; }).forEach(function(ws) { if (!ws) return; if (ws["!cols"]) { for (var C$2 = 0; C$2 < ws["!cols"].length; ++C$2) if (ws["!cols"][C$2]) { var colobj = ws["!cols"][C$2]; if (colobj.width == null && colobj.wpx == null && colobj.wch == null) continue; process_col(colobj); colobj.ods = cidx; var w$2 = ws["!cols"][C$2].wpx + "px"; o$10.push(" \n"); o$10.push(" \n"); o$10.push(" \n"); ++cidx; } } }); var ridx = 0; wb.SheetNames.map(function(n$9) { return wb.Sheets[n$9]; }).forEach(function(ws) { if (!ws) return; if (ws["!rows"]) { for (var R$1 = 0; R$1 < ws["!rows"].length; ++R$1) if (ws["!rows"][R$1]) { ws["!rows"][R$1].ods = ridx; var h$5 = ws["!rows"][R$1].hpx + "px"; o$10.push(" \n"); o$10.push(" \n"); o$10.push(" \n"); ++ridx; } } }); o$10.push(" \n"); o$10.push(" \n"); o$10.push(" \n"); o$10.push(" \n"); o$10.push(" \n"); o$10.push(" /\n"); o$10.push(" \n"); o$10.push(" /\n"); o$10.push(" \n"); o$10.push(" \n"); var nfs = {}; var nfi = 69; wb.SheetNames.map(function(n$9) { return wb.Sheets[n$9]; }).forEach(function(ws) { if (!ws) return; var dense = ws["!data"] != null; if (!ws["!ref"]) return; var range = decode_range(ws["!ref"]); for (var R$1 = 0; R$1 <= range.e.r; ++R$1) for (var C$2 = 0; C$2 <= range.e.c; ++C$2) { var c$7 = dense ? (ws["!data"][R$1] || [])[C$2] : ws[encode_cell({ r: R$1, c: C$2 })]; if (!c$7 || !c$7.z || c$7.z.toLowerCase() == "general") continue; if (!nfs[c$7.z]) { var out = write_number_format_ods(c$7.z, "N" + nfi); if (out) { nfs[c$7.z] = "N" + nfi; ++nfi; o$10.push(out + "\n"); } } } }); o$10.push(" \n"); keys(nfs).forEach(function(nf) { o$10.push("\n"); }); o$10.push(" \n"); return nfs; }; return function wcx(wb, opts) { var o$10 = [XML_HEADER]; var attr = wxt_helper({ "xmlns:office": "urn:oasis:names:tc:opendocument:xmlns:office:1.0", "xmlns:table": "urn:oasis:names:tc:opendocument:xmlns:table:1.0", "xmlns:style": "urn:oasis:names:tc:opendocument:xmlns:style:1.0", "xmlns:text": "urn:oasis:names:tc:opendocument:xmlns:text:1.0", "xmlns:draw": "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0", "xmlns:fo": "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0", "xmlns:xlink": "http://www.w3.org/1999/xlink", "xmlns:dc": "http://purl.org/dc/elements/1.1/", "xmlns:meta": "urn:oasis:names:tc:opendocument:xmlns:meta:1.0", "xmlns:number": "urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0", "xmlns:presentation": "urn:oasis:names:tc:opendocument:xmlns:presentation:1.0", "xmlns:svg": "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0", "xmlns:chart": "urn:oasis:names:tc:opendocument:xmlns:chart:1.0", "xmlns:dr3d": "urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0", "xmlns:math": "http://www.w3.org/1998/Math/MathML", "xmlns:form": "urn:oasis:names:tc:opendocument:xmlns:form:1.0", "xmlns:script": "urn:oasis:names:tc:opendocument:xmlns:script:1.0", "xmlns:ooo": "http://openoffice.org/2004/office", "xmlns:ooow": "http://openoffice.org/2004/writer", "xmlns:oooc": "http://openoffice.org/2004/calc", "xmlns:dom": "http://www.w3.org/2001/xml-events", "xmlns:xforms": "http://www.w3.org/2002/xforms", "xmlns:xsd": "http://www.w3.org/2001/XMLSchema", "xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", "xmlns:sheet": "urn:oasis:names:tc:opendocument:sh33tjs:1.0", "xmlns:rpt": "http://openoffice.org/2005/report", "xmlns:of": "urn:oasis:names:tc:opendocument:xmlns:of:1.2", "xmlns:xhtml": "http://www.w3.org/1999/xhtml", "xmlns:grddl": "http://www.w3.org/2003/g/data-view#", "xmlns:tableooo": "http://openoffice.org/2009/table", "xmlns:drawooo": "http://openoffice.org/2010/draw", "xmlns:calcext": "urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0", "xmlns:loext": "urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0", "xmlns:field": "urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0", "xmlns:formx": "urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0", "xmlns:css3t": "http://www.w3.org/TR/css3-text/", "office:version": "1.2" }); var fods = wxt_helper({ "xmlns:config": "urn:oasis:names:tc:opendocument:xmlns:config:1.0", "office:mimetype": "application/vnd.oasis.opendocument.spreadsheet" }); if (opts.bookType == "fods") { o$10.push("\n"); o$10.push(write_meta_ods().replace(/]*?>/, "").replace(/<\/office:document-meta>/, "") + "\n"); } else o$10.push("\n"); var nfs = write_automatic_styles_ods(o$10, wb); o$10.push(" \n"); o$10.push(" \n"); if (((wb.Workbook || {}).WBProps || {}).date1904) o$10.push(" \n \n \n"); for (var i$7 = 0; i$7 != wb.SheetNames.length; ++i$7) o$10.push(write_ws(wb.Sheets[wb.SheetNames[i$7]], wb, i$7, opts, nfs, ((wb.Workbook || {}).WBProps || {}).date1904)); if ((wb.Workbook || {}).Names) o$10.push(write_names_ods(wb.Workbook.Names, wb.SheetNames, -1)); o$10.push(" \n"); o$10.push(" \n"); if (opts.bookType == "fods") o$10.push(""); else o$10.push(""); return o$10.join(""); }; })(); subarray = function() { try { if (typeof Uint8Array == "undefined") return "slice"; if (typeof Uint8Array.prototype.subarray == "undefined") return "slice"; if (typeof Buffer !== "undefined") { if (typeof Buffer.prototype.subarray == "undefined") return "slice"; if ((typeof Buffer.from == "function" ? Buffer.from([72, 62]) : new Buffer([72, 62])) instanceof Uint8Array) return "subarray"; return "slice"; } return "subarray"; } catch (e$10) { return "slice"; } }(); numbers_lut_new = function() { return { sst: [], rsst: [], ofmt: [], nfmt: [], fmla: [], ferr: [], cmnt: [] }; }; USE_WIDE_ROWS = true; qreg = /"/g; utils$1 = { encode_col, encode_row, encode_cell, encode_range, decode_col, decode_row, split_cell, decode_cell, decode_range, format_cell, sheet_new, sheet_add_aoa, sheet_add_json, sheet_add_dom, aoa_to_sheet, json_to_sheet, table_to_sheet: parse_dom_table, table_to_book, sheet_to_csv, sheet_to_txt, sheet_to_json, sheet_to_html, sheet_to_formulae, sheet_to_row_object_array: sheet_to_json, sheet_get_cell: ws_get_cell_stub, book_new, book_append_sheet, book_set_sheet_visibility, cell_set_number_format, cell_set_hyperlink, cell_set_internal_link, cell_add_comment, sheet_set_array_formula, consts: { SHEET_VISIBLE: 0, SHEET_HIDDEN: 1, SHEET_VERY_HIDDEN: 2 } }; ; __stream = { to_json: write_json_stream, to_html: write_html_stream, to_csv: write_csv_stream, to_xlml: write_xlml_stream, set_readable }; version$3 = XLSX.version; xlsx_default = { parse_xlscfb, parse_zip, read: readSync, readFile: readFileSync, readFileSync, write: writeSync, writeFile: writeFileSync, writeFileSync, writeFileAsync, writeXLSX: writeSyncXLSX, writeFileXLSX: writeFileSyncXLSX, utils: utils$1, set_fs, set_cptable, stream: __stream, SSF, CFB }; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/utils/attachment-utils.js /** * Load an attachment from various sources * @param source - URL string, File, Blob, or ArrayBuffer * @param fileName - Optional filename override * @returns Promise * @throws Error if loading fails */ async function loadAttachment(source$4, fileName) { let arrayBuffer; let detectedFileName = fileName || "unnamed"; let mimeType = "application/octet-stream"; let size = 0; if (typeof source$4 === "string") { const response = await fetch(source$4); if (!response.ok) { throw new Error(i18n("Failed to fetch file")); } arrayBuffer = await response.arrayBuffer(); size = arrayBuffer.byteLength; mimeType = response.headers.get("content-type") || mimeType; if (!fileName) { const urlParts = source$4.split("/"); detectedFileName = urlParts[urlParts.length - 1] || "document"; } } else if (source$4 instanceof File) { arrayBuffer = await source$4.arrayBuffer(); size = source$4.size; mimeType = source$4.type || mimeType; detectedFileName = fileName || source$4.name; } else if (source$4 instanceof Blob) { arrayBuffer = await source$4.arrayBuffer(); size = source$4.size; mimeType = source$4.type || mimeType; } else if (source$4 instanceof ArrayBuffer) { arrayBuffer = source$4; size = source$4.byteLength; } else { throw new Error(i18n("Invalid source type")); } const uint8Array = new Uint8Array(arrayBuffer); let binary = ""; const chunkSize = 32768; for (let i$7 = 0; i$7 < uint8Array.length; i$7 += chunkSize) { const chunk = uint8Array.slice(i$7, i$7 + chunkSize); binary += String.fromCharCode(...chunk); } const base64Content = btoa(binary); const id = `${detectedFileName}_${Date.now()}_${Math.random()}`; if (mimeType === "application/pdf" || detectedFileName.toLowerCase().endsWith(".pdf")) { const { extractedText, preview } = await processPdf(arrayBuffer, detectedFileName); return { id, type: "document", fileName: detectedFileName, mimeType: "application/pdf", size, content: base64Content, extractedText, preview }; } if (mimeType === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" || detectedFileName.toLowerCase().endsWith(".docx")) { const { extractedText } = await processDocx(arrayBuffer, detectedFileName); return { id, type: "document", fileName: detectedFileName, mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document", size, content: base64Content, extractedText }; } if (mimeType === "application/vnd.openxmlformats-officedocument.presentationml.presentation" || detectedFileName.toLowerCase().endsWith(".pptx")) { const { extractedText } = await processPptx(arrayBuffer, detectedFileName); return { id, type: "document", fileName: detectedFileName, mimeType: "application/vnd.openxmlformats-officedocument.presentationml.presentation", size, content: base64Content, extractedText }; } const excelMimeTypes = ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.ms-excel"]; if (excelMimeTypes.includes(mimeType) || detectedFileName.toLowerCase().endsWith(".xlsx") || detectedFileName.toLowerCase().endsWith(".xls")) { const { extractedText } = await processExcel(arrayBuffer, detectedFileName); return { id, type: "document", fileName: detectedFileName, mimeType: mimeType.startsWith("application/vnd") ? mimeType : "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", size, content: base64Content, extractedText }; } if (mimeType.startsWith("image/")) { return { id, type: "image", fileName: detectedFileName, mimeType, size, content: base64Content, preview: base64Content }; } const textExtensions = [ ".txt", ".md", ".json", ".xml", ".html", ".css", ".js", ".ts", ".jsx", ".tsx", ".yml", ".yaml" ]; const isTextFile = mimeType.startsWith("text/") || textExtensions.some((ext) => detectedFileName.toLowerCase().endsWith(ext)); if (isTextFile) { const decoder = new TextDecoder(); const text$2 = decoder.decode(arrayBuffer); return { id, type: "document", fileName: detectedFileName, mimeType: mimeType.startsWith("text/") ? mimeType : "text/plain", size, content: base64Content, extractedText: text$2 }; } throw new Error(`Unsupported file type: ${mimeType}`); } async function processPdf(arrayBuffer, fileName) { let pdf = null; try { pdf = await getDocument({ data: arrayBuffer }).promise; let extractedText = ``; for (let i$7 = 1; i$7 <= pdf.numPages; i$7++) { const page = await pdf.getPage(i$7); const textContent = await page.getTextContent(); const pageText = textContent.items.map((item) => item.str).filter((str) => str.trim()).join(" "); extractedText += `\n\n${pageText}\n`; } extractedText += "\n"; const preview = await generatePdfPreview(pdf); return { extractedText, preview }; } catch (error$2) { console.error("Error processing PDF:", error$2); throw new Error(`Failed to process PDF: ${String(error$2)}`); } finally { if (pdf) { pdf.destroy(); } } } async function generatePdfPreview(pdf) { try { const page = await pdf.getPage(1); const viewport = page.getViewport({ scale: 1 }); const scale = Math.min(160 / viewport.width, 160 / viewport.height); const scaledViewport = page.getViewport({ scale }); const canvas = document.createElement("canvas"); const context = canvas.getContext("2d"); if (!context) { return undefined; } canvas.height = scaledViewport.height; canvas.width = scaledViewport.width; const renderContext = { canvasContext: context, viewport: scaledViewport, canvas }; await page.render(renderContext).promise; return canvas.toDataURL("image/png").split(",")[1]; } catch (error$2) { console.error("Error generating PDF preview:", error$2); return undefined; } } async function processDocx(arrayBuffer, fileName) { try { const wordDoc = await (0, import_docx_preview$2.parseAsync)(arrayBuffer); let extractedText = `\n\n`; const body = wordDoc.documentPart?.body; if (body?.children) { const texts = []; for (const element of body.children) { const text$2 = extractTextFromElement(element); if (text$2) { texts.push(text$2); } } extractedText += texts.join("\n"); } extractedText += `\n\n`; return { extractedText }; } catch (error$2) { console.error("Error processing DOCX:", error$2); throw new Error(`Failed to process DOCX: ${String(error$2)}`); } } function extractTextFromElement(element) { let text$2 = ""; const elementType = element.type?.toLowerCase() || ""; if (elementType === "paragraph" && element.children) { for (const child of element.children) { const childType = child.type?.toLowerCase() || ""; if (childType === "run" && child.children) { for (const textChild of child.children) { const textType = textChild.type?.toLowerCase() || ""; if (textType === "text") { text$2 += textChild.text || ""; } } } else if (childType === "text") { text$2 += child.text || ""; } } } else if (elementType === "table") { if (element.children) { const tableTexts = []; for (const row of element.children) { const rowType = row.type?.toLowerCase() || ""; if (rowType === "tablerow" && row.children) { const rowTexts = []; for (const cell of row.children) { const cellType = cell.type?.toLowerCase() || ""; if (cellType === "tablecell" && cell.children) { const cellTexts = []; for (const cellElement of cell.children) { const cellText = extractTextFromElement(cellElement); if (cellText) cellTexts.push(cellText); } if (cellTexts.length > 0) rowTexts.push(cellTexts.join(" ")); } } if (rowTexts.length > 0) tableTexts.push(rowTexts.join(" | ")); } } if (tableTexts.length > 0) { text$2 = "\n[Table]\n" + tableTexts.join("\n") + "\n[/Table]\n"; } } } else if (element.children && Array.isArray(element.children)) { const childTexts = []; for (const child of element.children) { const childText = extractTextFromElement(child); if (childText) childTexts.push(childText); } text$2 = childTexts.join(" "); } return text$2.trim(); } async function processPptx(arrayBuffer, fileName) { try { const zip = await import_jszip_min.default.loadAsync(arrayBuffer); let extractedText = ``; const slideFiles = Object.keys(zip.files).filter((name) => name.match(/ppt\/slides\/slide\d+\.xml$/)).sort((a$2, b$3) => { const numA = Number.parseInt(a$2.match(/slide(\d+)\.xml$/)?.[1] || "0", 10); const numB = Number.parseInt(b$3.match(/slide(\d+)\.xml$/)?.[1] || "0", 10); return numA - numB; }); for (let i$7 = 0; i$7 < slideFiles.length; i$7++) { const slideFile = zip.file(slideFiles[i$7]); if (slideFile) { const slideXml = await slideFile.async("text"); const textMatches = slideXml.match(/]*>([^<]+)<\/a:t>/g); if (textMatches) { extractedText += `\n`; const slideTexts = textMatches.map((match) => { const textMatch = match.match(/]*>([^<]+)<\/a:t>/); return textMatch ? textMatch[1] : ""; }).filter((t$6) => t$6.trim()); if (slideTexts.length > 0) { extractedText += "\n" + slideTexts.join("\n"); } extractedText += "\n"; } } } const notesFiles = Object.keys(zip.files).filter((name) => name.match(/ppt\/notesSlides\/notesSlide\d+\.xml$/)).sort((a$2, b$3) => { const numA = Number.parseInt(a$2.match(/notesSlide(\d+)\.xml$/)?.[1] || "0", 10); const numB = Number.parseInt(b$3.match(/notesSlide(\d+)\.xml$/)?.[1] || "0", 10); return numA - numB; }); if (notesFiles.length > 0) { extractedText += "\n"; for (const noteFile of notesFiles) { const file = zip.file(noteFile); if (file) { const noteXml = await file.async("text"); const textMatches = noteXml.match(/]*>([^<]+)<\/a:t>/g); if (textMatches) { const noteTexts = textMatches.map((match) => { const textMatch = match.match(/]*>([^<]+)<\/a:t>/); return textMatch ? textMatch[1] : ""; }).filter((t$6) => t$6.trim()); if (noteTexts.length > 0) { const slideNum = noteFile.match(/notesSlide(\d+)\.xml$/)?.[1]; extractedText += `\n[Slide ${slideNum} notes]: ${noteTexts.join(" ")}`; } } } } extractedText += "\n"; } extractedText += "\n"; return { extractedText }; } catch (error$2) { console.error("Error processing PPTX:", error$2); throw new Error(`Failed to process PPTX: ${String(error$2)}`); } } async function processExcel(arrayBuffer, fileName) { try { const workbook = readSync(arrayBuffer, { type: "array" }); let extractedText = ``; for (const [index, sheetName] of workbook.SheetNames.entries()) { const worksheet = workbook.Sheets[sheetName]; const csvText = utils$1.sheet_to_csv(worksheet); extractedText += `\n\n${csvText}\n`; } extractedText += "\n"; return { extractedText }; } catch (error$2) { console.error("Error processing Excel:", error$2); throw new Error(`Failed to process Excel: ${String(error$2)}`); } } var import_docx_preview$2, import_jszip_min; var init_attachment_utils = __esmMin((() => { import_docx_preview$2 = require_docx_preview(); import_jszip_min = /* @__PURE__ */ __toESM(require_jszip_min(), 1); init_pdf(); init_xlsx(); init_i18n(); GlobalWorkerOptions.workerSrc = new URL("pdfjs-dist/build/pdf.worker.min.mjs", import.meta.url).toString(); })); //#endregion //#region node_modules/lit/html.js var init_html = __esmMin((() => { init_lit_html(); })); //#endregion //#region node_modules/@mariozechner/mini-lit/dist/ModeToggle.js var __decorate$26, ModeToggle; var init_ModeToggle = __esmMin((() => { init_lit(); init_decorators(); init_i18n$1(); __decorate$26 = void 0 && (void 0).__decorate || function(decorators, target, key, desc) { var c$7 = arguments.length, r$10 = c$7 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d$5; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r$10 = Reflect.decorate(decorators, target, key, desc); else for (var i$7 = decorators.length - 1; i$7 >= 0; i$7--) if (d$5 = decorators[i$7]) r$10 = (c$7 < 3 ? d$5(r$10) : c$7 > 3 ? d$5(target, key, r$10) : d$5(target, key)) || r$10; return c$7 > 3 && r$10 && Object.defineProperty(target, key, r$10), r$10; }; ModeToggle = class ModeToggle$1 extends i { constructor() { super(...arguments); this.modes = [i18n("Mode 1"), i18n("Mode 2")]; this.selectedIndex = 0; } createRenderRoot() { return this; } setMode(index) { if (this.selectedIndex !== index && index >= 0 && index < this.modes.length) { this.selectedIndex = index; this.dispatchEvent(new CustomEvent("mode-change", { detail: { index, mode: this.modes[index] }, bubbles: true })); } } render() { if (this.modes.length < 2) return x``; return x`
${this.modes.map((mode, index) => x` `)}
`; } }; __decorate$26([n$1({ type: Array })], ModeToggle.prototype, "modes", void 0); __decorate$26([n$1({ type: Number })], ModeToggle.prototype, "selectedIndex", void 0); ModeToggle = __decorate$26([t("mode-toggle")], ModeToggle); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/dialogs/AttachmentOverlay.js var import_docx_preview$1, __decorate$25, AttachmentOverlay; var init_AttachmentOverlay = __esmMin((() => { init_ModeToggle(); init_dist(); init_Button(); import_docx_preview$1 = require_docx_preview(); init_lit(); init_decorators(); init_lucide(); init_pdf(); init_xlsx(); init_i18n(); __decorate$25 = void 0 && (void 0).__decorate || function(decorators, target, key, desc) { var c$7 = arguments.length, r$10 = c$7 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d$5; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r$10 = Reflect.decorate(decorators, target, key, desc); else for (var i$7 = decorators.length - 1; i$7 >= 0; i$7--) if (d$5 = decorators[i$7]) r$10 = (c$7 < 3 ? d$5(r$10) : c$7 > 3 ? d$5(target, key, r$10) : d$5(target, key)) || r$10; return c$7 > 3 && r$10 && Object.defineProperty(target, key, r$10), r$10; }; AttachmentOverlay = class AttachmentOverlay extends i { constructor() { super(...arguments); this.showExtractedText = false; this.error = null; this.currentLoadingTask = null; this.handleBackdropClick = () => { this.close(); }; this.handleDownload = () => { if (!this.attachment) return; const byteCharacters = atob(this.attachment.content); const byteNumbers = new Array(byteCharacters.length); for (let i$7 = 0; i$7 < byteCharacters.length; i$7++) { byteNumbers[i$7] = byteCharacters.charCodeAt(i$7); } const byteArray = new Uint8Array(byteNumbers); const blob = new Blob([byteArray], { type: this.attachment.mimeType }); const url = URL.createObjectURL(blob); const a$2 = document.createElement("a"); a$2.href = url; a$2.download = this.attachment.fileName; document.body.appendChild(a$2); a$2.click(); document.body.removeChild(a$2); URL.revokeObjectURL(url); }; } createRenderRoot() { return this; } static open(attachment, onClose) { const overlay = new AttachmentOverlay(); overlay.attachment = attachment; overlay.onCloseCallback = onClose; document.body.appendChild(overlay); overlay.setupEventListeners(); } setupEventListeners() { this.boundHandleKeyDown = (e$10) => { if (e$10.key === "Escape") { this.close(); } }; window.addEventListener("keydown", this.boundHandleKeyDown); } close() { this.cleanup(); if (this.boundHandleKeyDown) { window.removeEventListener("keydown", this.boundHandleKeyDown); } this.onCloseCallback?.(); this.remove(); } getFileType() { if (!this.attachment) return "text"; if (this.attachment.type === "image") return "image"; if (this.attachment.mimeType === "application/pdf") return "pdf"; if (this.attachment.mimeType?.includes("wordprocessingml")) return "docx"; if (this.attachment.mimeType?.includes("presentationml") || this.attachment.fileName.toLowerCase().endsWith(".pptx")) return "pptx"; if (this.attachment.mimeType?.includes("spreadsheetml") || this.attachment.mimeType?.includes("ms-excel") || this.attachment.fileName.toLowerCase().endsWith(".xlsx") || this.attachment.fileName.toLowerCase().endsWith(".xls")) return "excel"; return "text"; } getFileTypeLabel() { const type = this.getFileType(); switch (type) { case "pdf": return i18n("PDF"); case "docx": return i18n("Document"); case "pptx": return i18n("Presentation"); case "excel": return i18n("Spreadsheet"); default: return ""; } } cleanup() { this.showExtractedText = false; this.error = null; if (this.currentLoadingTask) { this.currentLoadingTask.destroy(); this.currentLoadingTask = null; } } render() { if (!this.attachment) return x``; return x`
e$10.stopPropagation()}>
${this.attachment.fileName}
${this.renderToggle()} ${Button({ variant: "ghost", size: "icon", onClick: this.handleDownload, children: icon(Download, "sm"), className: "h-8 w-8" })} ${Button({ variant: "ghost", size: "icon", onClick: () => this.close(), children: icon(X, "sm"), className: "h-8 w-8" })}
e$10.stopPropagation()}> ${this.renderContent()}
`; } renderToggle() { if (!this.attachment) return x``; const fileType = this.getFileType(); const hasExtractedText = !!this.attachment.extractedText; const showToggle = fileType !== "image" && fileType !== "text" && fileType !== "pptx" && hasExtractedText; if (!showToggle) return x``; const fileTypeLabel = this.getFileTypeLabel(); return x` { e$10.stopPropagation(); this.showExtractedText = e$10.detail.index === 1; this.error = null; }} > `; } renderContent() { if (!this.attachment) return x``; if (this.error) { return x`
${i18n("Error loading file")}
${this.error}
`; } return this.renderFileContent(); } renderFileContent() { if (!this.attachment) return x``; const fileType = this.getFileType(); if (this.showExtractedText && fileType !== "image") { return x`
${this.attachment.extractedText || i18n("No text content available")}
`; } switch (fileType) { case "image": { const imageUrl = `data:${this.attachment.mimeType};base64,${this.attachment.content}`; return x` ${this.attachment.fileName} `; } case "pdf": return x`
`; case "docx": return x`
`; case "excel": return x`
`; case "pptx": return x`
`; default: return x`
${this.attachment.extractedText || i18n("No content available")}
`; } } async updated(changedProperties) { super.updated(changedProperties); if ((changedProperties.has("attachment") || changedProperties.has("showExtractedText")) && this.attachment && !this.showExtractedText && !this.error) { const fileType = this.getFileType(); switch (fileType) { case "pdf": await this.renderPdf(); break; case "docx": await this.renderDocx(); break; case "excel": await this.renderExcel(); break; case "pptx": await this.renderExtractedText(); break; } } } async renderPdf() { const container = this.querySelector("#pdf-container"); if (!container || !this.attachment) return; let pdf = null; try { const arrayBuffer = this.base64ToArrayBuffer(this.attachment.content); if (this.currentLoadingTask) { this.currentLoadingTask.destroy(); } this.currentLoadingTask = getDocument({ data: arrayBuffer }); pdf = await this.currentLoadingTask.promise; this.currentLoadingTask = null; container.innerHTML = ""; const wrapper = document.createElement("div"); wrapper.className = ""; container.appendChild(wrapper); for (let pageNum = 1; pageNum <= pdf.numPages; pageNum++) { const page = await pdf.getPage(pageNum); const pageContainer = document.createElement("div"); pageContainer.className = "mb-4 last:mb-0"; const canvas = document.createElement("canvas"); const context = canvas.getContext("2d"); const viewport = page.getViewport({ scale: 1.5 }); canvas.height = viewport.height; canvas.width = viewport.width; canvas.className = "w-full max-w-full h-auto block mx-auto bg-white rounded shadow-sm border border-border"; if (context) { context.fillStyle = "white"; context.fillRect(0, 0, canvas.width, canvas.height); } await page.render({ canvasContext: context, viewport, canvas }).promise; pageContainer.appendChild(canvas); if (pageNum < pdf.numPages) { const separator = document.createElement("div"); separator.className = "h-px bg-border my-4"; pageContainer.appendChild(separator); } wrapper.appendChild(pageContainer); } } catch (error$2) { console.error("Error rendering PDF:", error$2); this.error = error$2?.message || i18n("Failed to load PDF"); } finally { if (pdf) { pdf.destroy(); } } } async renderDocx() { const container = this.querySelector("#docx-container"); if (!container || !this.attachment) return; try { const arrayBuffer = this.base64ToArrayBuffer(this.attachment.content); container.innerHTML = ""; const wrapper = document.createElement("div"); wrapper.className = "docx-wrapper-custom"; container.appendChild(wrapper); await (0, import_docx_preview$1.renderAsync)(arrayBuffer, wrapper, undefined, { className: "docx", inWrapper: true, ignoreWidth: true, ignoreHeight: false, ignoreFonts: false, breakPages: true, ignoreLastRenderedPageBreak: true, experimental: false, trimXmlDeclaration: true, useBase64URL: false, renderHeaders: true, renderFooters: true, renderFootnotes: true, renderEndnotes: true }); const style = document.createElement("style"); style.textContent = ` #docx-container { padding: 0; } #docx-container .docx-wrapper-custom { max-width: 100%; overflow-x: auto; } #docx-container .docx-wrapper { max-width: 100% !important; margin: 0 !important; background: transparent !important; padding: 0em !important; } #docx-container .docx-wrapper > section.docx { box-shadow: none !important; border: none !important; border-radius: 0 !important; margin: 0 !important; padding: 2em !important; background: white !important; color: black !important; max-width: 100% !important; width: 100% !important; min-width: 0 !important; overflow-x: auto !important; } /* Fix tables and wide content */ #docx-container table { max-width: 100% !important; width: auto !important; overflow-x: auto !important; display: block !important; } #docx-container img { max-width: 100% !important; height: auto !important; } /* Fix paragraphs and text */ #docx-container p, #docx-container span, #docx-container div { max-width: 100% !important; word-wrap: break-word !important; overflow-wrap: break-word !important; } /* Hide page breaks in web view */ #docx-container .docx-page-break { display: none !important; } `; container.appendChild(style); } catch (error$2) { console.error("Error rendering DOCX:", error$2); this.error = error$2?.message || i18n("Failed to load document"); } } async renderExcel() { const container = this.querySelector("#excel-container"); if (!container || !this.attachment) return; try { const arrayBuffer = this.base64ToArrayBuffer(this.attachment.content); const workbook = readSync(arrayBuffer, { type: "array" }); container.innerHTML = ""; const wrapper = document.createElement("div"); wrapper.className = "overflow-auto h-full flex flex-col"; container.appendChild(wrapper); if (workbook.SheetNames.length > 1) { const tabContainer = document.createElement("div"); tabContainer.className = "flex gap-2 mb-4 border-b border-border sticky top-0 bg-card z-10"; const sheetContents = []; workbook.SheetNames.forEach((sheetName, index) => { const tab = document.createElement("button"); tab.textContent = sheetName; tab.className = index === 0 ? "px-4 py-2 text-sm font-medium border-b-2 border-primary text-primary" : "px-4 py-2 text-sm font-medium text-muted-foreground hover:text-foreground hover:border-b-2 hover:border-border transition-colors"; const sheetDiv = document.createElement("div"); sheetDiv.style.display = index === 0 ? "flex" : "none"; sheetDiv.className = "flex-1 overflow-auto"; sheetDiv.appendChild(this.renderExcelSheet(workbook.Sheets[sheetName], sheetName)); sheetContents.push(sheetDiv); tab.onclick = () => { tabContainer.querySelectorAll("button").forEach((btn, btnIndex) => { if (btnIndex === index) { btn.className = "px-4 py-2 text-sm font-medium border-b-2 border-primary text-primary"; } else { btn.className = "px-4 py-2 text-sm font-medium text-muted-foreground hover:text-foreground hover:border-b-2 hover:border-border transition-colors"; } }); sheetContents.forEach((content, contentIndex) => { content.style.display = contentIndex === index ? "flex" : "none"; }); }; tabContainer.appendChild(tab); }); wrapper.appendChild(tabContainer); sheetContents.forEach((content) => { wrapper.appendChild(content); }); } else { const sheetName = workbook.SheetNames[0]; wrapper.appendChild(this.renderExcelSheet(workbook.Sheets[sheetName], sheetName)); } } catch (error$2) { console.error("Error rendering Excel:", error$2); this.error = error$2?.message || i18n("Failed to load spreadsheet"); } } renderExcelSheet(worksheet, sheetName) { const sheetDiv = document.createElement("div"); const htmlTable = utils$1.sheet_to_html(worksheet, { id: `sheet-${sheetName}` }); const tempDiv = document.createElement("div"); tempDiv.innerHTML = htmlTable; const table = tempDiv.querySelector("table"); if (table) { table.className = "w-full border-collapse text-foreground"; table.querySelectorAll("td, th").forEach((cell) => { const cellEl = cell; cellEl.className = "border border-border px-3 py-2 text-sm text-left"; }); const headerCells = table.querySelectorAll("thead th, tr:first-child td"); if (headerCells.length > 0) { headerCells.forEach((th) => { const thEl = th; thEl.className = "border border-border px-3 py-2 text-sm font-semibold bg-muted text-foreground sticky top-0"; }); } table.querySelectorAll("tbody tr:nth-child(even)").forEach((row) => { const rowEl = row; rowEl.className = "bg-muted/30"; }); sheetDiv.appendChild(table); } return sheetDiv; } base64ToArrayBuffer(base64) { const binaryString = atob(base64); const bytes = new Uint8Array(binaryString.length); for (let i$7 = 0; i$7 < binaryString.length; i$7++) { bytes[i$7] = binaryString.charCodeAt(i$7); } return bytes.buffer; } async renderExtractedText() { const container = this.querySelector("#pptx-container"); if (!container || !this.attachment) return; try { container.innerHTML = ""; const wrapper = document.createElement("div"); wrapper.className = "p-6 overflow-auto"; const pre = document.createElement("pre"); pre.className = "whitespace-pre-wrap text-sm text-foreground font-mono"; pre.textContent = this.attachment.extractedText || i18n("No text content available"); wrapper.appendChild(pre); container.appendChild(wrapper); } catch (error$2) { console.error("Error rendering extracted text:", error$2); this.error = error$2?.message || i18n("Failed to display text content"); } } }; __decorate$25([r()], AttachmentOverlay.prototype, "attachment", void 0); __decorate$25([r()], AttachmentOverlay.prototype, "showExtractedText", void 0); __decorate$25([r()], AttachmentOverlay.prototype, "error", void 0); if (!customElements.get("attachment-overlay")) { customElements.define("attachment-overlay", AttachmentOverlay); } })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/components/AttachmentTile.js var __decorate$24, AttachmentTile; var init_AttachmentTile = __esmMin((() => { init_icons(); init_lit(); init_decorators(); init_html(); init_lucide(); init_AttachmentOverlay(); init_i18n(); __decorate$24 = void 0 && (void 0).__decorate || function(decorators, target, key, desc) { var c$7 = arguments.length, r$10 = c$7 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d$5; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r$10 = Reflect.decorate(decorators, target, key, desc); else for (var i$7 = decorators.length - 1; i$7 >= 0; i$7--) if (d$5 = decorators[i$7]) r$10 = (c$7 < 3 ? d$5(r$10) : c$7 > 3 ? d$5(target, key, r$10) : d$5(target, key)) || r$10; return c$7 > 3 && r$10 && Object.defineProperty(target, key, r$10), r$10; }; AttachmentTile = class AttachmentTile$1 extends i { constructor() { super(...arguments); this.showDelete = false; this.handleClick = () => { AttachmentOverlay.open(this.attachment); }; } createRenderRoot() { return this; } connectedCallback() { super.connectedCallback(); this.style.display = "block"; this.classList.add("max-h-16"); } render() { const hasPreview = !!this.attachment.preview; const isImage$1 = this.attachment.type === "image"; const isPdf = this.attachment.mimeType === "application/pdf"; const isDocx = this.attachment.mimeType?.includes("wordprocessingml") || this.attachment.fileName.toLowerCase().endsWith(".docx"); const isPptx = this.attachment.mimeType?.includes("presentationml") || this.attachment.fileName.toLowerCase().endsWith(".pptx"); const isExcel = this.attachment.mimeType?.includes("spreadsheetml") || this.attachment.fileName.toLowerCase().endsWith(".xlsx") || this.attachment.fileName.toLowerCase().endsWith(".xls"); const getDocumentIcon = () => { if (isExcel) return icon(FileSpreadsheet, "md"); return icon(FileText, "md"); }; return x`
${hasPreview ? x`
${this.attachment.fileName} ${isPdf ? x`
${i18n("PDF")}
` : ""}
` : x`
${getDocumentIcon()}
${this.attachment.fileName.length > 10 ? this.attachment.fileName.substring(0, 8) + "..." : this.attachment.fileName}
`} ${this.showDelete ? x` ` : ""}
`; } }; __decorate$24([n$1({ type: Object })], AttachmentTile.prototype, "attachment", void 0); __decorate$24([n$1({ type: Boolean })], AttachmentTile.prototype, "showDelete", void 0); __decorate$24([n$1()], AttachmentTile.prototype, "onDelete", void 0); AttachmentTile = __decorate$24([t("attachment-tile")], AttachmentTile); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/components/MessageEditor.js var __decorate$23, MessageEditor; var init_MessageEditor = __esmMin((() => { init_dist(); init_Button(); init_Select(); init_lit(); init_decorators(); init_ref$2(); init_lucide(); init_attachment_utils(); init_i18n(); init_AttachmentTile(); __decorate$23 = void 0 && (void 0).__decorate || function(decorators, target, key, desc) { var c$7 = arguments.length, r$10 = c$7 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d$5; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r$10 = Reflect.decorate(decorators, target, key, desc); else for (var i$7 = decorators.length - 1; i$7 >= 0; i$7--) if (d$5 = decorators[i$7]) r$10 = (c$7 < 3 ? d$5(r$10) : c$7 > 3 ? d$5(target, key, r$10) : d$5(target, key)) || r$10; return c$7 > 3 && r$10 && Object.defineProperty(target, key, r$10), r$10; }; MessageEditor = class MessageEditor$1 extends i { constructor() { super(...arguments); this._value = ""; this.textareaRef = e(); this.isStreaming = false; this.thinkingLevel = "off"; this.showAttachmentButton = true; this.showModelSelector = true; this.showThinkingSelector = true; this.attachments = []; this.maxFiles = 10; this.maxFileSize = 20 * 1024 * 1024; this.acceptedTypes = "image/*,application/pdf,.docx,.pptx,.xlsx,.xls,.txt,.md,.json,.xml,.html,.css,.js,.ts,.jsx,.tsx,.yml,.yaml"; this.processingFiles = false; this.isDragging = false; this.fileInputRef = e(); this.handleTextareaInput = (e$10) => { const textarea = e$10.target; this.value = textarea.value; this.onInput?.(this.value); }; this.handleKeyDown = (e$10) => { if (e$10.key === "Enter" && !e$10.shiftKey) { e$10.preventDefault(); if (!this.isStreaming && !this.processingFiles && (this.value.trim() || this.attachments.length > 0)) { this.handleSend(); } } else if (e$10.key === "Escape" && this.isStreaming) { e$10.preventDefault(); this.onAbort?.(); } }; this.handlePaste = async (e$10) => { const items = e$10.clipboardData?.items; if (!items) return; const imageFiles = []; for (let i$7 = 0; i$7 < items.length; i$7++) { const item = items[i$7]; if (item.type.startsWith("image/")) { const file = item.getAsFile(); if (file) { imageFiles.push(file); } } } if (imageFiles.length > 0) { e$10.preventDefault(); if (imageFiles.length + this.attachments.length > this.maxFiles) { alert(`Maximum ${this.maxFiles} files allowed`); return; } this.processingFiles = true; const newAttachments = []; for (const file of imageFiles) { try { if (file.size > this.maxFileSize) { alert(`Image exceeds maximum size of ${Math.round(this.maxFileSize / 1024 / 1024)}MB`); continue; } const attachment = await loadAttachment(file); newAttachments.push(attachment); } catch (error$2) { console.error("Error processing pasted image:", error$2); alert(`Failed to process pasted image: ${String(error$2)}`); } } this.attachments = [...this.attachments, ...newAttachments]; this.onFilesChange?.(this.attachments); this.processingFiles = false; } }; this.handleSend = () => { this.onSend?.(this.value, this.attachments); }; this.handleAttachmentClick = () => { this.fileInputRef.value?.click(); }; this.handleDragOver = (e$10) => { e$10.preventDefault(); e$10.stopPropagation(); if (!this.isDragging) { this.isDragging = true; } }; this.handleDragLeave = (e$10) => { e$10.preventDefault(); e$10.stopPropagation(); const rect = e$10.currentTarget.getBoundingClientRect(); const x$2 = e$10.clientX; const y$3 = e$10.clientY; if (x$2 <= rect.left || x$2 >= rect.right || y$3 <= rect.top || y$3 >= rect.bottom) { this.isDragging = false; } }; this.handleDrop = async (e$10) => { e$10.preventDefault(); e$10.stopPropagation(); this.isDragging = false; const files = Array.from(e$10.dataTransfer?.files || []); if (files.length === 0) return; if (files.length + this.attachments.length > this.maxFiles) { alert(`Maximum ${this.maxFiles} files allowed`); return; } this.processingFiles = true; const newAttachments = []; for (const file of files) { try { if (file.size > this.maxFileSize) { alert(`${file.name} exceeds maximum size of ${Math.round(this.maxFileSize / 1024 / 1024)}MB`); continue; } const attachment = await loadAttachment(file); newAttachments.push(attachment); } catch (error$2) { console.error(`Error processing ${file.name}:`, error$2); alert(`Failed to process ${file.name}: ${String(error$2)}`); } } this.attachments = [...this.attachments, ...newAttachments]; this.onFilesChange?.(this.attachments); this.processingFiles = false; }; } get value() { return this._value; } set value(val$1) { const oldValue = this._value; this._value = val$1; this.requestUpdate("value", oldValue); } createRenderRoot() { return this; } async handleFilesSelected(e$10) { const input = e$10.target; const files = Array.from(input.files || []); if (files.length === 0) return; if (files.length + this.attachments.length > this.maxFiles) { alert(`Maximum ${this.maxFiles} files allowed`); input.value = ""; return; } this.processingFiles = true; const newAttachments = []; for (const file of files) { try { if (file.size > this.maxFileSize) { alert(`${file.name} exceeds maximum size of ${Math.round(this.maxFileSize / 1024 / 1024)}MB`); continue; } const attachment = await loadAttachment(file); newAttachments.push(attachment); } catch (error$2) { console.error(`Error processing ${file.name}:`, error$2); alert(`Failed to process ${file.name}: ${String(error$2)}`); } } this.attachments = [...this.attachments, ...newAttachments]; this.onFilesChange?.(this.attachments); this.processingFiles = false; input.value = ""; } removeFile(fileId) { this.attachments = this.attachments.filter((f$4) => f$4.id !== fileId); this.onFilesChange?.(this.attachments); } firstUpdated() { const textarea = this.textareaRef.value; if (textarea) { textarea.focus(); } } render() { const model = this.currentModel; const supportsThinking = model?.reasoning === true; return x`
${this.isDragging ? x`
${i18n("Drop files here")}
` : ""} ${this.attachments.length > 0 ? x`
${this.attachments.map((attachment) => x` this.removeFile(attachment.id)} > `)}
` : ""}
${this.showAttachmentButton ? this.processingFiles ? x`
${icon(LoaderCircle, "sm", "animate-spin text-muted-foreground")}
` : x` ${Button({ variant: "ghost", size: "icon", className: "h-8 w-8", onClick: this.handleAttachmentClick, children: icon(Paperclip, "sm") })} ` : ""} ${supportsThinking && this.showThinkingSelector ? x` ${Select({ value: this.thinkingLevel, placeholder: i18n("Off"), options: [ { value: "off", label: i18n("Off"), icon: icon(Brain, "sm") }, { value: "minimal", label: i18n("Minimal"), icon: icon(Brain, "sm") }, { value: "low", label: i18n("Low"), icon: icon(Brain, "sm") }, { value: "medium", label: i18n("Medium"), icon: icon(Brain, "sm") }, { value: "high", label: i18n("High"), icon: icon(Brain, "sm") } ], onChange: (value) => { this.onThinkingChange?.(value); }, width: "80px", size: "sm", variant: "ghost", fitContent: true })} ` : ""}
${this.showModelSelector && this.currentModel ? x` ${Button({ variant: "ghost", size: "sm", onClick: () => { this.textareaRef.value?.focus(); requestAnimationFrame(() => { this.onModelSelect?.(); }); }, children: x` ${icon(Sparkles, "sm")} ${this.currentModel.id} `, className: "h-8 text-xs truncate" })} ` : ""} ${this.isStreaming ? x` ${Button({ variant: "ghost", size: "icon", onClick: this.onAbort, children: icon(Square, "sm"), className: "h-8 w-8" })} ` : x` ${Button({ variant: "ghost", size: "icon", onClick: this.handleSend, disabled: !this.value.trim() && this.attachments.length === 0 || this.processingFiles, children: x`
${icon(Send, "sm")}
`, className: "h-8 w-8" })} `}
`; } }; __decorate$23([n$1()], MessageEditor.prototype, "value", null); __decorate$23([n$1()], MessageEditor.prototype, "isStreaming", void 0); __decorate$23([n$1()], MessageEditor.prototype, "currentModel", void 0); __decorate$23([n$1()], MessageEditor.prototype, "thinkingLevel", void 0); __decorate$23([n$1()], MessageEditor.prototype, "showAttachmentButton", void 0); __decorate$23([n$1()], MessageEditor.prototype, "showModelSelector", void 0); __decorate$23([n$1()], MessageEditor.prototype, "showThinkingSelector", void 0); __decorate$23([n$1()], MessageEditor.prototype, "onInput", void 0); __decorate$23([n$1()], MessageEditor.prototype, "onSend", void 0); __decorate$23([n$1()], MessageEditor.prototype, "onAbort", void 0); __decorate$23([n$1()], MessageEditor.prototype, "onModelSelect", void 0); __decorate$23([n$1()], MessageEditor.prototype, "onThinkingChange", void 0); __decorate$23([n$1()], MessageEditor.prototype, "onFilesChange", void 0); __decorate$23([n$1()], MessageEditor.prototype, "attachments", void 0); __decorate$23([n$1()], MessageEditor.prototype, "maxFiles", void 0); __decorate$23([n$1()], MessageEditor.prototype, "maxFileSize", void 0); __decorate$23([n$1()], MessageEditor.prototype, "acceptedTypes", void 0); __decorate$23([r()], MessageEditor.prototype, "processingFiles", void 0); __decorate$23([r()], MessageEditor.prototype, "isDragging", void 0); MessageEditor = __decorate$23([t("message-editor")], MessageEditor); })); //#endregion //#region node_modules/lit-html/directives/repeat.js var u, c; var init_repeat$1 = __esmMin((() => { init_lit_html(); init_directive(); init_directive_helpers(); u = (e$10, s$5, t$6) => { const r$10 = new Map(); for (let l$3 = s$5; l$3 <= t$6; l$3++) r$10.set(e$10[l$3], l$3); return r$10; }, c = e$2(class extends i$2 { constructor(e$10) { if (super(e$10), e$10.type !== t$1.CHILD) throw Error("repeat() can only be used in text expressions"); } dt(e$10, s$5, t$6) { let r$10; void 0 === t$6 ? t$6 = s$5 : void 0 !== s$5 && (r$10 = s$5); const l$3 = [], o$10 = []; let i$7 = 0; for (const s$6 of e$10) l$3[i$7] = r$10 ? r$10(s$6, i$7) : i$7, o$10[i$7] = t$6(s$6, i$7), i$7++; return { values: o$10, keys: l$3 }; } render(e$10, s$5, t$6) { return this.dt(e$10, s$5, t$6).values; } update(s$5, [t$6, r$10, c$7]) { const d$5 = p(s$5), { values: p$3, keys: a$2 } = this.dt(t$6, r$10, c$7); if (!Array.isArray(d$5)) return this.ut = a$2, p$3; const h$5 = this.ut ??= [], v$3 = []; let m$3, y$3, x$2 = 0, j$2 = d$5.length - 1, k$2 = 0, w$2 = p$3.length - 1; for (; x$2 <= j$2 && k$2 <= w$2;) if (null === d$5[x$2]) x$2++; else if (null === d$5[j$2]) j$2--; else if (h$5[x$2] === a$2[k$2]) v$3[k$2] = v$1(d$5[x$2], p$3[k$2]), x$2++, k$2++; else if (h$5[j$2] === a$2[w$2]) v$3[w$2] = v$1(d$5[j$2], p$3[w$2]), j$2--, w$2--; else if (h$5[x$2] === a$2[w$2]) v$3[w$2] = v$1(d$5[x$2], p$3[w$2]), s(s$5, v$3[w$2 + 1], d$5[x$2]), x$2++, w$2--; else if (h$5[j$2] === a$2[k$2]) v$3[k$2] = v$1(d$5[j$2], p$3[k$2]), s(s$5, d$5[x$2], d$5[j$2]), j$2--, k$2++; else if (void 0 === m$3 && (m$3 = u(a$2, k$2, w$2), y$3 = u(h$5, x$2, j$2)), m$3.has(h$5[x$2])) if (m$3.has(h$5[j$2])) { const e$10 = y$3.get(a$2[k$2]), t$7 = void 0 !== e$10 ? d$5[e$10] : null; if (null === t$7) { const e$11 = s(s$5, d$5[x$2]); v$1(e$11, p$3[k$2]), v$3[k$2] = e$11; } else v$3[k$2] = v$1(t$7, p$3[k$2]), s(s$5, d$5[x$2], t$7), d$5[e$10] = null; k$2++; } else M$1(d$5[j$2]), j$2--; else M$1(d$5[x$2]), x$2++; for (; k$2 <= w$2;) { const e$10 = s(s$5, v$3[w$2 + 1]); v$1(e$10, p$3[k$2]), v$3[k$2++] = e$10; } for (; x$2 <= j$2;) { const e$10 = d$5[x$2++]; null !== e$10 && M$1(e$10); } return this.ut = a$2, m$1(s$5, v$3), T$2; } }); })); //#endregion //#region node_modules/lit/directives/repeat.js var init_repeat = __esmMin((() => { init_repeat$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/components/message-renderer-registry.js function registerMessageRenderer(role, renderer) { messageRenderers.set(role, renderer); } function getMessageRenderer(role) { return messageRenderers.get(role); } function renderMessage(message) { return messageRenderers.get(message.role)?.render(message); } var messageRenderers; var init_message_renderer_registry = __esmMin((() => { messageRenderers = new Map(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/components/MessageList.js var __decorate$22, MessageList; var init_MessageList = __esmMin((() => { init_lit(); init_decorators(); init_repeat(); init_message_renderer_registry(); __decorate$22 = void 0 && (void 0).__decorate || function(decorators, target, key, desc) { var c$7 = arguments.length, r$10 = c$7 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d$5; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r$10 = Reflect.decorate(decorators, target, key, desc); else for (var i$7 = decorators.length - 1; i$7 >= 0; i$7--) if (d$5 = decorators[i$7]) r$10 = (c$7 < 3 ? d$5(r$10) : c$7 > 3 ? d$5(target, key, r$10) : d$5(target, key)) || r$10; return c$7 > 3 && r$10 && Object.defineProperty(target, key, r$10), r$10; }; MessageList = class extends i { constructor() { super(...arguments); this.messages = []; this.tools = []; this.isStreaming = false; } createRenderRoot() { return this; } connectedCallback() { super.connectedCallback(); this.style.display = "block"; } buildRenderItems() { const resultByCallId = new Map(); for (const message of this.messages) { if (message.role === "toolResult") { resultByCallId.set(message.toolCallId, message); } } const items = []; let index = 0; for (const msg of this.messages) { if (msg.role === "artifact") { continue; } const customTemplate = renderMessage(msg); if (customTemplate) { items.push({ key: `msg:${index}`, template: customTemplate }); index++; continue; } if (msg.role === "user") { items.push({ key: `msg:${index}`, template: x`` }); index++; } else if (msg.role === "assistant") { const amsg = msg; items.push({ key: `msg:${index}`, template: x`` }); index++; } else {} } return items; } render() { const items = this.buildRenderItems(); return x`
${c(items, (it) => it.key, (it) => it.template)}
`; } }; __decorate$22([n$1({ type: Array })], MessageList.prototype, "messages", void 0); __decorate$22([n$1({ type: Array })], MessageList.prototype, "tools", void 0); __decorate$22([n$1({ type: Object })], MessageList.prototype, "pendingToolCalls", void 0); __decorate$22([n$1({ type: Boolean })], MessageList.prototype, "isStreaming", void 0); __decorate$22([n$1({ attribute: false })], MessageList.prototype, "onCostClick", void 0); if (!customElements.get("message-list")) { customElements.define("message-list", MessageList); } })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/guard/value.mjs /** Returns true if this value has this property key */ function HasPropertyKey$1(value, key) { return key in value; } /** Returns true if this value is an async iterator */ function IsAsyncIterator(value) { return IsObject$1(value) && !IsArray(value) && !IsUint8Array(value) && Symbol.asyncIterator in value; } /** Returns true if this value is an array */ function IsArray(value) { return Array.isArray(value); } /** Returns true if this value is bigint */ function IsBigInt(value) { return typeof value === "bigint"; } /** Returns true if this value is a boolean */ function IsBoolean$1(value) { return typeof value === "boolean"; } /** Returns true if this value is a Date object */ function IsDate(value) { return value instanceof globalThis.Date; } /** Returns true if this value is a function */ function IsFunction(value) { return typeof value === "function"; } /** Returns true if this value is an iterator */ function IsIterator(value) { return IsObject$1(value) && !IsArray(value) && !IsUint8Array(value) && Symbol.iterator in value; } /** Returns true if this value is null */ function IsNull(value) { return value === null; } /** Returns true if this value is number */ function IsNumber$1(value) { return typeof value === "number"; } /** Returns true if this value is an object */ function IsObject$1(value) { return typeof value === "object" && value !== null; } /** Returns true if this value is RegExp */ function IsRegExp$3(value) { return value instanceof globalThis.RegExp; } /** Returns true if this value is string */ function IsString(value) { return typeof value === "string"; } /** Returns true if this value is symbol */ function IsSymbol(value) { return typeof value === "symbol"; } /** Returns true if this value is a Uint8Array */ function IsUint8Array(value) { return value instanceof globalThis.Uint8Array; } /** Returns true if this value is undefined */ function IsUndefined(value) { return value === undefined; } var init_value$1 = __esmMin((() => {})); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/clone/value.mjs function ArrayType(value) { return value.map((value$1) => Visit$2(value$1)); } function DateType(value) { return new Date(value.getTime()); } function Uint8ArrayType(value) { return new Uint8Array(value); } function RegExpType(value) { return new RegExp(value.source, value.flags); } function ObjectType(value) { const result = {}; for (const key of Object.getOwnPropertyNames(value)) { result[key] = Visit$2(value[key]); } for (const key of Object.getOwnPropertySymbols(value)) { result[key] = Visit$2(value[key]); } return result; } function Visit$2(value) { return IsArray(value) ? ArrayType(value) : IsDate(value) ? DateType(value) : IsUint8Array(value) ? Uint8ArrayType(value) : IsRegExp$3(value) ? RegExpType(value) : IsObject$1(value) ? ObjectType(value) : value; } /** Clones a value */ function Clone(value) { return Visit$2(value); } var init_value = __esmMin((() => { init_value$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/clone/type.mjs /** Clones a Rest */ function CloneRest(schemas) { return schemas.map((schema) => CloneType(schema)); } /** Clones a Type */ function CloneType(schema, options) { return options === undefined ? Clone(schema) : Clone({ ...options, ...schema }); } var init_type$5 = __esmMin((() => { init_value(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/clone/index.mjs var init_clone = __esmMin((() => { init_type$5(); init_value(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/value/guard/guard.mjs /** Returns true if this value is an async iterator */ function IsAsyncIterator$3(value) { return IsObject$3(value) && globalThis.Symbol.asyncIterator in value; } /** Returns true if this value is an iterator */ function IsIterator$3(value) { return IsObject$3(value) && globalThis.Symbol.iterator in value; } /** Returns true if this value is not an instance of a class */ function IsStandardObject(value) { return IsObject$3(value) && (globalThis.Object.getPrototypeOf(value) === Object.prototype || globalThis.Object.getPrototypeOf(value) === null); } /** Returns true if this value is an instance of a class */ function IsInstanceObject(value) { return IsObject$3(value) && !IsArray$3(value) && IsFunction$3(value.constructor) && value.constructor.name !== "Object"; } /** Returns true if this value is a Promise */ function IsPromise$2(value) { return value instanceof globalThis.Promise; } /** Returns true if this value is a Date */ function IsDate$3(value) { return value instanceof Date && globalThis.Number.isFinite(value.getTime()); } /** Returns true if this value is an instance of Map */ function IsMap(value) { return value instanceof globalThis.Map; } /** Returns true if this value is an instance of Set */ function IsSet(value) { return value instanceof globalThis.Set; } /** Returns true if this value is RegExp */ function IsRegExp$2(value) { return value instanceof globalThis.RegExp; } /** Returns true if this value is a typed array */ function IsTypedArray(value) { return globalThis.ArrayBuffer.isView(value); } /** Returns true if the value is a Int8Array */ function IsInt8Array(value) { return value instanceof globalThis.Int8Array; } /** Returns true if the value is a Uint8Array */ function IsUint8Array$3(value) { return value instanceof globalThis.Uint8Array; } /** Returns true if the value is a Uint8ClampedArray */ function IsUint8ClampedArray(value) { return value instanceof globalThis.Uint8ClampedArray; } /** Returns true if the value is a Int16Array */ function IsInt16Array(value) { return value instanceof globalThis.Int16Array; } /** Returns true if the value is a Uint16Array */ function IsUint16Array(value) { return value instanceof globalThis.Uint16Array; } /** Returns true if the value is a Int32Array */ function IsInt32Array(value) { return value instanceof globalThis.Int32Array; } /** Returns true if the value is a Uint32Array */ function IsUint32Array(value) { return value instanceof globalThis.Uint32Array; } /** Returns true if the value is a Float32Array */ function IsFloat32Array(value) { return value instanceof globalThis.Float32Array; } /** Returns true if the value is a Float64Array */ function IsFloat64Array(value) { return value instanceof globalThis.Float64Array; } /** Returns true if the value is a BigInt64Array */ function IsBigInt64Array(value) { return value instanceof globalThis.BigInt64Array; } /** Returns true if the value is a BigUint64Array */ function IsBigUint64Array(value) { return value instanceof globalThis.BigUint64Array; } /** Returns true if this value has this property key */ function HasPropertyKey(value, key) { return key in value; } /** Returns true of this value is an object type */ function IsObject$3(value) { return value !== null && typeof value === "object"; } /** Returns true if this value is an array, but not a typed array */ function IsArray$3(value) { return globalThis.Array.isArray(value) && !globalThis.ArrayBuffer.isView(value); } /** Returns true if this value is an undefined */ function IsUndefined$3(value) { return value === undefined; } /** Returns true if this value is an null */ function IsNull$3(value) { return value === null; } /** Returns true if this value is an boolean */ function IsBoolean$3(value) { return typeof value === "boolean"; } /** Returns true if this value is an number */ function IsNumber$3(value) { return typeof value === "number"; } /** Returns true if this value is an integer */ function IsInteger$2(value) { return globalThis.Number.isInteger(value); } /** Returns true if this value is bigint */ function IsBigInt$3(value) { return typeof value === "bigint"; } /** Returns true if this value is string */ function IsString$3(value) { return typeof value === "string"; } /** Returns true if this value is a function */ function IsFunction$3(value) { return typeof value === "function"; } /** Returns true if this value is a symbol */ function IsSymbol$3(value) { return typeof value === "symbol"; } /** Returns true if this value is a value type such as number, string, boolean */ function IsValueType(value) { return IsBigInt$3(value) || IsBoolean$3(value) || IsNull$3(value) || IsNumber$3(value) || IsString$3(value) || IsSymbol$3(value) || IsUndefined$3(value); } var init_guard$2 = __esmMin((() => {})); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/value/guard/index.mjs var init_guard$1 = __esmMin((() => { init_guard$2(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/system/policy.mjs var TypeSystemPolicy; var init_policy = __esmMin((() => { init_guard$1(); ; (function(TypeSystemPolicy$1) { /** * Configures the instantiation behavior of TypeBox types. The `default` option assigns raw JavaScript * references for embedded types, which may cause side effects if type properties are explicitly updated * outside the TypeBox type builder. The `clone` option creates copies of any shared types upon creation, * preventing unintended side effects. The `freeze` option applies `Object.freeze()` to the type, making * it fully readonly and immutable. Implementations should use `default` whenever possible, as it is the * fastest way to instantiate types. The default setting is `default`. */ TypeSystemPolicy$1.InstanceMode = "default"; /** Sets whether TypeBox should assert optional properties using the TypeScript `exactOptionalPropertyTypes` assertion policy. The default is `false` */ TypeSystemPolicy$1.ExactOptionalPropertyTypes = false; /** Sets whether arrays should be treated as a kind of objects. The default is `false` */ TypeSystemPolicy$1.AllowArrayObject = false; /** Sets whether `NaN` or `Infinity` should be treated as valid numeric values. The default is `false` */ TypeSystemPolicy$1.AllowNaN = false; /** Sets whether `null` should validate for void types. The default is `false` */ TypeSystemPolicy$1.AllowNullVoid = false; /** Checks this value using the ExactOptionalPropertyTypes policy */ function IsExactOptionalProperty(value, key) { return TypeSystemPolicy$1.ExactOptionalPropertyTypes ? key in value : value[key] !== undefined; } TypeSystemPolicy$1.IsExactOptionalProperty = IsExactOptionalProperty; /** Checks this value using the AllowArrayObjects policy */ function IsObjectLike(value) { const isObject = IsObject$3(value); return TypeSystemPolicy$1.AllowArrayObject ? isObject : isObject && !IsArray$3(value); } TypeSystemPolicy$1.IsObjectLike = IsObjectLike; /** Checks this value as a record using the AllowArrayObjects policy */ function IsRecordLike(value) { return IsObjectLike(value) && !(value instanceof Date) && !(value instanceof Uint8Array); } TypeSystemPolicy$1.IsRecordLike = IsRecordLike; /** Checks this value using the AllowNaN policy */ function IsNumberLike(value) { return TypeSystemPolicy$1.AllowNaN ? IsNumber$3(value) : Number.isFinite(value); } TypeSystemPolicy$1.IsNumberLike = IsNumberLike; /** Checks this value using the AllowVoidNull policy */ function IsVoidLike(value) { const isUndefined = IsUndefined$3(value); return TypeSystemPolicy$1.AllowNullVoid ? isUndefined || value === null : isUndefined; } TypeSystemPolicy$1.IsVoidLike = IsVoidLike; })(TypeSystemPolicy || (TypeSystemPolicy = {})); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/create/immutable.mjs function ImmutableArray(value) { return globalThis.Object.freeze(value).map((value$1) => Immutable(value$1)); } function ImmutableDate(value) { return value; } function ImmutableUint8Array(value) { return value; } function ImmutableRegExp(value) { return value; } function ImmutableObject(value) { const result = {}; for (const key of Object.getOwnPropertyNames(value)) { result[key] = Immutable(value[key]); } for (const key of Object.getOwnPropertySymbols(value)) { result[key] = Immutable(value[key]); } return globalThis.Object.freeze(result); } /** Specialized deep immutable value. Applies freeze recursively to the given value */ function Immutable(value) { return IsArray(value) ? ImmutableArray(value) : IsDate(value) ? ImmutableDate(value) : IsUint8Array(value) ? ImmutableUint8Array(value) : IsRegExp$3(value) ? ImmutableRegExp(value) : IsObject$1(value) ? ImmutableObject(value) : value; } var init_immutable = __esmMin((() => { init_value$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/create/type.mjs /** Creates TypeBox schematics using the configured InstanceMode */ function CreateType(schema, options) { const result = options !== undefined ? { ...options, ...schema } : schema; switch (TypeSystemPolicy.InstanceMode) { case "freeze": return Immutable(result); case "clone": return Clone(result); default: return result; } } var init_type$4 = __esmMin((() => { init_policy(); init_immutable(); init_value(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/create/index.mjs var init_create$1 = __esmMin((() => { init_type$4(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/error/error.mjs var TypeBoxError; var init_error$1 = __esmMin((() => { TypeBoxError = class extends Error { constructor(message) { super(message); } }; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/error/index.mjs var init_error = __esmMin((() => { init_error$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/symbols/symbols.mjs var TransformKind, ReadonlyKind, OptionalKind, Hint, Kind; var init_symbols$1 = __esmMin((() => { TransformKind = Symbol.for("TypeBox.Transform"); ReadonlyKind = Symbol.for("TypeBox.Readonly"); OptionalKind = Symbol.for("TypeBox.Optional"); Hint = Symbol.for("TypeBox.Hint"); Kind = Symbol.for("TypeBox.Kind"); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/symbols/index.mjs var init_symbols = __esmMin((() => { init_symbols$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/guard/kind.mjs /** `[Kind-Only]` Returns true if this value has a Readonly symbol */ function IsReadonly(value) { return IsObject$1(value) && value[ReadonlyKind] === "Readonly"; } /** `[Kind-Only]` Returns true if this value has a Optional symbol */ function IsOptional(value) { return IsObject$1(value) && value[OptionalKind] === "Optional"; } /** `[Kind-Only]` Returns true if the given value is TAny */ function IsAny(value) { return IsKindOf$1(value, "Any"); } /** `[Kind-Only]` Returns true if the given value is TArgument */ function IsArgument$1(value) { return IsKindOf$1(value, "Argument"); } /** `[Kind-Only]` Returns true if the given value is TArray */ function IsArray$1(value) { return IsKindOf$1(value, "Array"); } /** `[Kind-Only]` Returns true if the given value is TAsyncIterator */ function IsAsyncIterator$1(value) { return IsKindOf$1(value, "AsyncIterator"); } /** `[Kind-Only]` Returns true if the given value is TBigInt */ function IsBigInt$1(value) { return IsKindOf$1(value, "BigInt"); } /** `[Kind-Only]` Returns true if the given value is TBoolean */ function IsBoolean(value) { return IsKindOf$1(value, "Boolean"); } /** `[Kind-Only]` Returns true if the given value is TComputed */ function IsComputed(value) { return IsKindOf$1(value, "Computed"); } /** `[Kind-Only]` Returns true if the given value is TConstructor */ function IsConstructor(value) { return IsKindOf$1(value, "Constructor"); } /** `[Kind-Only]` Returns true if the given value is TDate */ function IsDate$2(value) { return IsKindOf$1(value, "Date"); } /** `[Kind-Only]` Returns true if the given value is TFunction */ function IsFunction$1(value) { return IsKindOf$1(value, "Function"); } /** `[Kind-Only]` Returns true if the given value is TInteger */ function IsImport$1(value) { return IsKindOf$1(value, "Import"); } /** `[Kind-Only]` Returns true if the given value is TInteger */ function IsInteger(value) { return IsKindOf$1(value, "Integer"); } /** `[Kind-Only]` Returns true if the given schema is TProperties */ function IsProperties$1(value) { return IsObject$1(value); } /** `[Kind-Only]` Returns true if the given value is TIntersect */ function IsIntersect(value) { return IsKindOf$1(value, "Intersect"); } /** `[Kind-Only]` Returns true if the given value is TIterator */ function IsIterator$1(value) { return IsKindOf$1(value, "Iterator"); } /** `[Kind-Only]` Returns true if the given value is a TKind with the given name. */ function IsKindOf$1(value, kind) { return IsObject$1(value) && Kind in value && value[Kind] === kind; } /** `[Kind-Only]` Returns true if the given value is TLiteral */ function IsLiteralString$1(value) { return IsLiteral(value) && IsString(value.const); } /** `[Kind-Only]` Returns true if the given value is TLiteral */ function IsLiteralNumber$1(value) { return IsLiteral(value) && IsNumber$1(value.const); } /** `[Kind-Only]` Returns true if the given value is TLiteral */ function IsLiteralBoolean$1(value) { return IsLiteral(value) && IsBoolean$1(value.const); } /** `[Kind-Only]` Returns true if the given value is TLiteralValue */ function IsLiteralValue(value) { return IsBoolean$1(value) || IsNumber$1(value) || IsString(value); } /** `[Kind-Only]` Returns true if the given value is TLiteral */ function IsLiteral(value) { return IsKindOf$1(value, "Literal"); } /** `[Kind-Only]` Returns true if the given value is a TMappedKey */ function IsMappedKey(value) { return IsKindOf$1(value, "MappedKey"); } /** `[Kind-Only]` Returns true if the given value is TMappedResult */ function IsMappedResult(value) { return IsKindOf$1(value, "MappedResult"); } /** `[Kind-Only]` Returns true if the given value is TNever */ function IsNever(value) { return IsKindOf$1(value, "Never"); } /** `[Kind-Only]` Returns true if the given value is TNot */ function IsNot$1(value) { return IsKindOf$1(value, "Not"); } /** `[Kind-Only]` Returns true if the given value is TNull */ function IsNull$2(value) { return IsKindOf$1(value, "Null"); } /** `[Kind-Only]` Returns true if the given value is TNumber */ function IsNumber(value) { return IsKindOf$1(value, "Number"); } /** `[Kind-Only]` Returns true if the given value is TObject */ function IsObject(value) { return IsKindOf$1(value, "Object"); } /** `[Kind-Only]` Returns true if the given value is TPromise */ function IsPromise(value) { return IsKindOf$1(value, "Promise"); } /** `[Kind-Only]` Returns true if the given value is TRecord */ function IsRecord(value) { return IsKindOf$1(value, "Record"); } /** `[Kind-Only]` Returns true if this value is TRecursive */ function IsRecursive$1(value) { return IsObject$1(value) && Hint in value && value[Hint] === "Recursive"; } /** `[Kind-Only]` Returns true if the given value is TRef */ function IsRef(value) { return IsKindOf$1(value, "Ref"); } /** `[Kind-Only]` Returns true if the given value is TRegExp */ function IsRegExp(value) { return IsKindOf$1(value, "RegExp"); } /** `[Kind-Only]` Returns true if the given value is TString */ function IsString$1(value) { return IsKindOf$1(value, "String"); } /** `[Kind-Only]` Returns true if the given value is TSymbol */ function IsSymbol$2(value) { return IsKindOf$1(value, "Symbol"); } /** `[Kind-Only]` Returns true if the given value is TTemplateLiteral */ function IsTemplateLiteral(value) { return IsKindOf$1(value, "TemplateLiteral"); } /** `[Kind-Only]` Returns true if the given value is TThis */ function IsThis$1(value) { return IsKindOf$1(value, "This"); } /** `[Kind-Only]` Returns true of this value is TTransform */ function IsTransform(value) { return IsObject$1(value) && TransformKind in value; } /** `[Kind-Only]` Returns true if the given value is TTuple */ function IsTuple(value) { return IsKindOf$1(value, "Tuple"); } /** `[Kind-Only]` Returns true if the given value is TUndefined */ function IsUndefined$2(value) { return IsKindOf$1(value, "Undefined"); } /** `[Kind-Only]` Returns true if the given value is TUnion */ function IsUnion(value) { return IsKindOf$1(value, "Union"); } /** `[Kind-Only]` Returns true if the given value is TUint8Array */ function IsUint8Array$2(value) { return IsKindOf$1(value, "Uint8Array"); } /** `[Kind-Only]` Returns true if the given value is TUnknown */ function IsUnknown$1(value) { return IsKindOf$1(value, "Unknown"); } /** `[Kind-Only]` Returns true if the given value is a raw TUnsafe */ function IsUnsafe$1(value) { return IsKindOf$1(value, "Unsafe"); } /** `[Kind-Only]` Returns true if the given value is TVoid */ function IsVoid$1(value) { return IsKindOf$1(value, "Void"); } /** `[Kind-Only]` Returns true if the given value is TKind */ function IsKind$1(value) { return IsObject$1(value) && Kind in value && IsString(value[Kind]); } /** `[Kind-Only]` Returns true if the given value is TSchema */ function IsSchema(value) { return IsAny(value) || IsArgument$1(value) || IsArray$1(value) || IsBoolean(value) || IsBigInt$1(value) || IsAsyncIterator$1(value) || IsComputed(value) || IsConstructor(value) || IsDate$2(value) || IsFunction$1(value) || IsInteger(value) || IsIntersect(value) || IsIterator$1(value) || IsLiteral(value) || IsMappedKey(value) || IsMappedResult(value) || IsNever(value) || IsNot$1(value) || IsNull$2(value) || IsNumber(value) || IsObject(value) || IsPromise(value) || IsRecord(value) || IsRef(value) || IsRegExp(value) || IsString$1(value) || IsSymbol$2(value) || IsTemplateLiteral(value) || IsThis$1(value) || IsTuple(value) || IsUndefined$2(value) || IsUnion(value) || IsUint8Array$2(value) || IsUnknown$1(value) || IsUnsafe$1(value) || IsVoid$1(value) || IsKind$1(value); } var init_kind = __esmMin((() => { init_value$1(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/guard/type.mjs function IsPattern(value) { try { new RegExp(value); return true; } catch { return false; } } function IsControlCharacterFree(value) { if (!IsString(value)) return false; for (let i$7 = 0; i$7 < value.length; i$7++) { const code = value.charCodeAt(i$7); if (code >= 7 && code <= 13 || code === 27 || code === 127) { return false; } } return true; } function IsAdditionalProperties(value) { return IsOptionalBoolean(value) || IsSchema$1(value); } function IsOptionalBigInt(value) { return IsUndefined(value) || IsBigInt(value); } function IsOptionalNumber(value) { return IsUndefined(value) || IsNumber$1(value); } function IsOptionalBoolean(value) { return IsUndefined(value) || IsBoolean$1(value); } function IsOptionalString(value) { return IsUndefined(value) || IsString(value); } function IsOptionalPattern(value) { return IsUndefined(value) || IsString(value) && IsControlCharacterFree(value) && IsPattern(value); } function IsOptionalFormat(value) { return IsUndefined(value) || IsString(value) && IsControlCharacterFree(value); } function IsOptionalSchema(value) { return IsUndefined(value) || IsSchema$1(value); } /** Returns true if this value has a Readonly symbol */ function IsReadonly$1(value) { return IsObject$1(value) && value[ReadonlyKind] === "Readonly"; } /** Returns true if this value has a Optional symbol */ function IsOptional$1(value) { return IsObject$1(value) && value[OptionalKind] === "Optional"; } /** Returns true if the given value is TAny */ function IsAny$1(value) { return IsKindOf(value, "Any") && IsOptionalString(value.$id); } /** Returns true if the given value is TArgument */ function IsArgument(value) { return IsKindOf(value, "Argument") && IsNumber$1(value.index); } /** Returns true if the given value is TArray */ function IsArray$2(value) { return IsKindOf(value, "Array") && value.type === "array" && IsOptionalString(value.$id) && IsSchema$1(value.items) && IsOptionalNumber(value.minItems) && IsOptionalNumber(value.maxItems) && IsOptionalBoolean(value.uniqueItems) && IsOptionalSchema(value.contains) && IsOptionalNumber(value.minContains) && IsOptionalNumber(value.maxContains); } /** Returns true if the given value is TAsyncIterator */ function IsAsyncIterator$2(value) { return IsKindOf(value, "AsyncIterator") && value.type === "AsyncIterator" && IsOptionalString(value.$id) && IsSchema$1(value.items); } /** Returns true if the given value is TBigInt */ function IsBigInt$2(value) { return IsKindOf(value, "BigInt") && value.type === "bigint" && IsOptionalString(value.$id) && IsOptionalBigInt(value.exclusiveMaximum) && IsOptionalBigInt(value.exclusiveMinimum) && IsOptionalBigInt(value.maximum) && IsOptionalBigInt(value.minimum) && IsOptionalBigInt(value.multipleOf); } /** Returns true if the given value is TBoolean */ function IsBoolean$2(value) { return IsKindOf(value, "Boolean") && value.type === "boolean" && IsOptionalString(value.$id); } /** Returns true if the given value is TComputed */ function IsComputed$1(value) { return IsKindOf(value, "Computed") && IsString(value.target) && IsArray(value.parameters) && value.parameters.every((schema) => IsSchema$1(schema)); } /** Returns true if the given value is TConstructor */ function IsConstructor$1(value) { return IsKindOf(value, "Constructor") && value.type === "Constructor" && IsOptionalString(value.$id) && IsArray(value.parameters) && value.parameters.every((schema) => IsSchema$1(schema)) && IsSchema$1(value.returns); } /** Returns true if the given value is TDate */ function IsDate$1(value) { return IsKindOf(value, "Date") && value.type === "Date" && IsOptionalString(value.$id) && IsOptionalNumber(value.exclusiveMaximumTimestamp) && IsOptionalNumber(value.exclusiveMinimumTimestamp) && IsOptionalNumber(value.maximumTimestamp) && IsOptionalNumber(value.minimumTimestamp) && IsOptionalNumber(value.multipleOfTimestamp); } /** Returns true if the given value is TFunction */ function IsFunction$2(value) { return IsKindOf(value, "Function") && value.type === "Function" && IsOptionalString(value.$id) && IsArray(value.parameters) && value.parameters.every((schema) => IsSchema$1(schema)) && IsSchema$1(value.returns); } /** Returns true if the given value is TImport */ function IsImport(value) { return IsKindOf(value, "Import") && HasPropertyKey$1(value, "$defs") && IsObject$1(value.$defs) && IsProperties(value.$defs) && HasPropertyKey$1(value, "$ref") && IsString(value.$ref) && value.$ref in value.$defs; } /** Returns true if the given value is TInteger */ function IsInteger$1(value) { return IsKindOf(value, "Integer") && value.type === "integer" && IsOptionalString(value.$id) && IsOptionalNumber(value.exclusiveMaximum) && IsOptionalNumber(value.exclusiveMinimum) && IsOptionalNumber(value.maximum) && IsOptionalNumber(value.minimum) && IsOptionalNumber(value.multipleOf); } /** Returns true if the given schema is TProperties */ function IsProperties(value) { return IsObject$1(value) && Object.entries(value).every(([key, schema]) => IsControlCharacterFree(key) && IsSchema$1(schema)); } /** Returns true if the given value is TIntersect */ function IsIntersect$1(value) { return IsKindOf(value, "Intersect") && (IsString(value.type) && value.type !== "object" ? false : true) && IsArray(value.allOf) && value.allOf.every((schema) => IsSchema$1(schema) && !IsTransform$1(schema)) && IsOptionalString(value.type) && (IsOptionalBoolean(value.unevaluatedProperties) || IsOptionalSchema(value.unevaluatedProperties)) && IsOptionalString(value.$id); } /** Returns true if the given value is TIterator */ function IsIterator$2(value) { return IsKindOf(value, "Iterator") && value.type === "Iterator" && IsOptionalString(value.$id) && IsSchema$1(value.items); } /** Returns true if the given value is a TKind with the given name. */ function IsKindOf(value, kind) { return IsObject$1(value) && Kind in value && value[Kind] === kind; } /** Returns true if the given value is TLiteral */ function IsLiteralString(value) { return IsLiteral$1(value) && IsString(value.const); } /** Returns true if the given value is TLiteral */ function IsLiteralNumber(value) { return IsLiteral$1(value) && IsNumber$1(value.const); } /** Returns true if the given value is TLiteral */ function IsLiteralBoolean(value) { return IsLiteral$1(value) && IsBoolean$1(value.const); } /** Returns true if the given value is TLiteral */ function IsLiteral$1(value) { return IsKindOf(value, "Literal") && IsOptionalString(value.$id) && IsLiteralValue$1(value.const); } /** Returns true if the given value is a TLiteralValue */ function IsLiteralValue$1(value) { return IsBoolean$1(value) || IsNumber$1(value) || IsString(value); } /** Returns true if the given value is a TMappedKey */ function IsMappedKey$1(value) { return IsKindOf(value, "MappedKey") && IsArray(value.keys) && value.keys.every((key) => IsNumber$1(key) || IsString(key)); } /** Returns true if the given value is TMappedResult */ function IsMappedResult$1(value) { return IsKindOf(value, "MappedResult") && IsProperties(value.properties); } /** Returns true if the given value is TNever */ function IsNever$1(value) { return IsKindOf(value, "Never") && IsObject$1(value.not) && Object.getOwnPropertyNames(value.not).length === 0; } /** Returns true if the given value is TNot */ function IsNot(value) { return IsKindOf(value, "Not") && IsSchema$1(value.not); } /** Returns true if the given value is TNull */ function IsNull$1(value) { return IsKindOf(value, "Null") && value.type === "null" && IsOptionalString(value.$id); } /** Returns true if the given value is TNumber */ function IsNumber$2(value) { return IsKindOf(value, "Number") && value.type === "number" && IsOptionalString(value.$id) && IsOptionalNumber(value.exclusiveMaximum) && IsOptionalNumber(value.exclusiveMinimum) && IsOptionalNumber(value.maximum) && IsOptionalNumber(value.minimum) && IsOptionalNumber(value.multipleOf); } /** Returns true if the given value is TObject */ function IsObject$2(value) { return IsKindOf(value, "Object") && value.type === "object" && IsOptionalString(value.$id) && IsProperties(value.properties) && IsAdditionalProperties(value.additionalProperties) && IsOptionalNumber(value.minProperties) && IsOptionalNumber(value.maxProperties); } /** Returns true if the given value is TPromise */ function IsPromise$1(value) { return IsKindOf(value, "Promise") && value.type === "Promise" && IsOptionalString(value.$id) && IsSchema$1(value.item); } /** Returns true if the given value is TRecord */ function IsRecord$1(value) { return IsKindOf(value, "Record") && value.type === "object" && IsOptionalString(value.$id) && IsAdditionalProperties(value.additionalProperties) && IsObject$1(value.patternProperties) && ((schema) => { const keys$1 = Object.getOwnPropertyNames(schema.patternProperties); return keys$1.length === 1 && IsPattern(keys$1[0]) && IsObject$1(schema.patternProperties) && IsSchema$1(schema.patternProperties[keys$1[0]]); })(value); } /** Returns true if this value is TRecursive */ function IsRecursive(value) { return IsObject$1(value) && Hint in value && value[Hint] === "Recursive"; } /** Returns true if the given value is TRef */ function IsRef$1(value) { return IsKindOf(value, "Ref") && IsOptionalString(value.$id) && IsString(value.$ref); } /** Returns true if the given value is TRegExp */ function IsRegExp$1(value) { return IsKindOf(value, "RegExp") && IsOptionalString(value.$id) && IsString(value.source) && IsString(value.flags) && IsOptionalNumber(value.maxLength) && IsOptionalNumber(value.minLength); } /** Returns true if the given value is TString */ function IsString$2(value) { return IsKindOf(value, "String") && value.type === "string" && IsOptionalString(value.$id) && IsOptionalNumber(value.minLength) && IsOptionalNumber(value.maxLength) && IsOptionalPattern(value.pattern) && IsOptionalFormat(value.format); } /** Returns true if the given value is TSymbol */ function IsSymbol$1(value) { return IsKindOf(value, "Symbol") && value.type === "symbol" && IsOptionalString(value.$id); } /** Returns true if the given value is TTemplateLiteral */ function IsTemplateLiteral$1(value) { return IsKindOf(value, "TemplateLiteral") && value.type === "string" && IsString(value.pattern) && value.pattern[0] === "^" && value.pattern[value.pattern.length - 1] === "$"; } /** Returns true if the given value is TThis */ function IsThis(value) { return IsKindOf(value, "This") && IsOptionalString(value.$id) && IsString(value.$ref); } /** Returns true of this value is TTransform */ function IsTransform$1(value) { return IsObject$1(value) && TransformKind in value; } /** Returns true if the given value is TTuple */ function IsTuple$1(value) { return IsKindOf(value, "Tuple") && value.type === "array" && IsOptionalString(value.$id) && IsNumber$1(value.minItems) && IsNumber$1(value.maxItems) && value.minItems === value.maxItems && (IsUndefined(value.items) && IsUndefined(value.additionalItems) && value.minItems === 0 || IsArray(value.items) && value.items.every((schema) => IsSchema$1(schema))); } /** Returns true if the given value is TUndefined */ function IsUndefined$1(value) { return IsKindOf(value, "Undefined") && value.type === "undefined" && IsOptionalString(value.$id); } /** Returns true if the given value is TUnion[]> */ function IsUnionLiteral(value) { return IsUnion$1(value) && value.anyOf.every((schema) => IsLiteralString(schema) || IsLiteralNumber(schema)); } /** Returns true if the given value is TUnion */ function IsUnion$1(value) { return IsKindOf(value, "Union") && IsOptionalString(value.$id) && IsObject$1(value) && IsArray(value.anyOf) && value.anyOf.every((schema) => IsSchema$1(schema)); } /** Returns true if the given value is TUint8Array */ function IsUint8Array$1(value) { return IsKindOf(value, "Uint8Array") && value.type === "Uint8Array" && IsOptionalString(value.$id) && IsOptionalNumber(value.minByteLength) && IsOptionalNumber(value.maxByteLength); } /** Returns true if the given value is TUnknown */ function IsUnknown(value) { return IsKindOf(value, "Unknown") && IsOptionalString(value.$id); } /** Returns true if the given value is a raw TUnsafe */ function IsUnsafe(value) { return IsKindOf(value, "Unsafe"); } /** Returns true if the given value is TVoid */ function IsVoid(value) { return IsKindOf(value, "Void") && value.type === "void" && IsOptionalString(value.$id); } /** Returns true if the given value is TKind */ function IsKind(value) { return IsObject$1(value) && Kind in value && IsString(value[Kind]) && !KnownTypes.includes(value[Kind]); } /** Returns true if the given value is TSchema */ function IsSchema$1(value) { return IsObject$1(value) && (IsAny$1(value) || IsArgument(value) || IsArray$2(value) || IsBoolean$2(value) || IsBigInt$2(value) || IsAsyncIterator$2(value) || IsComputed$1(value) || IsConstructor$1(value) || IsDate$1(value) || IsFunction$2(value) || IsInteger$1(value) || IsIntersect$1(value) || IsIterator$2(value) || IsLiteral$1(value) || IsMappedKey$1(value) || IsMappedResult$1(value) || IsNever$1(value) || IsNot(value) || IsNull$1(value) || IsNumber$2(value) || IsObject$2(value) || IsPromise$1(value) || IsRecord$1(value) || IsRef$1(value) || IsRegExp$1(value) || IsString$2(value) || IsSymbol$1(value) || IsTemplateLiteral$1(value) || IsThis(value) || IsTuple$1(value) || IsUndefined$1(value) || IsUnion$1(value) || IsUint8Array$1(value) || IsUnknown(value) || IsUnsafe(value) || IsVoid(value) || IsKind(value)); } var TypeGuardUnknownTypeError, KnownTypes; var init_type$3 = __esmMin((() => { init_value$1(); init_symbols(); init_error(); TypeGuardUnknownTypeError = class extends TypeBoxError {}; KnownTypes = [ "Argument", "Any", "Array", "AsyncIterator", "BigInt", "Boolean", "Computed", "Constructor", "Date", "Enum", "Function", "Integer", "Intersect", "Iterator", "Literal", "MappedKey", "MappedResult", "Not", "Null", "Number", "Object", "Promise", "Record", "Ref", "RegExp", "String", "Symbol", "TemplateLiteral", "This", "Tuple", "Undefined", "Union", "Uint8Array", "Unknown", "Void" ]; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/guard/index.mjs var init_guard = __esmMin((() => { init_kind(); init_type$3(); init_value$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/helpers/helpers.mjs /** Increments the given string value + 1 */ function Increment(T$3) { return (parseInt(T$3) + 1).toString(); } var init_helpers$1 = __esmMin((() => {})); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/helpers/index.mjs var init_helpers = __esmMin((() => { init_helpers$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/patterns/patterns.mjs var PatternBoolean, PatternNumber, PatternString, PatternNever, PatternBooleanExact, PatternNumberExact, PatternStringExact, PatternNeverExact; var init_patterns$1 = __esmMin((() => { PatternBoolean = "(true|false)"; PatternNumber = "(0|[1-9][0-9]*)"; PatternString = "(.*)"; PatternNever = "(?!.*)"; PatternBooleanExact = `^${PatternBoolean}$`; PatternNumberExact = `^${PatternNumber}$`; PatternStringExact = `^${PatternString}$`; PatternNeverExact = `^${PatternNever}$`; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/patterns/index.mjs var init_patterns = __esmMin((() => { init_patterns$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/registry/format.mjs /** Returns the entries in this registry */ function Entries$1() { return new Map(map$1); } /** Clears all user defined string formats */ function Clear$1() { return map$1.clear(); } /** Deletes a registered format */ function Delete$1(format) { return map$1.delete(format); } /** Returns true if the user defined string format exists */ function Has$1(format) { return map$1.has(format); } /** Sets a validation function for a user defined string format */ function Set$2(format, func) { map$1.set(format, func); } /** Gets a validation function for a user defined string format */ function Get$1(format) { return map$1.get(format); } var map$1; var init_format = __esmMin((() => { map$1 = new Map(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/registry/type.mjs /** Returns the entries in this registry */ function Entries() { return new Map(map); } /** Clears all user defined types */ function Clear() { return map.clear(); } /** Deletes a registered type */ function Delete(kind) { return map.delete(kind); } /** Returns true if this registry contains this kind */ function Has(kind) { return map.has(kind); } /** Sets a validation function for a user defined type */ function Set$1(kind, func) { map.set(kind, func); } /** Gets a custom validation function for a user defined type */ function Get(kind) { return map.get(kind); } var map; var init_type$2 = __esmMin((() => { map = new Map(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/registry/index.mjs var init_registry = __esmMin((() => { init_format(); init_type$2(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/sets/set.mjs /** Returns true if element right is in the set of left */ function SetIncludes(T$3, S$4) { return T$3.includes(S$4); } /** Returns true if left is a subset of right */ function SetIsSubset(T$3, S$4) { return T$3.every((L$2) => SetIncludes(S$4, L$2)); } /** Returns a distinct set of elements */ function SetDistinct(T$3) { return [...new Set(T$3)]; } /** Returns the Intersect of the given sets */ function SetIntersect(T$3, S$4) { return T$3.filter((L$2) => S$4.includes(L$2)); } /** Returns the Union of the given sets */ function SetUnion(T$3, S$4) { return [...T$3, ...S$4]; } /** Returns the Complement by omitting elements in T that are in S */ function SetComplement(T$3, S$4) { return T$3.filter((L$2) => !S$4.includes(L$2)); } function SetIntersectManyResolve(T$3, Init) { return T$3.reduce((Acc, L$2) => { return SetIntersect(Acc, L$2); }, Init); } function SetIntersectMany(T$3) { return T$3.length === 1 ? T$3[0] : T$3.length > 1 ? SetIntersectManyResolve(T$3.slice(1), T$3[0]) : []; } /** Returns the Union of multiple sets */ function SetUnionMany(T$3) { const Acc = []; for (const L$2 of T$3) Acc.push(...L$2); return Acc; } var init_set = __esmMin((() => {})); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/sets/index.mjs var init_sets = __esmMin((() => { init_set(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/any/any.mjs /** `[Json]` Creates an Any type */ function Any(options) { return CreateType({ [Kind]: "Any" }, options); } var init_any$1 = __esmMin((() => { init_create$1(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/any/index.mjs var init_any = __esmMin((() => { init_any$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/array/array.mjs /** `[Json]` Creates an Array type */ function Array$1(items, options) { return CreateType({ [Kind]: "Array", type: "array", items }, options); } var init_array$2 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/array/index.mjs var init_array$1 = __esmMin((() => { init_array$2(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/argument/argument.mjs /** `[JavaScript]` Creates an Argument Type. */ function Argument(index) { return CreateType({ [Kind]: "Argument", index }); } var init_argument$1 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/argument/index.mjs var init_argument = __esmMin((() => { init_argument$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/async-iterator/async-iterator.mjs /** `[JavaScript]` Creates a AsyncIterator type */ function AsyncIterator(items, options) { return CreateType({ [Kind]: "AsyncIterator", type: "AsyncIterator", items }, options); } var init_async_iterator$1 = __esmMin((() => { init_symbols(); init_type$4(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/async-iterator/index.mjs var init_async_iterator = __esmMin((() => { init_async_iterator$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/computed/computed.mjs /** `[Internal]` Creates a deferred computed type. This type is used exclusively in modules to defer resolution of computable types that contain interior references */ function Computed(target, parameters, options) { return CreateType({ [Kind]: "Computed", target, parameters }, options); } var init_computed$1 = __esmMin((() => { init_create$1(); init_symbols$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/computed/index.mjs var init_computed = __esmMin((() => { init_computed$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/discard/discard.mjs function DiscardKey(value, key) { const { [key]: _$2, ...rest } = value; return rest; } /** Discards property keys from the given value. This function returns a shallow Clone. */ function Discard(value, keys$1) { return keys$1.reduce((acc, key) => DiscardKey(acc, key), value); } var init_discard$1 = __esmMin((() => {})); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/discard/index.mjs var init_discard = __esmMin((() => { init_discard$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/never/never.mjs /** `[Json]` Creates a Never type */ function Never(options) { return CreateType({ [Kind]: "Never", not: {} }, options); } var init_never$1 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/never/index.mjs var init_never = __esmMin((() => { init_never$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/mapped/mapped-key.mjs function MappedKey(T$3) { return CreateType({ [Kind]: "MappedKey", keys: T$3 }); } var init_mapped_key = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/mapped/mapped-result.mjs function MappedResult(properties$1) { return CreateType({ [Kind]: "MappedResult", properties: properties$1 }); } var init_mapped_result = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/constructor/constructor.mjs /** `[JavaScript]` Creates a Constructor type */ function Constructor(parameters, returns, options) { return CreateType({ [Kind]: "Constructor", type: "Constructor", parameters, returns }, options); } var init_constructor$1 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/constructor/index.mjs var init_constructor = __esmMin((() => { init_constructor$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/function/function.mjs /** `[JavaScript]` Creates a Function type */ function Function$1(parameters, returns, options) { return CreateType({ [Kind]: "Function", type: "Function", parameters, returns }, options); } var init_function$1 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/function/index.mjs var init_function = __esmMin((() => { init_function$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/union/union-create.mjs function UnionCreate(T$3, options) { return CreateType({ [Kind]: "Union", anyOf: T$3 }, options); } var init_union_create = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/union/union-evaluated.mjs function IsUnionOptional(types) { return types.some((type) => IsOptional(type)); } function RemoveOptionalFromRest$1(types) { return types.map((left) => IsOptional(left) ? RemoveOptionalFromType$1(left) : left); } function RemoveOptionalFromType$1(T$3) { return Discard(T$3, [OptionalKind]); } function ResolveUnion(types, options) { const isOptional = IsUnionOptional(types); return isOptional ? Optional(UnionCreate(RemoveOptionalFromRest$1(types), options)) : UnionCreate(RemoveOptionalFromRest$1(types), options); } /** `[Json]` Creates an evaluated Union type */ function UnionEvaluated(T$3, options) { return T$3.length === 1 ? CreateType(T$3[0], options) : T$3.length === 0 ? Never(options) : ResolveUnion(T$3, options); } var init_union_evaluated = __esmMin((() => { init_type$4(); init_symbols(); init_discard(); init_never(); init_optional(); init_union_create(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/union/union-type.mjs var init_union_type = __esmMin((() => { init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/union/union.mjs /** `[Json]` Creates a Union type */ function Union(types, options) { return types.length === 0 ? Never(options) : types.length === 1 ? CreateType(types[0], options) : UnionCreate(types, options); } var init_union$2 = __esmMin((() => { init_never(); init_type$4(); init_union_create(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/union/index.mjs var init_union$1 = __esmMin((() => { init_union_evaluated(); init_union_type(); init_union$2(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/template-literal/parse.mjs function Unescape(pattern) { return pattern.replace(/\\\$/g, "$").replace(/\\\*/g, "*").replace(/\\\^/g, "^").replace(/\\\|/g, "|").replace(/\\\(/g, "(").replace(/\\\)/g, ")"); } function IsNonEscaped(pattern, index, char) { return pattern[index] === char && pattern.charCodeAt(index - 1) !== 92; } function IsOpenParen(pattern, index) { return IsNonEscaped(pattern, index, "("); } function IsCloseParen(pattern, index) { return IsNonEscaped(pattern, index, ")"); } function IsSeparator(pattern, index) { return IsNonEscaped(pattern, index, "|"); } function IsGroup(pattern) { if (!(IsOpenParen(pattern, 0) && IsCloseParen(pattern, pattern.length - 1))) return false; let count = 0; for (let index = 0; index < pattern.length; index++) { if (IsOpenParen(pattern, index)) count += 1; if (IsCloseParen(pattern, index)) count -= 1; if (count === 0 && index !== pattern.length - 1) return false; } return true; } function InGroup(pattern) { return pattern.slice(1, pattern.length - 1); } function IsPrecedenceOr(pattern) { let count = 0; for (let index = 0; index < pattern.length; index++) { if (IsOpenParen(pattern, index)) count += 1; if (IsCloseParen(pattern, index)) count -= 1; if (IsSeparator(pattern, index) && count === 0) return true; } return false; } function IsPrecedenceAnd(pattern) { for (let index = 0; index < pattern.length; index++) { if (IsOpenParen(pattern, index)) return true; } return false; } function Or(pattern) { let [count, start] = [0, 0]; const expressions = []; for (let index = 0; index < pattern.length; index++) { if (IsOpenParen(pattern, index)) count += 1; if (IsCloseParen(pattern, index)) count -= 1; if (IsSeparator(pattern, index) && count === 0) { const range$1 = pattern.slice(start, index); if (range$1.length > 0) expressions.push(TemplateLiteralParse(range$1)); start = index + 1; } } const range = pattern.slice(start); if (range.length > 0) expressions.push(TemplateLiteralParse(range)); if (expressions.length === 0) return { type: "const", const: "" }; if (expressions.length === 1) return expressions[0]; return { type: "or", expr: expressions }; } function And(pattern) { function Group$1(value, index) { if (!IsOpenParen(value, index)) throw new TemplateLiteralParserError(`TemplateLiteralParser: Index must point to open parens`); let count = 0; for (let scan = index; scan < value.length; scan++) { if (IsOpenParen(value, scan)) count += 1; if (IsCloseParen(value, scan)) count -= 1; if (count === 0) return [index, scan]; } throw new TemplateLiteralParserError(`TemplateLiteralParser: Unclosed group parens in expression`); } function Range$1(pattern$1, index) { for (let scan = index; scan < pattern$1.length; scan++) { if (IsOpenParen(pattern$1, scan)) return [index, scan]; } return [index, pattern$1.length]; } const expressions = []; for (let index = 0; index < pattern.length; index++) { if (IsOpenParen(pattern, index)) { const [start, end] = Group$1(pattern, index); const range = pattern.slice(start, end + 1); expressions.push(TemplateLiteralParse(range)); index = end; } else { const [start, end] = Range$1(pattern, index); const range = pattern.slice(start, end); if (range.length > 0) expressions.push(TemplateLiteralParse(range)); index = end - 1; } } return expressions.length === 0 ? { type: "const", const: "" } : expressions.length === 1 ? expressions[0] : { type: "and", expr: expressions }; } /** Parses a pattern and returns an expression tree */ function TemplateLiteralParse(pattern) { return IsGroup(pattern) ? TemplateLiteralParse(InGroup(pattern)) : IsPrecedenceOr(pattern) ? Or(pattern) : IsPrecedenceAnd(pattern) ? And(pattern) : { type: "const", const: Unescape(pattern) }; } /** Parses a pattern and strips forward and trailing ^ and $ */ function TemplateLiteralParseExact(pattern) { return TemplateLiteralParse(pattern.slice(1, pattern.length - 1)); } var TemplateLiteralParserError; var init_parse$1 = __esmMin((() => { init_error(); TemplateLiteralParserError = class extends TypeBoxError {}; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/template-literal/finite.mjs function IsNumberExpression(expression) { return expression.type === "or" && expression.expr.length === 2 && expression.expr[0].type === "const" && expression.expr[0].const === "0" && expression.expr[1].type === "const" && expression.expr[1].const === "[1-9][0-9]*"; } function IsBooleanExpression(expression) { return expression.type === "or" && expression.expr.length === 2 && expression.expr[0].type === "const" && expression.expr[0].const === "true" && expression.expr[1].type === "const" && expression.expr[1].const === "false"; } function IsStringExpression(expression) { return expression.type === "const" && expression.const === ".*"; } function IsTemplateLiteralExpressionFinite(expression) { return IsNumberExpression(expression) || IsStringExpression(expression) ? false : IsBooleanExpression(expression) ? true : expression.type === "and" ? expression.expr.every((expr) => IsTemplateLiteralExpressionFinite(expr)) : expression.type === "or" ? expression.expr.every((expr) => IsTemplateLiteralExpressionFinite(expr)) : expression.type === "const" ? true : (() => { throw new TemplateLiteralFiniteError(`Unknown expression type`); })(); } /** Returns true if this TemplateLiteral resolves to a finite set of values */ function IsTemplateLiteralFinite(schema) { const expression = TemplateLiteralParseExact(schema.pattern); return IsTemplateLiteralExpressionFinite(expression); } var TemplateLiteralFiniteError; var init_finite = __esmMin((() => { init_parse$1(); init_error(); TemplateLiteralFiniteError = class extends TypeBoxError {}; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/template-literal/generate.mjs function* GenerateReduce(buffer) { if (buffer.length === 1) return yield* buffer[0]; for (const left of buffer[0]) { for (const right of GenerateReduce(buffer.slice(1))) { yield `${left}${right}`; } } } function* GenerateAnd(expression) { return yield* GenerateReduce(expression.expr.map((expr) => [...TemplateLiteralExpressionGenerate(expr)])); } function* GenerateOr(expression) { for (const expr of expression.expr) yield* TemplateLiteralExpressionGenerate(expr); } function* GenerateConst(expression) { return yield expression.const; } function* TemplateLiteralExpressionGenerate(expression) { return expression.type === "and" ? yield* GenerateAnd(expression) : expression.type === "or" ? yield* GenerateOr(expression) : expression.type === "const" ? yield* GenerateConst(expression) : (() => { throw new TemplateLiteralGenerateError("Unknown expression"); })(); } /** Generates a tuple of strings from the given TemplateLiteral. Returns an empty tuple if infinite. */ function TemplateLiteralGenerate(schema) { const expression = TemplateLiteralParseExact(schema.pattern); return IsTemplateLiteralExpressionFinite(expression) ? [...TemplateLiteralExpressionGenerate(expression)] : []; } var TemplateLiteralGenerateError; var init_generate = __esmMin((() => { init_finite(); init_parse$1(); init_error(); TemplateLiteralGenerateError = class extends TypeBoxError {}; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/literal/literal.mjs /** `[Json]` Creates a Literal type */ function Literal(value, options) { return CreateType({ [Kind]: "Literal", const: value, type: typeof value }, options); } var init_literal$1 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/literal/index.mjs var init_literal = __esmMin((() => { init_literal$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/boolean/boolean.mjs /** `[Json]` Creates a Boolean type */ function Boolean$1(options) { return CreateType({ [Kind]: "Boolean", type: "boolean" }, options); } var init_boolean$1 = __esmMin((() => { init_symbols(); init_create$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/boolean/index.mjs var init_boolean = __esmMin((() => { init_boolean$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/bigint/bigint.mjs /** `[JavaScript]` Creates a BigInt type */ function BigInt(options) { return CreateType({ [Kind]: "BigInt", type: "bigint" }, options); } var init_bigint$1 = __esmMin((() => { init_symbols(); init_create$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/bigint/index.mjs var init_bigint = __esmMin((() => { init_bigint$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/number/number.mjs /** `[Json]` Creates a Number type */ function Number$1(options) { return CreateType({ [Kind]: "Number", type: "number" }, options); } var init_number$1 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/number/index.mjs var init_number = __esmMin((() => { init_number$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/string/string.mjs /** `[Json]` Creates a String type */ function String$1(options) { return CreateType({ [Kind]: "String", type: "string" }, options); } var init_string$2 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/string/index.mjs var init_string$1 = __esmMin((() => { init_string$2(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/template-literal/syntax.mjs function* FromUnion$9(syntax) { const trim = syntax.trim().replace(/"|'/g, ""); return trim === "boolean" ? yield Boolean$1() : trim === "number" ? yield Number$1() : trim === "bigint" ? yield BigInt() : trim === "string" ? yield String$1() : yield (() => { const literals$1 = trim.split("|").map((literal) => Literal(literal.trim())); return literals$1.length === 0 ? Never() : literals$1.length === 1 ? literals$1[0] : UnionEvaluated(literals$1); })(); } function* FromTerminal(syntax) { if (syntax[1] !== "{") { const L$2 = Literal("$"); const R$1 = FromSyntax(syntax.slice(1)); return yield* [L$2, ...R$1]; } for (let i$7 = 2; i$7 < syntax.length; i$7++) { if (syntax[i$7] === "}") { const L$2 = FromUnion$9(syntax.slice(2, i$7)); const R$1 = FromSyntax(syntax.slice(i$7 + 1)); return yield* [...L$2, ...R$1]; } } yield Literal(syntax); } function* FromSyntax(syntax) { for (let i$7 = 0; i$7 < syntax.length; i$7++) { if (syntax[i$7] === "$") { const L$2 = Literal(syntax.slice(0, i$7)); const R$1 = FromTerminal(syntax.slice(i$7)); return yield* [L$2, ...R$1]; } } yield Literal(syntax); } /** Parses TemplateLiteralSyntax and returns a tuple of TemplateLiteralKinds */ function TemplateLiteralSyntax(syntax) { return [...FromSyntax(syntax)]; } var init_syntax = __esmMin((() => { init_literal(); init_boolean(); init_bigint(); init_number(); init_string$1(); init_union$1(); init_never(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/template-literal/pattern.mjs function Escape(value) { return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); } function Visit$1(schema, acc) { return IsTemplateLiteral(schema) ? schema.pattern.slice(1, schema.pattern.length - 1) : IsUnion(schema) ? `(${schema.anyOf.map((schema$1) => Visit$1(schema$1, acc)).join("|")})` : IsNumber(schema) ? `${acc}${PatternNumber}` : IsInteger(schema) ? `${acc}${PatternNumber}` : IsBigInt$1(schema) ? `${acc}${PatternNumber}` : IsString$1(schema) ? `${acc}${PatternString}` : IsLiteral(schema) ? `${acc}${Escape(schema.const.toString())}` : IsBoolean(schema) ? `${acc}${PatternBoolean}` : (() => { throw new TemplateLiteralPatternError(`Unexpected Kind '${schema[Kind]}'`); })(); } function TemplateLiteralPattern(kinds) { return `^${kinds.map((schema) => Visit$1(schema, "")).join("")}\$`; } var TemplateLiteralPatternError; var init_pattern = __esmMin((() => { init_patterns(); init_symbols(); init_error(); init_kind(); TemplateLiteralPatternError = class extends TypeBoxError {}; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/template-literal/union.mjs /** Returns a Union from the given TemplateLiteral */ function TemplateLiteralToUnion(schema) { const R$1 = TemplateLiteralGenerate(schema); const L$2 = R$1.map((S$4) => Literal(S$4)); return UnionEvaluated(L$2); } var init_union = __esmMin((() => { init_union$1(); init_literal(); init_generate(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/template-literal/template-literal.mjs /** `[Json]` Creates a TemplateLiteral type */ function TemplateLiteral(unresolved, options) { const pattern = IsString(unresolved) ? TemplateLiteralPattern(TemplateLiteralSyntax(unresolved)) : TemplateLiteralPattern(unresolved); return CreateType({ [Kind]: "TemplateLiteral", type: "string", pattern }, options); } var init_template_literal$1 = __esmMin((() => { init_type$4(); init_syntax(); init_pattern(); init_value$1(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/template-literal/index.mjs var init_template_literal = __esmMin((() => { init_finite(); init_generate(); init_syntax(); init_parse$1(); init_pattern(); init_union(); init_template_literal$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/indexed/indexed-property-keys.mjs function FromTemplateLiteral$2(templateLiteral) { const keys$1 = TemplateLiteralGenerate(templateLiteral); return keys$1.map((key) => key.toString()); } function FromUnion$8(types) { const result = []; for (const type of types) result.push(...IndexPropertyKeys(type)); return result; } function FromLiteral$1(literalValue) { return [literalValue.toString()]; } /** Returns a tuple of PropertyKeys derived from the given TSchema */ function IndexPropertyKeys(type) { return [...new Set(IsTemplateLiteral(type) ? FromTemplateLiteral$2(type) : IsUnion(type) ? FromUnion$8(type.anyOf) : IsLiteral(type) ? FromLiteral$1(type.const) : IsNumber(type) ? ["[number]"] : IsInteger(type) ? ["[number]"] : [])]; } var init_indexed_property_keys = __esmMin((() => { init_template_literal(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-result.mjs function FromProperties$18(type, properties$1, options) { const result = {}; for (const K2 of Object.getOwnPropertyNames(properties$1)) { result[K2] = Index(type, IndexPropertyKeys(properties$1[K2]), options); } return result; } function FromMappedResult$11(type, mappedResult, options) { return FromProperties$18(type, mappedResult.properties, options); } function IndexFromMappedResult(type, mappedResult, options) { const properties$1 = FromMappedResult$11(type, mappedResult, options); return MappedResult(properties$1); } var init_indexed_from_mapped_result = __esmMin((() => { init_mapped(); init_indexed_property_keys(); init_indexed(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/indexed/indexed.mjs function FromRest$6(types, key) { return types.map((type) => IndexFromPropertyKey(type, key)); } function FromIntersectRest(types) { return types.filter((type) => !IsNever(type)); } function FromIntersect$7(types, key) { return IntersectEvaluated(FromIntersectRest(FromRest$6(types, key))); } function FromUnionRest(types) { return types.some((L$2) => IsNever(L$2)) ? [] : types; } function FromUnion$7(types, key) { return UnionEvaluated(FromUnionRest(FromRest$6(types, key))); } function FromTuple$4(types, key) { return key in types ? types[key] : key === "[number]" ? UnionEvaluated(types) : Never(); } function FromArray$5(type, key) { return key === "[number]" ? type : Never(); } function FromProperty$2(properties$1, propertyKey) { return propertyKey in properties$1 ? properties$1[propertyKey] : Never(); } function IndexFromPropertyKey(type, propertyKey) { return IsIntersect(type) ? FromIntersect$7(type.allOf, propertyKey) : IsUnion(type) ? FromUnion$7(type.anyOf, propertyKey) : IsTuple(type) ? FromTuple$4(type.items ?? [], propertyKey) : IsArray$1(type) ? FromArray$5(type.items, propertyKey) : IsObject(type) ? FromProperty$2(type.properties, propertyKey) : Never(); } function IndexFromPropertyKeys(type, propertyKeys) { return propertyKeys.map((propertyKey) => IndexFromPropertyKey(type, propertyKey)); } function FromSchema(type, propertyKeys) { return UnionEvaluated(IndexFromPropertyKeys(type, propertyKeys)); } function IndexFromComputed(type, key) { return Computed("Index", [type, key]); } /** `[Json]` Returns an Indexed property type for the given keys */ function Index(type, key, options) { if (IsRef(type) || IsRef(key)) { const error$2 = `Index types using Ref parameters require both Type and Key to be of TSchema`; if (!IsSchema(type) || !IsSchema(key)) throw new TypeBoxError(error$2); return Computed("Index", [type, key]); } if (IsMappedResult(key)) return IndexFromMappedResult(type, key, options); if (IsMappedKey(key)) return IndexFromMappedKey(type, key, options); return CreateType(IsSchema(key) ? FromSchema(type, IndexPropertyKeys(key)) : FromSchema(type, key), options); } var init_indexed$1 = __esmMin((() => { init_type$4(); init_error(); init_computed(); init_never(); init_intersect(); init_union$1(); init_indexed_property_keys(); init_indexed_from_mapped_key(); init_indexed_from_mapped_result(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-key.mjs function MappedIndexPropertyKey(type, key, options) { return { [key]: Index(type, [key], Clone(options)) }; } function MappedIndexPropertyKeys(type, propertyKeys, options) { return propertyKeys.reduce((result, left) => { return { ...result, ...MappedIndexPropertyKey(type, left, options) }; }, {}); } function MappedIndexProperties(type, mappedKey, options) { return MappedIndexPropertyKeys(type, mappedKey.keys, options); } function IndexFromMappedKey(type, mappedKey, options) { const properties$1 = MappedIndexProperties(type, mappedKey, options); return MappedResult(properties$1); } var init_indexed_from_mapped_key = __esmMin((() => { init_indexed$1(); init_mapped(); init_value(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/indexed/index.mjs var init_indexed = __esmMin((() => { init_indexed_from_mapped_key(); init_indexed_from_mapped_result(); init_indexed_property_keys(); init_indexed$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/iterator/iterator.mjs /** `[JavaScript]` Creates an Iterator type */ function Iterator(items, options) { return CreateType({ [Kind]: "Iterator", type: "Iterator", items }, options); } var init_iterator$1 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/iterator/index.mjs var init_iterator = __esmMin((() => { init_iterator$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/object/object.mjs function RequiredKeys(properties$1) { const keys$1 = []; for (let key in properties$1) { if (!IsOptional(properties$1[key])) keys$1.push(key); } return keys$1; } /** `[Json]` Creates an Object type */ function _Object(properties$1, options) { const required = RequiredKeys(properties$1); const schematic = required.length > 0 ? { [Kind]: "Object", type: "object", properties: properties$1, required } : { [Kind]: "Object", type: "object", properties: properties$1 }; return CreateType(schematic, options); } var Object$1; var init_object$1 = __esmMin((() => { init_type$4(); init_symbols(); init_kind(); Object$1 = _Object; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/object/index.mjs var init_object = __esmMin((() => { init_object$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/promise/promise.mjs /** `[JavaScript]` Creates a Promise type */ function Promise$1(item, options) { return CreateType({ [Kind]: "Promise", type: "Promise", item }, options); } var init_promise$1 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/promise/index.mjs var init_promise = __esmMin((() => { init_promise$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/readonly/readonly.mjs function RemoveReadonly(schema) { return CreateType(Discard(schema, [ReadonlyKind])); } function AddReadonly(schema) { return CreateType({ ...schema, [ReadonlyKind]: "Readonly" }); } function ReadonlyWithFlag(schema, F$1) { return F$1 === false ? RemoveReadonly(schema) : AddReadonly(schema); } /** `[Json]` Creates a Readonly property */ function Readonly(schema, enable) { const F$1 = enable ?? true; return IsMappedResult(schema) ? ReadonlyFromMappedResult(schema, F$1) : ReadonlyWithFlag(schema, F$1); } var init_readonly$1 = __esmMin((() => { init_type$4(); init_symbols(); init_discard(); init_readonly_from_mapped_result(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/readonly/readonly-from-mapped-result.mjs function FromProperties$17(K$1, F$1) { const Acc = {}; for (const K2 of globalThis.Object.getOwnPropertyNames(K$1)) Acc[K2] = Readonly(K$1[K2], F$1); return Acc; } function FromMappedResult$10(R$1, F$1) { return FromProperties$17(R$1.properties, F$1); } function ReadonlyFromMappedResult(R$1, F$1) { const P$2 = FromMappedResult$10(R$1, F$1); return MappedResult(P$2); } var init_readonly_from_mapped_result = __esmMin((() => { init_mapped(); init_readonly$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/readonly/index.mjs var init_readonly = __esmMin((() => { init_readonly_from_mapped_result(); init_readonly$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/tuple/tuple.mjs /** `[Json]` Creates a Tuple type */ function Tuple(types, options) { return CreateType(types.length > 0 ? { [Kind]: "Tuple", type: "array", items: types, additionalItems: false, minItems: types.length, maxItems: types.length } : { [Kind]: "Tuple", type: "array", minItems: types.length, maxItems: types.length }, options); } var init_tuple$1 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/tuple/index.mjs var init_tuple = __esmMin((() => { init_tuple$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/mapped/mapped.mjs function FromMappedResult$9(K$1, P$2) { return K$1 in P$2 ? FromSchemaType(K$1, P$2[K$1]) : MappedResult(P$2); } function MappedKeyToKnownMappedResultProperties(K$1) { return { [K$1]: Literal(K$1) }; } function MappedKeyToUnknownMappedResultProperties(P$2) { const Acc = {}; for (const L$2 of P$2) Acc[L$2] = Literal(L$2); return Acc; } function MappedKeyToMappedResultProperties(K$1, P$2) { return SetIncludes(P$2, K$1) ? MappedKeyToKnownMappedResultProperties(K$1) : MappedKeyToUnknownMappedResultProperties(P$2); } function FromMappedKey$3(K$1, P$2) { const R$1 = MappedKeyToMappedResultProperties(K$1, P$2); return FromMappedResult$9(K$1, R$1); } function FromRest$5(K$1, T$3) { return T$3.map((L$2) => FromSchemaType(K$1, L$2)); } function FromProperties$16(K$1, T$3) { const Acc = {}; for (const K2 of globalThis.Object.getOwnPropertyNames(T$3)) Acc[K2] = FromSchemaType(K$1, T$3[K2]); return Acc; } function FromSchemaType(K$1, T$3) { const options = { ...T$3 }; return IsOptional(T$3) ? Optional(FromSchemaType(K$1, Discard(T$3, [OptionalKind]))) : IsReadonly(T$3) ? Readonly(FromSchemaType(K$1, Discard(T$3, [ReadonlyKind]))) : IsMappedResult(T$3) ? FromMappedResult$9(K$1, T$3.properties) : IsMappedKey(T$3) ? FromMappedKey$3(K$1, T$3.keys) : IsConstructor(T$3) ? Constructor(FromRest$5(K$1, T$3.parameters), FromSchemaType(K$1, T$3.returns), options) : IsFunction$1(T$3) ? Function$1(FromRest$5(K$1, T$3.parameters), FromSchemaType(K$1, T$3.returns), options) : IsAsyncIterator$1(T$3) ? AsyncIterator(FromSchemaType(K$1, T$3.items), options) : IsIterator$1(T$3) ? Iterator(FromSchemaType(K$1, T$3.items), options) : IsIntersect(T$3) ? Intersect(FromRest$5(K$1, T$3.allOf), options) : IsUnion(T$3) ? Union(FromRest$5(K$1, T$3.anyOf), options) : IsTuple(T$3) ? Tuple(FromRest$5(K$1, T$3.items ?? []), options) : IsObject(T$3) ? Object$1(FromProperties$16(K$1, T$3.properties), options) : IsArray$1(T$3) ? Array$1(FromSchemaType(K$1, T$3.items), options) : IsPromise(T$3) ? Promise$1(FromSchemaType(K$1, T$3.item), options) : T$3; } function MappedFunctionReturnType(K$1, T$3) { const Acc = {}; for (const L$2 of K$1) Acc[L$2] = FromSchemaType(L$2, T$3); return Acc; } /** `[Json]` Creates a Mapped object type */ function Mapped(key, map$2, options) { const K$1 = IsSchema(key) ? IndexPropertyKeys(key) : key; const RT = map$2({ [Kind]: "MappedKey", keys: K$1 }); const R$1 = MappedFunctionReturnType(K$1, RT); return Object$1(R$1, options); } var init_mapped$1 = __esmMin((() => { init_symbols(); init_discard(); init_array$1(); init_async_iterator(); init_constructor(); init_function(); init_indexed(); init_intersect(); init_iterator(); init_literal(); init_object(); init_optional(); init_promise(); init_readonly(); init_tuple(); init_union$1(); init_sets(); init_mapped_result(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/mapped/index.mjs var init_mapped = __esmMin((() => { init_mapped_key(); init_mapped_result(); init_mapped$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/optional/optional.mjs function RemoveOptional(schema) { return CreateType(Discard(schema, [OptionalKind])); } function AddOptional(schema) { return CreateType({ ...schema, [OptionalKind]: "Optional" }); } function OptionalWithFlag(schema, F$1) { return F$1 === false ? RemoveOptional(schema) : AddOptional(schema); } /** `[Json]` Creates a Optional property */ function Optional(schema, enable) { const F$1 = enable ?? true; return IsMappedResult(schema) ? OptionalFromMappedResult(schema, F$1) : OptionalWithFlag(schema, F$1); } var init_optional$1 = __esmMin((() => { init_type$4(); init_symbols(); init_discard(); init_optional_from_mapped_result(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/optional/optional-from-mapped-result.mjs function FromProperties$15(P$2, F$1) { const Acc = {}; for (const K2 of globalThis.Object.getOwnPropertyNames(P$2)) Acc[K2] = Optional(P$2[K2], F$1); return Acc; } function FromMappedResult$8(R$1, F$1) { return FromProperties$15(R$1.properties, F$1); } function OptionalFromMappedResult(R$1, F$1) { const P$2 = FromMappedResult$8(R$1, F$1); return MappedResult(P$2); } var init_optional_from_mapped_result = __esmMin((() => { init_mapped(); init_optional$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/optional/index.mjs var init_optional = __esmMin((() => { init_optional_from_mapped_result(); init_optional$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/intersect/intersect-create.mjs function IntersectCreate(T$3, options = {}) { const allObjects = T$3.every((schema) => IsObject(schema)); const clonedUnevaluatedProperties = IsSchema(options.unevaluatedProperties) ? { unevaluatedProperties: options.unevaluatedProperties } : {}; return CreateType(options.unevaluatedProperties === false || IsSchema(options.unevaluatedProperties) || allObjects ? { ...clonedUnevaluatedProperties, [Kind]: "Intersect", type: "object", allOf: T$3 } : { ...clonedUnevaluatedProperties, [Kind]: "Intersect", allOf: T$3 }, options); } var init_intersect_create = __esmMin((() => { init_type$4(); init_symbols(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/intersect/intersect-evaluated.mjs function IsIntersectOptional(types) { return types.every((left) => IsOptional(left)); } function RemoveOptionalFromType(type) { return Discard(type, [OptionalKind]); } function RemoveOptionalFromRest(types) { return types.map((left) => IsOptional(left) ? RemoveOptionalFromType(left) : left); } function ResolveIntersect(types, options) { return IsIntersectOptional(types) ? Optional(IntersectCreate(RemoveOptionalFromRest(types), options)) : IntersectCreate(RemoveOptionalFromRest(types), options); } /** `[Json]` Creates an evaluated Intersect type */ function IntersectEvaluated(types, options = {}) { if (types.length === 1) return CreateType(types[0], options); if (types.length === 0) return Never(options); if (types.some((schema) => IsTransform(schema))) throw new Error("Cannot intersect transform types"); return ResolveIntersect(types, options); } var init_intersect_evaluated = __esmMin((() => { init_symbols(); init_type$4(); init_discard(); init_never(); init_optional(); init_intersect_create(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/intersect/intersect-type.mjs var init_intersect_type = __esmMin((() => { init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/intersect/intersect.mjs /** `[Json]` Creates an evaluated Intersect type */ function Intersect(types, options) { if (types.length === 1) return CreateType(types[0], options); if (types.length === 0) return Never(options); if (types.some((schema) => IsTransform(schema))) throw new Error("Cannot intersect transform types"); return IntersectCreate(types, options); } var init_intersect$1 = __esmMin((() => { init_type$4(); init_never(); init_intersect_create(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/intersect/index.mjs var init_intersect = __esmMin((() => { init_intersect_evaluated(); init_intersect_type(); init_intersect$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/ref/ref.mjs /** `[Json]` Creates a Ref type. The referenced type must contain a $id */ function Ref(...args) { const [$ref, options] = typeof args[0] === "string" ? [args[0], args[1]] : [args[0].$id, args[1]]; if (typeof $ref !== "string") throw new TypeBoxError("Ref: $ref must be a string"); return CreateType({ [Kind]: "Ref", $ref }, options); } var init_ref$1 = __esmMin((() => { init_error(); init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/ref/index.mjs var init_ref = __esmMin((() => { init_ref$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/awaited/awaited.mjs function FromComputed$4(target, parameters) { return Computed("Awaited", [Computed(target, parameters)]); } function FromRef$3($ref) { return Computed("Awaited", [Ref($ref)]); } function FromIntersect$6(types) { return Intersect(FromRest$4(types)); } function FromUnion$6(types) { return Union(FromRest$4(types)); } function FromPromise$2(type) { return Awaited(type); } function FromRest$4(types) { return types.map((type) => Awaited(type)); } /** `[JavaScript]` Constructs a type by recursively unwrapping Promise types */ function Awaited(type, options) { return CreateType(IsComputed(type) ? FromComputed$4(type.target, type.parameters) : IsIntersect(type) ? FromIntersect$6(type.allOf) : IsUnion(type) ? FromUnion$6(type.anyOf) : IsPromise(type) ? FromPromise$2(type.item) : IsRef(type) ? FromRef$3(type.$ref) : type, options); } var init_awaited$1 = __esmMin((() => { init_type$4(); init_computed(); init_intersect(); init_union$1(); init_ref(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/awaited/index.mjs var init_awaited = __esmMin((() => { init_awaited$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/keyof/keyof-property-keys.mjs function FromRest$3(types) { const result = []; for (const L$2 of types) result.push(KeyOfPropertyKeys(L$2)); return result; } function FromIntersect$5(types) { const propertyKeysArray = FromRest$3(types); const propertyKeys = SetUnionMany(propertyKeysArray); return propertyKeys; } function FromUnion$5(types) { const propertyKeysArray = FromRest$3(types); const propertyKeys = SetIntersectMany(propertyKeysArray); return propertyKeys; } function FromTuple$3(types) { return types.map((_$2, indexer) => indexer.toString()); } function FromArray$4(_$2) { return ["[number]"]; } function FromProperties$14(T$3) { return globalThis.Object.getOwnPropertyNames(T$3); } function FromPatternProperties(patternProperties) { if (!includePatternProperties) return []; const patternPropertyKeys = globalThis.Object.getOwnPropertyNames(patternProperties); return patternPropertyKeys.map((key) => { return key[0] === "^" && key[key.length - 1] === "$" ? key.slice(1, key.length - 1) : key; }); } /** Returns a tuple of PropertyKeys derived from the given TSchema. */ function KeyOfPropertyKeys(type) { return IsIntersect(type) ? FromIntersect$5(type.allOf) : IsUnion(type) ? FromUnion$5(type.anyOf) : IsTuple(type) ? FromTuple$3(type.items ?? []) : IsArray$1(type) ? FromArray$4(type.items) : IsObject(type) ? FromProperties$14(type.properties) : IsRecord(type) ? FromPatternProperties(type.patternProperties) : []; } /** Returns a regular expression pattern derived from the given TSchema */ function KeyOfPattern(schema) { includePatternProperties = true; const keys$1 = KeyOfPropertyKeys(schema); includePatternProperties = false; const pattern = keys$1.map((key) => `(${key})`); return `^(${pattern.join("|")})$`; } var includePatternProperties; var init_keyof_property_keys = __esmMin((() => { init_sets(); init_kind(); includePatternProperties = false; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/keyof/keyof.mjs function FromComputed$3(target, parameters) { return Computed("KeyOf", [Computed(target, parameters)]); } function FromRef$2($ref) { return Computed("KeyOf", [Ref($ref)]); } function KeyOfFromType(type, options) { const propertyKeys = KeyOfPropertyKeys(type); const propertyKeyTypes = KeyOfPropertyKeysToRest(propertyKeys); const result = UnionEvaluated(propertyKeyTypes); return CreateType(result, options); } function KeyOfPropertyKeysToRest(propertyKeys) { return propertyKeys.map((L$2) => L$2 === "[number]" ? Number$1() : Literal(L$2)); } /** `[Json]` Creates a KeyOf type */ function KeyOf(type, options) { return IsComputed(type) ? FromComputed$3(type.target, type.parameters) : IsRef(type) ? FromRef$2(type.$ref) : IsMappedResult(type) ? KeyOfFromMappedResult(type, options) : KeyOfFromType(type, options); } var init_keyof$1 = __esmMin((() => { init_type$4(); init_literal(); init_number(); init_computed(); init_ref(); init_keyof_property_keys(); init_union$1(); init_keyof_from_mapped_result(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/keyof/keyof-from-mapped-result.mjs function FromProperties$13(properties$1, options) { const result = {}; for (const K2 of globalThis.Object.getOwnPropertyNames(properties$1)) result[K2] = KeyOf(properties$1[K2], Clone(options)); return result; } function FromMappedResult$7(mappedResult, options) { return FromProperties$13(mappedResult.properties, options); } function KeyOfFromMappedResult(mappedResult, options) { const properties$1 = FromMappedResult$7(mappedResult, options); return MappedResult(properties$1); } var init_keyof_from_mapped_result = __esmMin((() => { init_mapped(); init_keyof$1(); init_value(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/keyof/keyof-property-entries.mjs /** * `[Utility]` Resolves an array of keys and schemas from the given schema. This method is faster * than obtaining the keys and resolving each individually via indexing. This method was written * accellerate Intersect and Union encoding. */ function KeyOfPropertyEntries(schema) { const keys$1 = KeyOfPropertyKeys(schema); const schemas = IndexFromPropertyKeys(schema, keys$1); return keys$1.map((_$2, index) => [keys$1[index], schemas[index]]); } var init_keyof_property_entries = __esmMin((() => { init_indexed$1(); init_keyof_property_keys(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/keyof/index.mjs var init_keyof = __esmMin((() => { init_keyof_from_mapped_result(); init_keyof_property_entries(); init_keyof_property_keys(); init_keyof$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/composite/composite.mjs function CompositeKeys(T$3) { const Acc = []; for (const L$2 of T$3) Acc.push(...KeyOfPropertyKeys(L$2)); return SetDistinct(Acc); } function FilterNever(T$3) { return T$3.filter((L$2) => !IsNever(L$2)); } function CompositeProperty(T$3, K$1) { const Acc = []; for (const L$2 of T$3) Acc.push(...IndexFromPropertyKeys(L$2, [K$1])); return FilterNever(Acc); } function CompositeProperties(T$3, K$1) { const Acc = {}; for (const L$2 of K$1) { Acc[L$2] = IntersectEvaluated(CompositeProperty(T$3, L$2)); } return Acc; } function Composite(T$3, options) { const K$1 = CompositeKeys(T$3); const P$2 = CompositeProperties(T$3, K$1); const R$1 = Object$1(P$2, options); return R$1; } var init_composite$1 = __esmMin((() => { init_intersect(); init_indexed(); init_keyof(); init_object(); init_sets(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/composite/index.mjs var init_composite = __esmMin((() => { init_composite$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/date/date.mjs /** `[JavaScript]` Creates a Date type */ function Date$1(options) { return CreateType({ [Kind]: "Date", type: "Date" }, options); } var init_date$1 = __esmMin((() => { init_symbols(); init_type$4(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/date/index.mjs var init_date = __esmMin((() => { init_date$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/null/null.mjs /** `[Json]` Creates a Null type */ function Null(options) { return CreateType({ [Kind]: "Null", type: "null" }, options); } var init_null$1 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/null/index.mjs var init_null = __esmMin((() => { init_null$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/symbol/symbol.mjs /** `[JavaScript]` Creates a Symbol type */ function Symbol$1(options) { return CreateType({ [Kind]: "Symbol", type: "symbol" }, options); } var init_symbol$1 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/symbol/index.mjs var init_symbol = __esmMin((() => { init_symbol$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/undefined/undefined.mjs /** `[JavaScript]` Creates a Undefined type */ function Undefined(options) { return CreateType({ [Kind]: "Undefined", type: "undefined" }, options); } var init_undefined$1 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/undefined/index.mjs var init_undefined = __esmMin((() => { init_undefined$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/uint8array/uint8array.mjs /** `[JavaScript]` Creates a Uint8Array type */ function Uint8Array$1(options) { return CreateType({ [Kind]: "Uint8Array", type: "Uint8Array" }, options); } var init_uint8array$1 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/uint8array/index.mjs var init_uint8array = __esmMin((() => { init_uint8array$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/unknown/unknown.mjs /** `[Json]` Creates an Unknown type */ function Unknown(options) { return CreateType({ [Kind]: "Unknown" }, options); } var init_unknown$1 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/unknown/index.mjs var init_unknown = __esmMin((() => { init_unknown$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/const/const.mjs function FromArray$3(T$3) { return T$3.map((L$2) => FromValue(L$2, false)); } function FromProperties$12(value) { const Acc = {}; for (const K$1 of globalThis.Object.getOwnPropertyNames(value)) Acc[K$1] = Readonly(FromValue(value[K$1], false)); return Acc; } function ConditionalReadonly(T$3, root) { return root === true ? T$3 : Readonly(T$3); } function FromValue(value, root) { return IsAsyncIterator(value) ? ConditionalReadonly(Any(), root) : IsIterator(value) ? ConditionalReadonly(Any(), root) : IsArray(value) ? Readonly(Tuple(FromArray$3(value))) : IsUint8Array(value) ? Uint8Array$1() : IsDate(value) ? Date$1() : IsObject$1(value) ? ConditionalReadonly(Object$1(FromProperties$12(value)), root) : IsFunction(value) ? ConditionalReadonly(Function$1([], Unknown()), root) : IsUndefined(value) ? Undefined() : IsNull(value) ? Null() : IsSymbol(value) ? Symbol$1() : IsBigInt(value) ? BigInt() : IsNumber$1(value) ? Literal(value) : IsBoolean$1(value) ? Literal(value) : IsString(value) ? Literal(value) : Object$1({}); } /** `[JavaScript]` Creates a readonly const type from the given value. */ function Const(T$3, options) { return CreateType(FromValue(T$3, true), options); } var init_const$1 = __esmMin((() => { init_any(); init_bigint(); init_date(); init_function(); init_literal(); init_null(); init_object(); init_symbol(); init_tuple(); init_readonly(); init_undefined(); init_uint8array(); init_unknown(); init_create$1(); init_value$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/const/index.mjs var init_const = __esmMin((() => { init_const$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/constructor-parameters/constructor-parameters.mjs /** `[JavaScript]` Extracts the ConstructorParameters from the given Constructor type */ function ConstructorParameters(schema, options) { return IsConstructor(schema) ? Tuple(schema.parameters, options) : Never(options); } var init_constructor_parameters$1 = __esmMin((() => { init_tuple(); init_never(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/constructor-parameters/index.mjs var init_constructor_parameters = __esmMin((() => { init_constructor_parameters$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/enum/enum.mjs /** `[Json]` Creates a Enum type */ function Enum(item, options) { if (IsUndefined(item)) throw new Error("Enum undefined or empty"); const values1 = globalThis.Object.getOwnPropertyNames(item).filter((key) => isNaN(key)).map((key) => item[key]); const values2 = [...new Set(values1)]; const anyOf = values2.map((value) => Literal(value)); return Union(anyOf, { ...options, [Hint]: "Enum" }); } var init_enum$1 = __esmMin((() => { init_literal(); init_symbols(); init_union$1(); init_value$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/enum/index.mjs var init_enum = __esmMin((() => { init_enum$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/extends/extends-check.mjs function IntoBooleanResult(result) { return result === ExtendsResult.False ? result : ExtendsResult.True; } function Throw(message) { throw new ExtendsResolverError(message); } function IsStructuralRight(right) { return IsNever$1(right) || IsIntersect$1(right) || IsUnion$1(right) || IsUnknown(right) || IsAny$1(right); } function StructuralRight(left, right) { return IsNever$1(right) ? FromNeverRight(left, right) : IsIntersect$1(right) ? FromIntersectRight(left, right) : IsUnion$1(right) ? FromUnionRight(left, right) : IsUnknown(right) ? FromUnknownRight(left, right) : IsAny$1(right) ? FromAnyRight(left, right) : Throw("StructuralRight"); } function FromAnyRight(left, right) { return ExtendsResult.True; } function FromAny(left, right) { return IsIntersect$1(right) ? FromIntersectRight(left, right) : IsUnion$1(right) && right.anyOf.some((schema) => IsAny$1(schema) || IsUnknown(schema)) ? ExtendsResult.True : IsUnion$1(right) ? ExtendsResult.Union : IsUnknown(right) ? ExtendsResult.True : IsAny$1(right) ? ExtendsResult.True : ExtendsResult.Union; } function FromArrayRight(left, right) { return IsUnknown(left) ? ExtendsResult.False : IsAny$1(left) ? ExtendsResult.Union : IsNever$1(left) ? ExtendsResult.True : ExtendsResult.False; } function FromArray$2(left, right) { return IsObject$2(right) && IsObjectArrayLike(right) ? ExtendsResult.True : IsStructuralRight(right) ? StructuralRight(left, right) : !IsArray$2(right) ? ExtendsResult.False : IntoBooleanResult(Visit(left.items, right.items)); } function FromAsyncIterator$2(left, right) { return IsStructuralRight(right) ? StructuralRight(left, right) : !IsAsyncIterator$2(right) ? ExtendsResult.False : IntoBooleanResult(Visit(left.items, right.items)); } function FromBigInt(left, right) { return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$2(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsBigInt$2(right) ? ExtendsResult.True : ExtendsResult.False; } function FromBooleanRight(left, right) { return IsLiteralBoolean(left) ? ExtendsResult.True : IsBoolean$2(left) ? ExtendsResult.True : ExtendsResult.False; } function FromBoolean(left, right) { return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$2(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsBoolean$2(right) ? ExtendsResult.True : ExtendsResult.False; } function FromConstructor$2(left, right) { return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$2(right) ? FromObjectRight(left, right) : !IsConstructor$1(right) ? ExtendsResult.False : left.parameters.length > right.parameters.length ? ExtendsResult.False : !left.parameters.every((schema, index) => IntoBooleanResult(Visit(right.parameters[index], schema)) === ExtendsResult.True) ? ExtendsResult.False : IntoBooleanResult(Visit(left.returns, right.returns)); } function FromDate(left, right) { return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$2(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsDate$1(right) ? ExtendsResult.True : ExtendsResult.False; } function FromFunction$2(left, right) { return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$2(right) ? FromObjectRight(left, right) : !IsFunction$2(right) ? ExtendsResult.False : left.parameters.length > right.parameters.length ? ExtendsResult.False : !left.parameters.every((schema, index) => IntoBooleanResult(Visit(right.parameters[index], schema)) === ExtendsResult.True) ? ExtendsResult.False : IntoBooleanResult(Visit(left.returns, right.returns)); } function FromIntegerRight(left, right) { return IsLiteral$1(left) && IsNumber$1(left.const) ? ExtendsResult.True : IsNumber$2(left) || IsInteger$1(left) ? ExtendsResult.True : ExtendsResult.False; } function FromInteger(left, right) { return IsInteger$1(right) || IsNumber$2(right) ? ExtendsResult.True : IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$2(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : ExtendsResult.False; } function FromIntersectRight(left, right) { return right.allOf.every((schema) => Visit(left, schema) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False; } function FromIntersect$4(left, right) { return left.allOf.some((schema) => Visit(schema, right) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False; } function FromIterator$2(left, right) { return IsStructuralRight(right) ? StructuralRight(left, right) : !IsIterator$2(right) ? ExtendsResult.False : IntoBooleanResult(Visit(left.items, right.items)); } function FromLiteral(left, right) { return IsLiteral$1(right) && right.const === left.const ? ExtendsResult.True : IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$2(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsString$2(right) ? FromStringRight(left, right) : IsNumber$2(right) ? FromNumberRight(left, right) : IsInteger$1(right) ? FromIntegerRight(left, right) : IsBoolean$2(right) ? FromBooleanRight(left, right) : ExtendsResult.False; } function FromNeverRight(left, right) { return ExtendsResult.False; } function FromNever(left, right) { return ExtendsResult.True; } function UnwrapTNot(schema) { let [current, depth] = [schema, 0]; while (true) { if (!IsNot(current)) break; current = current.not; depth += 1; } return depth % 2 === 0 ? current : Unknown(); } function FromNot(left, right) { return IsNot(left) ? Visit(UnwrapTNot(left), right) : IsNot(right) ? Visit(left, UnwrapTNot(right)) : Throw("Invalid fallthrough for Not"); } function FromNull(left, right) { return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$2(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsNull$1(right) ? ExtendsResult.True : ExtendsResult.False; } function FromNumberRight(left, right) { return IsLiteralNumber(left) ? ExtendsResult.True : IsNumber$2(left) || IsInteger$1(left) ? ExtendsResult.True : ExtendsResult.False; } function FromNumber(left, right) { return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$2(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsInteger$1(right) || IsNumber$2(right) ? ExtendsResult.True : ExtendsResult.False; } function IsObjectPropertyCount(schema, count) { return Object.getOwnPropertyNames(schema.properties).length === count; } function IsObjectStringLike(schema) { return IsObjectArrayLike(schema); } function IsObjectSymbolLike(schema) { return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "description" in schema.properties && IsUnion$1(schema.properties.description) && schema.properties.description.anyOf.length === 2 && (IsString$2(schema.properties.description.anyOf[0]) && IsUndefined$1(schema.properties.description.anyOf[1]) || IsString$2(schema.properties.description.anyOf[1]) && IsUndefined$1(schema.properties.description.anyOf[0])); } function IsObjectNumberLike(schema) { return IsObjectPropertyCount(schema, 0); } function IsObjectBooleanLike(schema) { return IsObjectPropertyCount(schema, 0); } function IsObjectBigIntLike(schema) { return IsObjectPropertyCount(schema, 0); } function IsObjectDateLike(schema) { return IsObjectPropertyCount(schema, 0); } function IsObjectUint8ArrayLike(schema) { return IsObjectArrayLike(schema); } function IsObjectFunctionLike(schema) { const length = Number$1(); return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "length" in schema.properties && IntoBooleanResult(Visit(schema.properties["length"], length)) === ExtendsResult.True; } function IsObjectConstructorLike(schema) { return IsObjectPropertyCount(schema, 0); } function IsObjectArrayLike(schema) { const length = Number$1(); return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "length" in schema.properties && IntoBooleanResult(Visit(schema.properties["length"], length)) === ExtendsResult.True; } function IsObjectPromiseLike(schema) { const then = Function$1([Any()], Any()); return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "then" in schema.properties && IntoBooleanResult(Visit(schema.properties["then"], then)) === ExtendsResult.True; } function Property(left, right) { return Visit(left, right) === ExtendsResult.False ? ExtendsResult.False : IsOptional$1(left) && !IsOptional$1(right) ? ExtendsResult.False : ExtendsResult.True; } function FromObjectRight(left, right) { return IsUnknown(left) ? ExtendsResult.False : IsAny$1(left) ? ExtendsResult.Union : IsNever$1(left) || IsLiteralString(left) && IsObjectStringLike(right) || IsLiteralNumber(left) && IsObjectNumberLike(right) || IsLiteralBoolean(left) && IsObjectBooleanLike(right) || IsSymbol$1(left) && IsObjectSymbolLike(right) || IsBigInt$2(left) && IsObjectBigIntLike(right) || IsString$2(left) && IsObjectStringLike(right) || IsSymbol$1(left) && IsObjectSymbolLike(right) || IsNumber$2(left) && IsObjectNumberLike(right) || IsInteger$1(left) && IsObjectNumberLike(right) || IsBoolean$2(left) && IsObjectBooleanLike(right) || IsUint8Array$1(left) && IsObjectUint8ArrayLike(right) || IsDate$1(left) && IsObjectDateLike(right) || IsConstructor$1(left) && IsObjectConstructorLike(right) || IsFunction$2(left) && IsObjectFunctionLike(right) ? ExtendsResult.True : IsRecord$1(left) && IsString$2(RecordKey$1(left)) ? (() => { return right[Hint] === "Record" ? ExtendsResult.True : ExtendsResult.False; })() : IsRecord$1(left) && IsNumber$2(RecordKey$1(left)) ? (() => { return IsObjectPropertyCount(right, 0) ? ExtendsResult.True : ExtendsResult.False; })() : ExtendsResult.False; } function FromObject$6(left, right) { return IsStructuralRight(right) ? StructuralRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : !IsObject$2(right) ? ExtendsResult.False : (() => { for (const key of Object.getOwnPropertyNames(right.properties)) { if (!(key in left.properties) && !IsOptional$1(right.properties[key])) { return ExtendsResult.False; } if (IsOptional$1(right.properties[key])) { return ExtendsResult.True; } if (Property(left.properties[key], right.properties[key]) === ExtendsResult.False) { return ExtendsResult.False; } } return ExtendsResult.True; })(); } function FromPromise$1(left, right) { return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$2(right) && IsObjectPromiseLike(right) ? ExtendsResult.True : !IsPromise$1(right) ? ExtendsResult.False : IntoBooleanResult(Visit(left.item, right.item)); } function RecordKey$1(schema) { return PatternNumberExact in schema.patternProperties ? Number$1() : PatternStringExact in schema.patternProperties ? String$1() : Throw("Unknown record key pattern"); } function RecordValue$1(schema) { return PatternNumberExact in schema.patternProperties ? schema.patternProperties[PatternNumberExact] : PatternStringExact in schema.patternProperties ? schema.patternProperties[PatternStringExact] : Throw("Unable to get record value schema"); } function FromRecordRight(left, right) { const [Key$1, Value] = [RecordKey$1(right), RecordValue$1(right)]; return IsLiteralString(left) && IsNumber$2(Key$1) && IntoBooleanResult(Visit(left, Value)) === ExtendsResult.True ? ExtendsResult.True : IsUint8Array$1(left) && IsNumber$2(Key$1) ? Visit(left, Value) : IsString$2(left) && IsNumber$2(Key$1) ? Visit(left, Value) : IsArray$2(left) && IsNumber$2(Key$1) ? Visit(left, Value) : IsObject$2(left) ? (() => { for (const key of Object.getOwnPropertyNames(left.properties)) { if (Property(Value, left.properties[key]) === ExtendsResult.False) { return ExtendsResult.False; } } return ExtendsResult.True; })() : ExtendsResult.False; } function FromRecord$2(left, right) { return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$2(right) ? FromObjectRight(left, right) : !IsRecord$1(right) ? ExtendsResult.False : Visit(RecordValue$1(left), RecordValue$1(right)); } function FromRegExp(left, right) { const L$2 = IsRegExp$1(left) ? String$1() : left; const R$1 = IsRegExp$1(right) ? String$1() : right; return Visit(L$2, R$1); } function FromStringRight(left, right) { return IsLiteral$1(left) && IsString(left.const) ? ExtendsResult.True : IsString$2(left) ? ExtendsResult.True : ExtendsResult.False; } function FromString(left, right) { return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$2(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsString$2(right) ? ExtendsResult.True : ExtendsResult.False; } function FromSymbol(left, right) { return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$2(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsSymbol$1(right) ? ExtendsResult.True : ExtendsResult.False; } function FromTemplateLiteral$1(left, right) { return IsTemplateLiteral$1(left) ? Visit(TemplateLiteralToUnion(left), right) : IsTemplateLiteral$1(right) ? Visit(left, TemplateLiteralToUnion(right)) : Throw("Invalid fallthrough for TemplateLiteral"); } function IsArrayOfTuple(left, right) { return IsArray$2(right) && left.items !== undefined && left.items.every((schema) => Visit(schema, right.items) === ExtendsResult.True); } function FromTupleRight(left, right) { return IsNever$1(left) ? ExtendsResult.True : IsUnknown(left) ? ExtendsResult.False : IsAny$1(left) ? ExtendsResult.Union : ExtendsResult.False; } function FromTuple$2(left, right) { return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$2(right) && IsObjectArrayLike(right) ? ExtendsResult.True : IsArray$2(right) && IsArrayOfTuple(left, right) ? ExtendsResult.True : !IsTuple$1(right) ? ExtendsResult.False : IsUndefined(left.items) && !IsUndefined(right.items) || !IsUndefined(left.items) && IsUndefined(right.items) ? ExtendsResult.False : IsUndefined(left.items) && !IsUndefined(right.items) ? ExtendsResult.True : left.items.every((schema, index) => Visit(schema, right.items[index]) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False; } function FromUint8Array(left, right) { return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$2(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsUint8Array$1(right) ? ExtendsResult.True : ExtendsResult.False; } function FromUndefined(left, right) { return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$2(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsVoid(right) ? FromVoidRight(left, right) : IsUndefined$1(right) ? ExtendsResult.True : ExtendsResult.False; } function FromUnionRight(left, right) { return right.anyOf.some((schema) => Visit(left, schema) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False; } function FromUnion$4(left, right) { return left.anyOf.every((schema) => Visit(schema, right) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False; } function FromUnknownRight(left, right) { return ExtendsResult.True; } function FromUnknown(left, right) { return IsNever$1(right) ? FromNeverRight(left, right) : IsIntersect$1(right) ? FromIntersectRight(left, right) : IsUnion$1(right) ? FromUnionRight(left, right) : IsAny$1(right) ? FromAnyRight(left, right) : IsString$2(right) ? FromStringRight(left, right) : IsNumber$2(right) ? FromNumberRight(left, right) : IsInteger$1(right) ? FromIntegerRight(left, right) : IsBoolean$2(right) ? FromBooleanRight(left, right) : IsArray$2(right) ? FromArrayRight(left, right) : IsTuple$1(right) ? FromTupleRight(left, right) : IsObject$2(right) ? FromObjectRight(left, right) : IsUnknown(right) ? ExtendsResult.True : ExtendsResult.False; } function FromVoidRight(left, right) { return IsUndefined$1(left) ? ExtendsResult.True : IsUndefined$1(left) ? ExtendsResult.True : ExtendsResult.False; } function FromVoid(left, right) { return IsIntersect$1(right) ? FromIntersectRight(left, right) : IsUnion$1(right) ? FromUnionRight(left, right) : IsUnknown(right) ? FromUnknownRight(left, right) : IsAny$1(right) ? FromAnyRight(left, right) : IsObject$2(right) ? FromObjectRight(left, right) : IsVoid(right) ? ExtendsResult.True : ExtendsResult.False; } function Visit(left, right) { return IsTemplateLiteral$1(left) || IsTemplateLiteral$1(right) ? FromTemplateLiteral$1(left, right) : IsRegExp$1(left) || IsRegExp$1(right) ? FromRegExp(left, right) : IsNot(left) || IsNot(right) ? FromNot(left, right) : IsAny$1(left) ? FromAny(left, right) : IsArray$2(left) ? FromArray$2(left, right) : IsBigInt$2(left) ? FromBigInt(left, right) : IsBoolean$2(left) ? FromBoolean(left, right) : IsAsyncIterator$2(left) ? FromAsyncIterator$2(left, right) : IsConstructor$1(left) ? FromConstructor$2(left, right) : IsDate$1(left) ? FromDate(left, right) : IsFunction$2(left) ? FromFunction$2(left, right) : IsInteger$1(left) ? FromInteger(left, right) : IsIntersect$1(left) ? FromIntersect$4(left, right) : IsIterator$2(left) ? FromIterator$2(left, right) : IsLiteral$1(left) ? FromLiteral(left, right) : IsNever$1(left) ? FromNever(left, right) : IsNull$1(left) ? FromNull(left, right) : IsNumber$2(left) ? FromNumber(left, right) : IsObject$2(left) ? FromObject$6(left, right) : IsRecord$1(left) ? FromRecord$2(left, right) : IsString$2(left) ? FromString(left, right) : IsSymbol$1(left) ? FromSymbol(left, right) : IsTuple$1(left) ? FromTuple$2(left, right) : IsPromise$1(left) ? FromPromise$1(left, right) : IsUint8Array$1(left) ? FromUint8Array(left, right) : IsUndefined$1(left) ? FromUndefined(left, right) : IsUnion$1(left) ? FromUnion$4(left, right) : IsUnknown(left) ? FromUnknown(left, right) : IsVoid(left) ? FromVoid(left, right) : Throw(`Unknown left type operand '${left[Kind]}'`); } function ExtendsCheck(left, right) { return Visit(left, right); } var ExtendsResolverError, ExtendsResult; var init_extends_check = __esmMin((() => { init_any(); init_function(); init_number(); init_string$1(); init_unknown(); init_template_literal(); init_patterns(); init_symbols(); init_error(); init_guard(); ExtendsResolverError = class extends TypeBoxError {}; ; (function(ExtendsResult$1) { ExtendsResult$1[ExtendsResult$1["Union"] = 0] = "Union"; ExtendsResult$1[ExtendsResult$1["True"] = 1] = "True"; ExtendsResult$1[ExtendsResult$1["False"] = 2] = "False"; })(ExtendsResult || (ExtendsResult = {})); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-result.mjs function FromProperties$11(P$2, Right, True, False, options) { const Acc = {}; for (const K2 of globalThis.Object.getOwnPropertyNames(P$2)) Acc[K2] = Extends(P$2[K2], Right, True, False, Clone(options)); return Acc; } function FromMappedResult$6(Left, Right, True, False, options) { return FromProperties$11(Left.properties, Right, True, False, options); } function ExtendsFromMappedResult(Left, Right, True, False, options) { const P$2 = FromMappedResult$6(Left, Right, True, False, options); return MappedResult(P$2); } var init_extends_from_mapped_result = __esmMin((() => { init_mapped(); init_extends$1(); init_value(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/extends/extends.mjs function ExtendsResolve(left, right, trueType, falseType) { const R$1 = ExtendsCheck(left, right); return R$1 === ExtendsResult.Union ? Union([trueType, falseType]) : R$1 === ExtendsResult.True ? trueType : falseType; } /** `[Json]` Creates a Conditional type */ function Extends(L$2, R$1, T$3, F$1, options) { return IsMappedResult(L$2) ? ExtendsFromMappedResult(L$2, R$1, T$3, F$1, options) : IsMappedKey(L$2) ? CreateType(ExtendsFromMappedKey(L$2, R$1, T$3, F$1, options)) : CreateType(ExtendsResolve(L$2, R$1, T$3, F$1), options); } var init_extends$1 = __esmMin((() => { init_type$4(); init_union$1(); init_extends_check(); init_extends_from_mapped_key(); init_extends_from_mapped_result(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-key.mjs function FromPropertyKey$2(K$1, U$1, L$2, R$1, options) { return { [K$1]: Extends(Literal(K$1), U$1, L$2, R$1, Clone(options)) }; } function FromPropertyKeys$2(K$1, U$1, L$2, R$1, options) { return K$1.reduce((Acc, LK) => { return { ...Acc, ...FromPropertyKey$2(LK, U$1, L$2, R$1, options) }; }, {}); } function FromMappedKey$2(K$1, U$1, L$2, R$1, options) { return FromPropertyKeys$2(K$1.keys, U$1, L$2, R$1, options); } function ExtendsFromMappedKey(T$3, U$1, L$2, R$1, options) { const P$2 = FromMappedKey$2(T$3, U$1, L$2, R$1, options); return MappedResult(P$2); } var init_extends_from_mapped_key = __esmMin((() => { init_mapped(); init_literal(); init_extends$1(); init_value(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/extends/extends-undefined.mjs /** Fast undefined check used for properties of type undefined */ function Intersect$1(schema) { return schema.allOf.every((schema$1) => ExtendsUndefinedCheck(schema$1)); } function Union$1(schema) { return schema.anyOf.some((schema$1) => ExtendsUndefinedCheck(schema$1)); } function Not$1(schema) { return !ExtendsUndefinedCheck(schema.not); } /** Fast undefined check used for properties of type undefined */ function ExtendsUndefinedCheck(schema) { return schema[Kind] === "Intersect" ? Intersect$1(schema) : schema[Kind] === "Union" ? Union$1(schema) : schema[Kind] === "Not" ? Not$1(schema) : schema[Kind] === "Undefined" ? true : false; } var init_extends_undefined = __esmMin((() => { init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/extends/index.mjs var init_extends = __esmMin((() => { init_extends_check(); init_extends_from_mapped_key(); init_extends_from_mapped_result(); init_extends_undefined(); init_extends$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/exclude/exclude-from-template-literal.mjs function ExcludeFromTemplateLiteral(L$2, R$1) { return Exclude(TemplateLiteralToUnion(L$2), R$1); } var init_exclude_from_template_literal = __esmMin((() => { init_exclude$1(); init_template_literal(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/exclude/exclude.mjs function ExcludeRest(L$2, R$1) { const excluded = L$2.filter((inner$1) => ExtendsCheck(inner$1, R$1) === ExtendsResult.False); return excluded.length === 1 ? excluded[0] : Union(excluded); } /** `[Json]` Constructs a type by excluding from unionType all union members that are assignable to excludedMembers */ function Exclude(L$2, R$1, options = {}) { if (IsTemplateLiteral(L$2)) return CreateType(ExcludeFromTemplateLiteral(L$2, R$1), options); if (IsMappedResult(L$2)) return CreateType(ExcludeFromMappedResult(L$2, R$1), options); return CreateType(IsUnion(L$2) ? ExcludeRest(L$2.anyOf, R$1) : ExtendsCheck(L$2, R$1) !== ExtendsResult.False ? Never() : L$2, options); } var init_exclude$1 = __esmMin((() => { init_type$4(); init_union$1(); init_never(); init_extends(); init_exclude_from_mapped_result(); init_exclude_from_template_literal(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/exclude/exclude-from-mapped-result.mjs function FromProperties$10(P$2, U$1) { const Acc = {}; for (const K2 of globalThis.Object.getOwnPropertyNames(P$2)) Acc[K2] = Exclude(P$2[K2], U$1); return Acc; } function FromMappedResult$5(R$1, T$3) { return FromProperties$10(R$1.properties, T$3); } function ExcludeFromMappedResult(R$1, T$3) { const P$2 = FromMappedResult$5(R$1, T$3); return MappedResult(P$2); } var init_exclude_from_mapped_result = __esmMin((() => { init_mapped(); init_exclude$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/exclude/index.mjs var init_exclude = __esmMin((() => { init_exclude_from_mapped_result(); init_exclude_from_template_literal(); init_exclude$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/extract/extract-from-template-literal.mjs function ExtractFromTemplateLiteral(L$2, R$1) { return Extract(TemplateLiteralToUnion(L$2), R$1); } var init_extract_from_template_literal = __esmMin((() => { init_extract$1(); init_template_literal(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/extract/extract.mjs function ExtractRest(L$2, R$1) { const extracted = L$2.filter((inner$1) => ExtendsCheck(inner$1, R$1) !== ExtendsResult.False); return extracted.length === 1 ? extracted[0] : Union(extracted); } /** `[Json]` Constructs a type by extracting from type all union members that are assignable to union */ function Extract(L$2, R$1, options) { if (IsTemplateLiteral(L$2)) return CreateType(ExtractFromTemplateLiteral(L$2, R$1), options); if (IsMappedResult(L$2)) return CreateType(ExtractFromMappedResult(L$2, R$1), options); return CreateType(IsUnion(L$2) ? ExtractRest(L$2.anyOf, R$1) : ExtendsCheck(L$2, R$1) !== ExtendsResult.False ? L$2 : Never(), options); } var init_extract$1 = __esmMin((() => { init_type$4(); init_union$1(); init_never(); init_extends(); init_extract_from_mapped_result(); init_extract_from_template_literal(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/extract/extract-from-mapped-result.mjs function FromProperties$9(P$2, T$3) { const Acc = {}; for (const K2 of globalThis.Object.getOwnPropertyNames(P$2)) Acc[K2] = Extract(P$2[K2], T$3); return Acc; } function FromMappedResult$4(R$1, T$3) { return FromProperties$9(R$1.properties, T$3); } function ExtractFromMappedResult(R$1, T$3) { const P$2 = FromMappedResult$4(R$1, T$3); return MappedResult(P$2); } var init_extract_from_mapped_result = __esmMin((() => { init_mapped(); init_extract$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/extract/index.mjs var init_extract = __esmMin((() => { init_extract_from_mapped_result(); init_extract_from_template_literal(); init_extract$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/instance-type/instance-type.mjs /** `[JavaScript]` Extracts the InstanceType from the given Constructor type */ function InstanceType(schema, options) { return IsConstructor(schema) ? CreateType(schema.returns, options) : Never(options); } var init_instance_type$1 = __esmMin((() => { init_type$4(); init_never(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/instance-type/index.mjs var init_instance_type = __esmMin((() => { init_instance_type$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/readonly-optional/readonly-optional.mjs /** `[Json]` Creates a Readonly and Optional property */ function ReadonlyOptional(schema) { return Readonly(Optional(schema)); } var init_readonly_optional$1 = __esmMin((() => { init_readonly(); init_optional(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/readonly-optional/index.mjs var init_readonly_optional = __esmMin((() => { init_readonly_optional$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/record/record.mjs function RecordCreateFromPattern(pattern, T$3, options) { return CreateType({ [Kind]: "Record", type: "object", patternProperties: { [pattern]: T$3 } }, options); } function RecordCreateFromKeys(K$1, T$3, options) { const result = {}; for (const K2 of K$1) result[K2] = T$3; return Object$1(result, { ...options, [Hint]: "Record" }); } function FromTemplateLiteralKey(K$1, T$3, options) { return IsTemplateLiteralFinite(K$1) ? RecordCreateFromKeys(IndexPropertyKeys(K$1), T$3, options) : RecordCreateFromPattern(K$1.pattern, T$3, options); } function FromUnionKey(key, type, options) { return RecordCreateFromKeys(IndexPropertyKeys(Union(key)), type, options); } function FromLiteralKey(key, type, options) { return RecordCreateFromKeys([key.toString()], type, options); } function FromRegExpKey(key, type, options) { return RecordCreateFromPattern(key.source, type, options); } function FromStringKey(key, type, options) { const pattern = IsUndefined(key.pattern) ? PatternStringExact : key.pattern; return RecordCreateFromPattern(pattern, type, options); } function FromAnyKey(_$2, type, options) { return RecordCreateFromPattern(PatternStringExact, type, options); } function FromNeverKey(_key, type, options) { return RecordCreateFromPattern(PatternNeverExact, type, options); } function FromBooleanKey(_key, type, options) { return Object$1({ true: type, false: type }, options); } function FromIntegerKey(_key, type, options) { return RecordCreateFromPattern(PatternNumberExact, type, options); } function FromNumberKey(_$2, type, options) { return RecordCreateFromPattern(PatternNumberExact, type, options); } /** `[Json]` Creates a Record type */ function Record(key, type, options = {}) { return IsUnion(key) ? FromUnionKey(key.anyOf, type, options) : IsTemplateLiteral(key) ? FromTemplateLiteralKey(key, type, options) : IsLiteral(key) ? FromLiteralKey(key.const, type, options) : IsBoolean(key) ? FromBooleanKey(key, type, options) : IsInteger(key) ? FromIntegerKey(key, type, options) : IsNumber(key) ? FromNumberKey(key, type, options) : IsRegExp(key) ? FromRegExpKey(key, type, options) : IsString$1(key) ? FromStringKey(key, type, options) : IsAny(key) ? FromAnyKey(key, type, options) : IsNever(key) ? FromNeverKey(key, type, options) : Never(options); } /** Gets the Records Pattern */ function RecordPattern(record) { return globalThis.Object.getOwnPropertyNames(record.patternProperties)[0]; } /** Gets the Records Key Type */ function RecordKey(type) { const pattern = RecordPattern(type); return pattern === PatternStringExact ? String$1() : pattern === PatternNumberExact ? Number$1() : String$1({ pattern }); } /** Gets a Record Value Type */ function RecordValue(type) { return type.patternProperties[RecordPattern(type)]; } var init_record$1 = __esmMin((() => { init_type$4(); init_symbols(); init_never(); init_number(); init_object(); init_string$1(); init_union$1(); init_template_literal(); init_patterns(); init_indexed(); init_value$1(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/record/index.mjs var init_record = __esmMin((() => { init_record$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/instantiate/instantiate.mjs function FromConstructor$1(args, type) { type.parameters = FromTypes$1(args, type.parameters); type.returns = FromType$1(args, type.returns); return type; } function FromFunction$1(args, type) { type.parameters = FromTypes$1(args, type.parameters); type.returns = FromType$1(args, type.returns); return type; } function FromIntersect$3(args, type) { type.allOf = FromTypes$1(args, type.allOf); return type; } function FromUnion$3(args, type) { type.anyOf = FromTypes$1(args, type.anyOf); return type; } function FromTuple$1(args, type) { if (IsUndefined(type.items)) return type; type.items = FromTypes$1(args, type.items); return type; } function FromArray$1(args, type) { type.items = FromType$1(args, type.items); return type; } function FromAsyncIterator$1(args, type) { type.items = FromType$1(args, type.items); return type; } function FromIterator$1(args, type) { type.items = FromType$1(args, type.items); return type; } function FromPromise(args, type) { type.item = FromType$1(args, type.item); return type; } function FromObject$5(args, type) { const mappedProperties = FromProperties$8(args, type.properties); return { ...type, ...Object$1(mappedProperties) }; } function FromRecord$1(args, type) { const mappedKey = FromType$1(args, RecordKey(type)); const mappedValue = FromType$1(args, RecordValue(type)); const result = Record(mappedKey, mappedValue); return { ...type, ...result }; } function FromArgument(args, argument) { return argument.index in args ? args[argument.index] : Unknown(); } function FromProperty$1(args, type) { const isReadonly = IsReadonly(type); const isOptional = IsOptional(type); const mapped = FromType$1(args, type); return isReadonly && isOptional ? ReadonlyOptional(mapped) : isReadonly && !isOptional ? Readonly(mapped) : !isReadonly && isOptional ? Optional(mapped) : mapped; } function FromProperties$8(args, properties$1) { return globalThis.Object.getOwnPropertyNames(properties$1).reduce((result, key) => { return { ...result, [key]: FromProperty$1(args, properties$1[key]) }; }, {}); } function FromTypes$1(args, types) { return types.map((type) => FromType$1(args, type)); } function FromType$1(args, type) { return IsConstructor(type) ? FromConstructor$1(args, type) : IsFunction$1(type) ? FromFunction$1(args, type) : IsIntersect(type) ? FromIntersect$3(args, type) : IsUnion(type) ? FromUnion$3(args, type) : IsTuple(type) ? FromTuple$1(args, type) : IsArray$1(type) ? FromArray$1(args, type) : IsAsyncIterator$1(type) ? FromAsyncIterator$1(args, type) : IsIterator$1(type) ? FromIterator$1(args, type) : IsPromise(type) ? FromPromise(args, type) : IsObject(type) ? FromObject$5(args, type) : IsRecord(type) ? FromRecord$1(args, type) : IsArgument$1(type) ? FromArgument(args, type) : type; } /** `[JavaScript]` Instantiates a type with the given parameters */ function Instantiate(type, args) { return FromType$1(args, CloneType(type)); } var init_instantiate$1 = __esmMin((() => { init_type$5(); init_unknown(); init_readonly_optional(); init_readonly(); init_optional(); init_object(); init_record(); init_value$1(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/instantiate/index.mjs var init_instantiate = __esmMin((() => { init_instantiate$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/integer/integer.mjs /** `[Json]` Creates an Integer type */ function Integer(options) { return CreateType({ [Kind]: "Integer", type: "integer" }, options); } var init_integer$1 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/integer/index.mjs var init_integer = __esmMin((() => { init_integer$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/intrinsic/intrinsic-from-mapped-key.mjs function MappedIntrinsicPropertyKey(K$1, M$3, options) { return { [K$1]: Intrinsic(Literal(K$1), M$3, Clone(options)) }; } function MappedIntrinsicPropertyKeys(K$1, M$3, options) { const result = K$1.reduce((Acc, L$2) => { return { ...Acc, ...MappedIntrinsicPropertyKey(L$2, M$3, options) }; }, {}); return result; } function MappedIntrinsicProperties(T$3, M$3, options) { return MappedIntrinsicPropertyKeys(T$3["keys"], M$3, options); } function IntrinsicFromMappedKey(T$3, M$3, options) { const P$2 = MappedIntrinsicProperties(T$3, M$3, options); return MappedResult(P$2); } var init_intrinsic_from_mapped_key = __esmMin((() => { init_mapped(); init_intrinsic$1(); init_literal(); init_value(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/intrinsic/intrinsic.mjs function ApplyUncapitalize(value) { const [first, rest] = [value.slice(0, 1), value.slice(1)]; return [first.toLowerCase(), rest].join(""); } function ApplyCapitalize(value) { const [first, rest] = [value.slice(0, 1), value.slice(1)]; return [first.toUpperCase(), rest].join(""); } function ApplyUppercase(value) { return value.toUpperCase(); } function ApplyLowercase(value) { return value.toLowerCase(); } function FromTemplateLiteral(schema, mode, options) { const expression = TemplateLiteralParseExact(schema.pattern); const finite = IsTemplateLiteralExpressionFinite(expression); if (!finite) return { ...schema, pattern: FromLiteralValue(schema.pattern, mode) }; const strings = [...TemplateLiteralExpressionGenerate(expression)]; const literals$1 = strings.map((value) => Literal(value)); const mapped = FromRest$2(literals$1, mode); const union = Union(mapped); return TemplateLiteral([union], options); } function FromLiteralValue(value, mode) { return typeof value === "string" ? mode === "Uncapitalize" ? ApplyUncapitalize(value) : mode === "Capitalize" ? ApplyCapitalize(value) : mode === "Uppercase" ? ApplyUppercase(value) : mode === "Lowercase" ? ApplyLowercase(value) : value : value.toString(); } function FromRest$2(T$3, M$3) { return T$3.map((L$2) => Intrinsic(L$2, M$3)); } /** Applies an intrinsic string manipulation to the given type. */ function Intrinsic(schema, mode, options = {}) { return IsMappedKey(schema) ? IntrinsicFromMappedKey(schema, mode, options) : IsTemplateLiteral(schema) ? FromTemplateLiteral(schema, mode, options) : IsUnion(schema) ? Union(FromRest$2(schema.anyOf, mode), options) : IsLiteral(schema) ? Literal(FromLiteralValue(schema.const, mode), options) : CreateType(schema, options); } var init_intrinsic$1 = __esmMin((() => { init_type$4(); init_template_literal(); init_intrinsic_from_mapped_key(); init_literal(); init_union$1(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/intrinsic/capitalize.mjs /** `[Json]` Intrinsic function to Capitalize LiteralString types */ function Capitalize(T$3, options = {}) { return Intrinsic(T$3, "Capitalize", options); } var init_capitalize = __esmMin((() => { init_intrinsic$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/intrinsic/lowercase.mjs /** `[Json]` Intrinsic function to Lowercase LiteralString types */ function Lowercase(T$3, options = {}) { return Intrinsic(T$3, "Lowercase", options); } var init_lowercase = __esmMin((() => { init_intrinsic$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/intrinsic/uncapitalize.mjs /** `[Json]` Intrinsic function to Uncapitalize LiteralString types */ function Uncapitalize(T$3, options = {}) { return Intrinsic(T$3, "Uncapitalize", options); } var init_uncapitalize = __esmMin((() => { init_intrinsic$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/intrinsic/uppercase.mjs /** `[Json]` Intrinsic function to Uppercase LiteralString types */ function Uppercase(T$3, options = {}) { return Intrinsic(T$3, "Uppercase", options); } var init_uppercase = __esmMin((() => { init_intrinsic$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/intrinsic/index.mjs var init_intrinsic = __esmMin((() => { init_capitalize(); init_intrinsic_from_mapped_key(); init_intrinsic$1(); init_lowercase(); init_uncapitalize(); init_uppercase(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-result.mjs function FromProperties$7(properties$1, propertyKeys, options) { const result = {}; for (const K2 of globalThis.Object.getOwnPropertyNames(properties$1)) result[K2] = Omit(properties$1[K2], propertyKeys, Clone(options)); return result; } function FromMappedResult$3(mappedResult, propertyKeys, options) { return FromProperties$7(mappedResult.properties, propertyKeys, options); } function OmitFromMappedResult(mappedResult, propertyKeys, options) { const properties$1 = FromMappedResult$3(mappedResult, propertyKeys, options); return MappedResult(properties$1); } var init_omit_from_mapped_result = __esmMin((() => { init_mapped(); init_omit$1(); init_value(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/omit/omit.mjs function FromIntersect$2(types, propertyKeys) { return types.map((type) => OmitResolve(type, propertyKeys)); } function FromUnion$2(types, propertyKeys) { return types.map((type) => OmitResolve(type, propertyKeys)); } function FromProperty(properties$1, key) { const { [key]: _$2, ...R$1 } = properties$1; return R$1; } function FromProperties$6(properties$1, propertyKeys) { return propertyKeys.reduce((T$3, K2) => FromProperty(T$3, K2), properties$1); } function FromObject$4(properties$1, propertyKeys) { const options = Discard(properties$1, [ TransformKind, "$id", "required", "properties" ]); const omittedProperties = FromProperties$6(properties$1["properties"], propertyKeys); return Object$1(omittedProperties, options); } function UnionFromPropertyKeys$1(propertyKeys) { const result = propertyKeys.reduce((result$1, key) => IsLiteralValue(key) ? [...result$1, Literal(key)] : result$1, []); return Union(result); } function OmitResolve(properties$1, propertyKeys) { return IsIntersect(properties$1) ? Intersect(FromIntersect$2(properties$1.allOf, propertyKeys)) : IsUnion(properties$1) ? Union(FromUnion$2(properties$1.anyOf, propertyKeys)) : IsObject(properties$1) ? FromObject$4(properties$1, propertyKeys) : Object$1({}); } /** `[Json]` Constructs a type whose keys are picked from the given type */ function Omit(type, key, options) { const typeKey = IsArray(key) ? UnionFromPropertyKeys$1(key) : key; const propertyKeys = IsSchema(key) ? IndexPropertyKeys(key) : key; const isTypeRef = IsRef(type); const isKeyRef = IsRef(key); return IsMappedResult(type) ? OmitFromMappedResult(type, propertyKeys, options) : IsMappedKey(key) ? OmitFromMappedKey(type, key, options) : isTypeRef && isKeyRef ? Computed("Omit", [type, typeKey], options) : !isTypeRef && isKeyRef ? Computed("Omit", [type, typeKey], options) : isTypeRef && !isKeyRef ? Computed("Omit", [type, typeKey], options) : CreateType({ ...OmitResolve(type, propertyKeys), ...options }); } var init_omit$1 = __esmMin((() => { init_type$4(); init_discard$1(); init_symbols$1(); init_computed(); init_literal(); init_indexed(); init_intersect(); init_union$1(); init_object(); init_omit_from_mapped_key(); init_omit_from_mapped_result(); init_kind(); init_value$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-key.mjs function FromPropertyKey$1(type, key, options) { return { [key]: Omit(type, [key], Clone(options)) }; } function FromPropertyKeys$1(type, propertyKeys, options) { return propertyKeys.reduce((Acc, LK) => { return { ...Acc, ...FromPropertyKey$1(type, LK, options) }; }, {}); } function FromMappedKey$1(type, mappedKey, options) { return FromPropertyKeys$1(type, mappedKey.keys, options); } function OmitFromMappedKey(type, mappedKey, options) { const properties$1 = FromMappedKey$1(type, mappedKey, options); return MappedResult(properties$1); } var init_omit_from_mapped_key = __esmMin((() => { init_mapped(); init_omit$1(); init_value(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/omit/index.mjs var init_omit = __esmMin((() => { init_omit_from_mapped_key(); init_omit_from_mapped_result(); init_omit$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-result.mjs function FromProperties$5(properties$1, propertyKeys, options) { const result = {}; for (const K2 of globalThis.Object.getOwnPropertyNames(properties$1)) result[K2] = Pick(properties$1[K2], propertyKeys, Clone(options)); return result; } function FromMappedResult$2(mappedResult, propertyKeys, options) { return FromProperties$5(mappedResult.properties, propertyKeys, options); } function PickFromMappedResult(mappedResult, propertyKeys, options) { const properties$1 = FromMappedResult$2(mappedResult, propertyKeys, options); return MappedResult(properties$1); } var init_pick_from_mapped_result = __esmMin((() => { init_mapped(); init_pick$1(); init_value(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/pick/pick.mjs function FromIntersect$1(types, propertyKeys) { return types.map((type) => PickResolve(type, propertyKeys)); } function FromUnion$1(types, propertyKeys) { return types.map((type) => PickResolve(type, propertyKeys)); } function FromProperties$4(properties$1, propertyKeys) { const result = {}; for (const K2 of propertyKeys) if (K2 in properties$1) result[K2] = properties$1[K2]; return result; } function FromObject$3(T$3, K$1) { const options = Discard(T$3, [ TransformKind, "$id", "required", "properties" ]); const properties$1 = FromProperties$4(T$3["properties"], K$1); return Object$1(properties$1, options); } function UnionFromPropertyKeys(propertyKeys) { const result = propertyKeys.reduce((result$1, key) => IsLiteralValue(key) ? [...result$1, Literal(key)] : result$1, []); return Union(result); } function PickResolve(properties$1, propertyKeys) { return IsIntersect(properties$1) ? Intersect(FromIntersect$1(properties$1.allOf, propertyKeys)) : IsUnion(properties$1) ? Union(FromUnion$1(properties$1.anyOf, propertyKeys)) : IsObject(properties$1) ? FromObject$3(properties$1, propertyKeys) : Object$1({}); } /** `[Json]` Constructs a type whose keys are picked from the given type */ function Pick(type, key, options) { const typeKey = IsArray(key) ? UnionFromPropertyKeys(key) : key; const propertyKeys = IsSchema(key) ? IndexPropertyKeys(key) : key; const isTypeRef = IsRef(type); const isKeyRef = IsRef(key); return IsMappedResult(type) ? PickFromMappedResult(type, propertyKeys, options) : IsMappedKey(key) ? PickFromMappedKey(type, key, options) : isTypeRef && isKeyRef ? Computed("Pick", [type, typeKey], options) : !isTypeRef && isKeyRef ? Computed("Pick", [type, typeKey], options) : isTypeRef && !isKeyRef ? Computed("Pick", [type, typeKey], options) : CreateType({ ...PickResolve(type, propertyKeys), ...options }); } var init_pick$1 = __esmMin((() => { init_type$4(); init_discard$1(); init_computed(); init_intersect(); init_literal(); init_object(); init_union$1(); init_indexed(); init_symbols$1(); init_kind(); init_value$1(); init_pick_from_mapped_key(); init_pick_from_mapped_result(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-key.mjs function FromPropertyKey(type, key, options) { return { [key]: Pick(type, [key], Clone(options)) }; } function FromPropertyKeys(type, propertyKeys, options) { return propertyKeys.reduce((result, leftKey) => { return { ...result, ...FromPropertyKey(type, leftKey, options) }; }, {}); } function FromMappedKey(type, mappedKey, options) { return FromPropertyKeys(type, mappedKey.keys, options); } function PickFromMappedKey(type, mappedKey, options) { const properties$1 = FromMappedKey(type, mappedKey, options); return MappedResult(properties$1); } var init_pick_from_mapped_key = __esmMin((() => { init_mapped(); init_pick$1(); init_value(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/pick/index.mjs var init_pick = __esmMin((() => { init_pick_from_mapped_key(); init_pick_from_mapped_result(); init_pick$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/partial/partial.mjs function FromComputed$2(target, parameters) { return Computed("Partial", [Computed(target, parameters)]); } function FromRef$1($ref) { return Computed("Partial", [Ref($ref)]); } function FromProperties$3(properties$1) { const partialProperties = {}; for (const K$1 of globalThis.Object.getOwnPropertyNames(properties$1)) partialProperties[K$1] = Optional(properties$1[K$1]); return partialProperties; } function FromObject$2(type) { const options = Discard(type, [ TransformKind, "$id", "required", "properties" ]); const properties$1 = FromProperties$3(type["properties"]); return Object$1(properties$1, options); } function FromRest$1(types) { return types.map((type) => PartialResolve(type)); } function PartialResolve(type) { return IsComputed(type) ? FromComputed$2(type.target, type.parameters) : IsRef(type) ? FromRef$1(type.$ref) : IsIntersect(type) ? Intersect(FromRest$1(type.allOf)) : IsUnion(type) ? Union(FromRest$1(type.anyOf)) : IsObject(type) ? FromObject$2(type) : IsBigInt$1(type) ? type : IsBoolean(type) ? type : IsInteger(type) ? type : IsLiteral(type) ? type : IsNull$2(type) ? type : IsNumber(type) ? type : IsString$1(type) ? type : IsSymbol$2(type) ? type : IsUndefined$2(type) ? type : Object$1({}); } /** `[Json]` Constructs a type where all properties are optional */ function Partial(type, options) { if (IsMappedResult(type)) { return PartialFromMappedResult(type, options); } else { return CreateType({ ...PartialResolve(type), ...options }); } } var init_partial$1 = __esmMin((() => { init_type$4(); init_computed(); init_optional(); init_object(); init_intersect(); init_union$1(); init_ref(); init_discard(); init_symbols(); init_partial_from_mapped_result(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/partial/partial-from-mapped-result.mjs function FromProperties$2(K$1, options) { const Acc = {}; for (const K2 of globalThis.Object.getOwnPropertyNames(K$1)) Acc[K2] = Partial(K$1[K2], Clone(options)); return Acc; } function FromMappedResult$1(R$1, options) { return FromProperties$2(R$1.properties, options); } function PartialFromMappedResult(R$1, options) { const P$2 = FromMappedResult$1(R$1, options); return MappedResult(P$2); } var init_partial_from_mapped_result = __esmMin((() => { init_mapped(); init_partial$1(); init_value(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/partial/index.mjs var init_partial = __esmMin((() => { init_partial_from_mapped_result(); init_partial$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/required/required.mjs function FromComputed$1(target, parameters) { return Computed("Required", [Computed(target, parameters)]); } function FromRef($ref) { return Computed("Required", [Ref($ref)]); } function FromProperties$1(properties$1) { const requiredProperties = {}; for (const K$1 of globalThis.Object.getOwnPropertyNames(properties$1)) requiredProperties[K$1] = Discard(properties$1[K$1], [OptionalKind]); return requiredProperties; } function FromObject$1(type) { const options = Discard(type, [ TransformKind, "$id", "required", "properties" ]); const properties$1 = FromProperties$1(type["properties"]); return Object$1(properties$1, options); } function FromRest(types) { return types.map((type) => RequiredResolve(type)); } function RequiredResolve(type) { return IsComputed(type) ? FromComputed$1(type.target, type.parameters) : IsRef(type) ? FromRef(type.$ref) : IsIntersect(type) ? Intersect(FromRest(type.allOf)) : IsUnion(type) ? Union(FromRest(type.anyOf)) : IsObject(type) ? FromObject$1(type) : IsBigInt$1(type) ? type : IsBoolean(type) ? type : IsInteger(type) ? type : IsLiteral(type) ? type : IsNull$2(type) ? type : IsNumber(type) ? type : IsString$1(type) ? type : IsSymbol$2(type) ? type : IsUndefined$2(type) ? type : Object$1({}); } /** `[Json]` Constructs a type where all properties are required */ function Required(type, options) { if (IsMappedResult(type)) { return RequiredFromMappedResult(type, options); } else { return CreateType({ ...RequiredResolve(type), ...options }); } } var init_required$1 = __esmMin((() => { init_type$4(); init_computed(); init_object(); init_intersect(); init_union$1(); init_ref(); init_symbols(); init_discard(); init_required_from_mapped_result(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/required/required-from-mapped-result.mjs function FromProperties(P$2, options) { const Acc = {}; for (const K2 of globalThis.Object.getOwnPropertyNames(P$2)) Acc[K2] = Required(P$2[K2], options); return Acc; } function FromMappedResult(R$1, options) { return FromProperties(R$1.properties, options); } function RequiredFromMappedResult(R$1, options) { const P$2 = FromMappedResult(R$1, options); return MappedResult(P$2); } var init_required_from_mapped_result = __esmMin((() => { init_mapped(); init_required$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/required/index.mjs var init_required = __esmMin((() => { init_required_from_mapped_result(); init_required$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/module/compute.mjs function DereferenceParameters(moduleProperties, types) { return types.map((type) => { return IsRef(type) ? Dereference(moduleProperties, type.$ref) : FromType(moduleProperties, type); }); } function Dereference(moduleProperties, ref) { return ref in moduleProperties ? IsRef(moduleProperties[ref]) ? Dereference(moduleProperties, moduleProperties[ref].$ref) : FromType(moduleProperties, moduleProperties[ref]) : Never(); } function FromAwaited(parameters) { return Awaited(parameters[0]); } function FromIndex(parameters) { return Index(parameters[0], parameters[1]); } function FromKeyOf(parameters) { return KeyOf(parameters[0]); } function FromPartial(parameters) { return Partial(parameters[0]); } function FromOmit(parameters) { return Omit(parameters[0], parameters[1]); } function FromPick(parameters) { return Pick(parameters[0], parameters[1]); } function FromRequired(parameters) { return Required(parameters[0]); } function FromComputed(moduleProperties, target, parameters) { const dereferenced = DereferenceParameters(moduleProperties, parameters); return target === "Awaited" ? FromAwaited(dereferenced) : target === "Index" ? FromIndex(dereferenced) : target === "KeyOf" ? FromKeyOf(dereferenced) : target === "Partial" ? FromPartial(dereferenced) : target === "Omit" ? FromOmit(dereferenced) : target === "Pick" ? FromPick(dereferenced) : target === "Required" ? FromRequired(dereferenced) : Never(); } function FromArray(moduleProperties, type) { return Array$1(FromType(moduleProperties, type)); } function FromAsyncIterator(moduleProperties, type) { return AsyncIterator(FromType(moduleProperties, type)); } function FromConstructor(moduleProperties, parameters, instanceType) { return Constructor(FromTypes(moduleProperties, parameters), FromType(moduleProperties, instanceType)); } function FromFunction(moduleProperties, parameters, returnType) { return Function$1(FromTypes(moduleProperties, parameters), FromType(moduleProperties, returnType)); } function FromIntersect(moduleProperties, types) { return Intersect(FromTypes(moduleProperties, types)); } function FromIterator(moduleProperties, type) { return Iterator(FromType(moduleProperties, type)); } function FromObject(moduleProperties, properties$1) { return Object$1(globalThis.Object.keys(properties$1).reduce((result, key) => { return { ...result, [key]: FromType(moduleProperties, properties$1[key]) }; }, {})); } function FromRecord(moduleProperties, type) { const [value, pattern] = [FromType(moduleProperties, RecordValue(type)), RecordPattern(type)]; const result = CloneType(type); result.patternProperties[pattern] = value; return result; } function FromTransform(moduleProperties, transform) { return IsRef(transform) ? { ...Dereference(moduleProperties, transform.$ref), [TransformKind]: transform[TransformKind] } : transform; } function FromTuple(moduleProperties, types) { return Tuple(FromTypes(moduleProperties, types)); } function FromUnion(moduleProperties, types) { return Union(FromTypes(moduleProperties, types)); } function FromTypes(moduleProperties, types) { return types.map((type) => FromType(moduleProperties, type)); } function FromType(moduleProperties, type) { return IsOptional(type) ? CreateType(FromType(moduleProperties, Discard(type, [OptionalKind])), type) : IsReadonly(type) ? CreateType(FromType(moduleProperties, Discard(type, [ReadonlyKind])), type) : IsTransform(type) ? CreateType(FromTransform(moduleProperties, type), type) : IsArray$1(type) ? CreateType(FromArray(moduleProperties, type.items), type) : IsAsyncIterator$1(type) ? CreateType(FromAsyncIterator(moduleProperties, type.items), type) : IsComputed(type) ? CreateType(FromComputed(moduleProperties, type.target, type.parameters)) : IsConstructor(type) ? CreateType(FromConstructor(moduleProperties, type.parameters, type.returns), type) : IsFunction$1(type) ? CreateType(FromFunction(moduleProperties, type.parameters, type.returns), type) : IsIntersect(type) ? CreateType(FromIntersect(moduleProperties, type.allOf), type) : IsIterator$1(type) ? CreateType(FromIterator(moduleProperties, type.items), type) : IsObject(type) ? CreateType(FromObject(moduleProperties, type.properties), type) : IsRecord(type) ? CreateType(FromRecord(moduleProperties, type)) : IsTuple(type) ? CreateType(FromTuple(moduleProperties, type.items || []), type) : IsUnion(type) ? CreateType(FromUnion(moduleProperties, type.anyOf), type) : type; } function ComputeType(moduleProperties, key) { return key in moduleProperties ? FromType(moduleProperties, moduleProperties[key]) : Never(); } function ComputeModuleProperties(moduleProperties) { return globalThis.Object.getOwnPropertyNames(moduleProperties).reduce((result, key) => { return { ...result, [key]: ComputeType(moduleProperties, key) }; }, {}); } var init_compute = __esmMin((() => { init_create$1(); init_clone(); init_discard(); init_array$1(); init_awaited(); init_async_iterator(); init_constructor(); init_indexed(); init_function(); init_intersect(); init_iterator(); init_keyof(); init_object(); init_omit(); init_pick(); init_never(); init_partial(); init_record(); init_required(); init_tuple(); init_union$1(); init_symbols(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/module/module.mjs /** `[Json]` Creates a Type Definition Module. */ function Module(properties$1) { return new TModule(properties$1); } var TModule; var init_module$1 = __esmMin((() => { init_create$1(); init_symbols(); init_compute(); TModule = class { constructor($defs) { const computed = ComputeModuleProperties($defs); const identified = this.WithIdentifiers(computed); this.$defs = identified; } /** `[Json]` Imports a Type by Key. */ Import(key, options) { const $defs = { ...this.$defs, [key]: CreateType(this.$defs[key], options) }; return CreateType({ [Kind]: "Import", $defs, $ref: key }); } WithIdentifiers($defs) { return globalThis.Object.getOwnPropertyNames($defs).reduce((result, key) => { return { ...result, [key]: { ...$defs[key], $id: key } }; }, {}); } }; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/module/index.mjs var init_module = __esmMin((() => { init_module$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/not/not.mjs /** `[Json]` Creates a Not type */ function Not(type, options) { return CreateType({ [Kind]: "Not", not: type }, options); } var init_not$1 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/not/index.mjs var init_not = __esmMin((() => { init_not$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/parameters/parameters.mjs /** `[JavaScript]` Extracts the Parameters from the given Function type */ function Parameters(schema, options) { return IsFunction$1(schema) ? Tuple(schema.parameters, options) : Never(); } var init_parameters$1 = __esmMin((() => { init_tuple(); init_never(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/parameters/index.mjs var init_parameters = __esmMin((() => { init_parameters$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/recursive/recursive.mjs /** `[Json]` Creates a Recursive type */ function Recursive(callback, options = {}) { if (IsUndefined(options.$id)) options.$id = `T${Ordinal++}`; const thisType = CloneType(callback({ [Kind]: "This", $ref: `${options.$id}` })); thisType.$id = options.$id; return CreateType({ [Hint]: "Recursive", ...thisType }, options); } var Ordinal; var init_recursive$1 = __esmMin((() => { init_type$5(); init_type$4(); init_value$1(); init_symbols(); Ordinal = 0; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/recursive/index.mjs var init_recursive = __esmMin((() => { init_recursive$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/regexp/regexp.mjs /** `[JavaScript]` Creates a RegExp type */ function RegExp$1(unresolved, options) { const expr = IsString(unresolved) ? new globalThis.RegExp(unresolved) : unresolved; return CreateType({ [Kind]: "RegExp", type: "RegExp", source: expr.source, flags: expr.flags }, options); } var init_regexp$1 = __esmMin((() => { init_type$4(); init_value$1(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/regexp/index.mjs var init_regexp = __esmMin((() => { init_regexp$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/rest/rest.mjs function RestResolve(T$3) { return IsIntersect(T$3) ? T$3.allOf : IsUnion(T$3) ? T$3.anyOf : IsTuple(T$3) ? T$3.items ?? [] : []; } /** `[Json]` Extracts interior Rest elements from Tuple, Intersect and Union types */ function Rest(T$3) { return RestResolve(T$3); } var init_rest$1 = __esmMin((() => { init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/rest/index.mjs var init_rest = __esmMin((() => { init_rest$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/return-type/return-type.mjs /** `[JavaScript]` Extracts the ReturnType from the given Function type */ function ReturnType(schema, options) { return IsFunction$1(schema) ? CreateType(schema.returns, options) : Never(options); } var init_return_type$1 = __esmMin((() => { init_type$4(); init_never(); init_kind(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/return-type/index.mjs var init_return_type = __esmMin((() => { init_return_type$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/schema/anyschema.mjs var init_anyschema = __esmMin((() => {})); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/schema/schema.mjs var init_schema$1 = __esmMin((() => { init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/schema/index.mjs var init_schema = __esmMin((() => { init_anyschema(); init_schema$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/static/static.mjs var init_static$1 = __esmMin((() => {})); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/static/index.mjs var init_static = __esmMin((() => { init_static$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/transform/transform.mjs /** `[Json]` Creates a Transform type */ function Transform(schema) { return new TransformDecodeBuilder(schema); } var TransformDecodeBuilder, TransformEncodeBuilder; var init_transform$1 = __esmMin((() => { init_symbols(); init_kind(); TransformDecodeBuilder = class { constructor(schema) { this.schema = schema; } Decode(decode) { return new TransformEncodeBuilder(this.schema, decode); } }; TransformEncodeBuilder = class { constructor(schema, decode) { this.schema = schema; this.decode = decode; } EncodeTransform(encode, schema) { const Encode = (value) => schema[TransformKind].Encode(encode(value)); const Decode = (value) => this.decode(schema[TransformKind].Decode(value)); const Codec = { Encode, Decode }; return { ...schema, [TransformKind]: Codec }; } EncodeSchema(encode, schema) { const Codec = { Decode: this.decode, Encode: encode }; return { ...schema, [TransformKind]: Codec }; } Encode(encode) { return IsTransform(this.schema) ? this.EncodeTransform(encode, this.schema) : this.EncodeSchema(encode, this.schema); } }; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/transform/index.mjs var init_transform = __esmMin((() => { init_transform$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/unsafe/unsafe.mjs /** `[Json]` Creates a Unsafe type that will infers as the generic argument T */ function Unsafe(options = {}) { return CreateType({ [Kind]: options[Kind] ?? "Unsafe" }, options); } var init_unsafe$1 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/unsafe/index.mjs var init_unsafe = __esmMin((() => { init_unsafe$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/void/void.mjs /** `[JavaScript]` Creates a Void type */ function Void(options) { return CreateType({ [Kind]: "Void", type: "void" }, options); } var init_void$1 = __esmMin((() => { init_type$4(); init_symbols(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/void/index.mjs var init_void = __esmMin((() => { init_void$1(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/type/json.mjs var JsonTypeBuilder; var init_json$2 = __esmMin((() => { init_any(); init_array$1(); init_boolean(); init_composite(); init_const(); init_enum(); init_exclude(); init_extends(); init_extract(); init_indexed(); init_integer(); init_intersect(); init_intrinsic(); init_keyof(); init_literal(); init_mapped(); init_never(); init_not(); init_null(); init_module(); init_number(); init_object(); init_omit(); init_optional(); init_partial(); init_pick(); init_readonly(); init_readonly_optional(); init_record(); init_recursive(); init_ref(); init_required(); init_rest(); init_string$1(); init_template_literal(); init_transform(); init_tuple(); init_union$1(); init_unknown(); init_unsafe(); JsonTypeBuilder = class { /** `[Json]` Creates a Readonly and Optional property */ ReadonlyOptional(type) { return ReadonlyOptional(type); } /** `[Json]` Creates a Readonly property */ Readonly(type, enable) { return Readonly(type, enable ?? true); } /** `[Json]` Creates a Optional property */ Optional(type, enable) { return Optional(type, enable ?? true); } /** `[Json]` Creates an Any type */ Any(options) { return Any(options); } /** `[Json]` Creates an Array type */ Array(items, options) { return Array$1(items, options); } /** `[Json]` Creates a Boolean type */ Boolean(options) { return Boolean$1(options); } /** `[Json]` Intrinsic function to Capitalize LiteralString types */ Capitalize(schema, options) { return Capitalize(schema, options); } /** `[Json]` Creates a Composite object type */ Composite(schemas, options) { return Composite(schemas, options); } /** `[JavaScript]` Creates a readonly const type from the given value. */ Const(value, options) { return Const(value, options); } /** `[Json]` Creates a Enum type */ Enum(item, options) { return Enum(item, options); } /** `[Json]` Constructs a type by excluding from unionType all union members that are assignable to excludedMembers */ Exclude(unionType, excludedMembers, options) { return Exclude(unionType, excludedMembers, options); } /** `[Json]` Creates a Conditional type */ Extends(L$2, R$1, T$3, F$1, options) { return Extends(L$2, R$1, T$3, F$1, options); } /** `[Json]` Constructs a type by extracting from type all union members that are assignable to union */ Extract(type, union, options) { return Extract(type, union, options); } /** `[Json]` Returns an Indexed property type for the given keys */ Index(type, key, options) { return Index(type, key, options); } /** `[Json]` Creates an Integer type */ Integer(options) { return Integer(options); } /** `[Json]` Creates an Intersect type */ Intersect(types, options) { return Intersect(types, options); } /** `[Json]` Creates a KeyOf type */ KeyOf(type, options) { return KeyOf(type, options); } /** `[Json]` Creates a Literal type */ Literal(literalValue, options) { return Literal(literalValue, options); } /** `[Json]` Intrinsic function to Lowercase LiteralString types */ Lowercase(type, options) { return Lowercase(type, options); } /** `[Json]` Creates a Mapped object type */ Mapped(key, map$2, options) { return Mapped(key, map$2, options); } /** `[Json]` Creates a Type Definition Module. */ Module(properties$1) { return Module(properties$1); } /** `[Json]` Creates a Never type */ Never(options) { return Never(options); } /** `[Json]` Creates a Not type */ Not(type, options) { return Not(type, options); } /** `[Json]` Creates a Null type */ Null(options) { return Null(options); } /** `[Json]` Creates a Number type */ Number(options) { return Number$1(options); } /** `[Json]` Creates an Object type */ Object(properties$1, options) { return Object$1(properties$1, options); } /** `[Json]` Constructs a type whose keys are omitted from the given type */ Omit(schema, selector, options) { return Omit(schema, selector, options); } /** `[Json]` Constructs a type where all properties are optional */ Partial(type, options) { return Partial(type, options); } /** `[Json]` Constructs a type whose keys are picked from the given type */ Pick(type, key, options) { return Pick(type, key, options); } /** `[Json]` Creates a Record type */ Record(key, value, options) { return Record(key, value, options); } /** `[Json]` Creates a Recursive type */ Recursive(callback, options) { return Recursive(callback, options); } /** `[Json]` Creates a Ref type. The referenced type must contain a $id */ Ref(...args) { return Ref(args[0], args[1]); } /** `[Json]` Constructs a type where all properties are required */ Required(type, options) { return Required(type, options); } /** `[Json]` Extracts interior Rest elements from Tuple, Intersect and Union types */ Rest(type) { return Rest(type); } /** `[Json]` Creates a String type */ String(options) { return String$1(options); } /** `[Json]` Creates a TemplateLiteral type */ TemplateLiteral(unresolved, options) { return TemplateLiteral(unresolved, options); } /** `[Json]` Creates a Transform type */ Transform(type) { return Transform(type); } /** `[Json]` Creates a Tuple type */ Tuple(types, options) { return Tuple(types, options); } /** `[Json]` Intrinsic function to Uncapitalize LiteralString types */ Uncapitalize(type, options) { return Uncapitalize(type, options); } /** `[Json]` Creates a Union type */ Union(types, options) { return Union(types, options); } /** `[Json]` Creates an Unknown type */ Unknown(options) { return Unknown(options); } /** `[Json]` Creates a Unsafe type that will infers as the generic argument T */ Unsafe(options) { return Unsafe(options); } /** `[Json]` Intrinsic function to Uppercase LiteralString types */ Uppercase(schema, options) { return Uppercase(schema, options); } }; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/type/type.mjs var type_exports = /* @__PURE__ */ __export({ Any: () => Any, Argument: () => Argument, Array: () => Array$1, AsyncIterator: () => AsyncIterator, Awaited: () => Awaited, BigInt: () => BigInt, Boolean: () => Boolean$1, Capitalize: () => Capitalize, Composite: () => Composite, Const: () => Const, Constructor: () => Constructor, ConstructorParameters: () => ConstructorParameters, Date: () => Date$1, Enum: () => Enum, Exclude: () => Exclude, Extends: () => Extends, Extract: () => Extract, Function: () => Function$1, Index: () => Index, InstanceType: () => InstanceType, Instantiate: () => Instantiate, Integer: () => Integer, Intersect: () => Intersect, Iterator: () => Iterator, KeyOf: () => KeyOf, Literal: () => Literal, Lowercase: () => Lowercase, Mapped: () => Mapped, Module: () => Module, Never: () => Never, Not: () => Not, Null: () => Null, Number: () => Number$1, Object: () => Object$1, Omit: () => Omit, Optional: () => Optional, Parameters: () => Parameters, Partial: () => Partial, Pick: () => Pick, Promise: () => Promise$1, Readonly: () => Readonly, ReadonlyOptional: () => ReadonlyOptional, Record: () => Record, Recursive: () => Recursive, Ref: () => Ref, RegExp: () => RegExp$1, Required: () => Required, Rest: () => Rest, ReturnType: () => ReturnType, String: () => String$1, Symbol: () => Symbol$1, TemplateLiteral: () => TemplateLiteral, Transform: () => Transform, Tuple: () => Tuple, Uint8Array: () => Uint8Array$1, Uncapitalize: () => Uncapitalize, Undefined: () => Undefined, Union: () => Union, Unknown: () => Unknown, Unsafe: () => Unsafe, Uppercase: () => Uppercase, Void: () => Void }); var init_type$1 = __esmMin((() => { init_any(); init_argument(); init_array$1(); init_async_iterator(); init_awaited(); init_bigint(); init_boolean(); init_composite(); init_const(); init_constructor(); init_constructor_parameters(); init_date(); init_enum(); init_exclude(); init_extends(); init_extract(); init_function(); init_indexed(); init_instance_type(); init_instantiate(); init_integer(); init_intersect(); init_intrinsic(); init_iterator(); init_keyof(); init_literal(); init_mapped(); init_module(); init_never(); init_not(); init_null(); init_number(); init_object(); init_omit(); init_optional(); init_parameters(); init_partial(); init_pick(); init_promise(); init_readonly(); init_readonly_optional(); init_record(); init_recursive(); init_ref(); init_regexp(); init_required(); init_rest(); init_return_type(); init_string$1(); init_symbol(); init_template_literal(); init_transform(); init_tuple(); init_uint8array(); init_undefined(); init_union$1(); init_unknown(); init_unsafe(); init_void(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/type/javascript.mjs var JavaScriptTypeBuilder; var init_javascript$1 = __esmMin((() => { init_json$2(); init_argument(); init_async_iterator(); init_awaited(); init_bigint(); init_constructor(); init_constructor_parameters(); init_date(); init_function(); init_instance_type(); init_instantiate(); init_iterator(); init_parameters(); init_promise(); init_regexp(); init_return_type(); init_symbol(); init_uint8array(); init_undefined(); init_void(); JavaScriptTypeBuilder = class extends JsonTypeBuilder { /** `[JavaScript]` Creates a Generic Argument Type */ Argument(index) { return Argument(index); } /** `[JavaScript]` Creates a AsyncIterator type */ AsyncIterator(items, options) { return AsyncIterator(items, options); } /** `[JavaScript]` Constructs a type by recursively unwrapping Promise types */ Awaited(schema, options) { return Awaited(schema, options); } /** `[JavaScript]` Creates a BigInt type */ BigInt(options) { return BigInt(options); } /** `[JavaScript]` Extracts the ConstructorParameters from the given Constructor type */ ConstructorParameters(schema, options) { return ConstructorParameters(schema, options); } /** `[JavaScript]` Creates a Constructor type */ Constructor(parameters, instanceType, options) { return Constructor(parameters, instanceType, options); } /** `[JavaScript]` Creates a Date type */ Date(options = {}) { return Date$1(options); } /** `[JavaScript]` Creates a Function type */ Function(parameters, returnType, options) { return Function$1(parameters, returnType, options); } /** `[JavaScript]` Extracts the InstanceType from the given Constructor type */ InstanceType(schema, options) { return InstanceType(schema, options); } /** `[JavaScript]` Instantiates a type with the given parameters */ Instantiate(schema, parameters) { return Instantiate(schema, parameters); } /** `[JavaScript]` Creates an Iterator type */ Iterator(items, options) { return Iterator(items, options); } /** `[JavaScript]` Extracts the Parameters from the given Function type */ Parameters(schema, options) { return Parameters(schema, options); } /** `[JavaScript]` Creates a Promise type */ Promise(item, options) { return Promise$1(item, options); } /** `[JavaScript]` Creates a RegExp type */ RegExp(unresolved, options) { return RegExp$1(unresolved, options); } /** `[JavaScript]` Extracts the ReturnType from the given Function type */ ReturnType(type, options) { return ReturnType(type, options); } /** `[JavaScript]` Creates a Symbol type */ Symbol(options) { return Symbol$1(options); } /** `[JavaScript]` Creates a Undefined type */ Undefined(options) { return Undefined(options); } /** `[JavaScript]` Creates a Uint8Array type */ Uint8Array(options) { return Uint8Array$1(options); } /** `[JavaScript]` Creates a Void type */ Void(options) { return Void(options); } }; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/type/type/index.mjs var Type; var init_type = __esmMin((() => { init_json$2(); init_type$1(); init_javascript$1(); Type = type_exports; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/vendor/@sinclair/typebox/build/esm/index.mjs var init_esm = __esmMin((() => { init_clone(); init_create$1(); init_error(); init_guard(); init_helpers(); init_patterns(); init_registry(); init_sets(); init_symbols(); init_any(); init_array$1(); init_argument(); init_async_iterator(); init_awaited(); init_bigint(); init_boolean(); init_composite(); init_const(); init_constructor(); init_constructor_parameters(); init_date(); init_enum(); init_exclude(); init_extends(); init_extract(); init_function(); init_indexed(); init_instance_type(); init_instantiate(); init_integer(); init_intersect(); init_iterator(); init_intrinsic(); init_keyof(); init_literal(); init_module(); init_mapped(); init_never(); init_not(); init_null(); init_number(); init_object(); init_omit(); init_optional(); init_parameters(); init_partial(); init_pick(); init_promise(); init_readonly(); init_readonly_optional(); init_record(); init_recursive(); init_ref(); init_regexp(); init_required(); init_rest(); init_return_type(); init_schema(); init_static(); init_string$1(); init_symbol(); init_template_literal(); init_transform(); init_tuple(); init_uint8array(); init_undefined(); init_union$1(); init_unknown(); init_unsafe(); init_void(); init_type(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/components/sandbox/ConsoleRuntimeProvider.js var ConsoleRuntimeProvider; var init_ConsoleRuntimeProvider = __esmMin((() => { ConsoleRuntimeProvider = class { constructor() { this.logs = []; this.completionError = null; this.completed = false; } getData() { return {}; } getDescription() { return ""; } getRuntime() { return (_sandboxId) => { if (!window.__originalConsole) { window.__originalConsole = { log: console.log.bind(console), error: console.error.bind(console), warn: console.warn.bind(console), info: console.info.bind(console) }; } const originalConsole = window.__originalConsole; const pendingSends = []; [ "log", "error", "warn", "info" ].forEach((method) => { console[method] = (...args) => { const text$2 = args.map((arg) => { try { return typeof arg === "object" ? JSON.stringify(arg) : String(arg); } catch { return String(arg); } }).join(" "); originalConsole[method].apply(console, args); if (window.sendRuntimeMessage) { const sendPromise = window.sendRuntimeMessage({ type: "console", method, text: text$2, args }).catch(() => {}); pendingSends.push(sendPromise); } }; }); if (window.onCompleted) { window.onCompleted(async (_success) => { if (pendingSends.length > 0) { await Promise.all(pendingSends); } }); } let lastError = null; window.addEventListener("error", (e$10) => { const text$2 = (e$10.error?.stack || e$10.message || String(e$10)) + " at line " + (e$10.lineno || "?") + ":" + (e$10.colno || "?"); lastError = { message: e$10.error?.message || e$10.message || String(e$10), stack: e$10.error?.stack || text$2 }; }); window.addEventListener("unhandledrejection", (e$10) => { const text$2 = "Unhandled promise rejection: " + (e$10.reason?.message || e$10.reason || "Unknown error"); lastError = { message: e$10.reason?.message || String(e$10.reason) || "Unhandled promise rejection", stack: e$10.reason?.stack || text$2 }; }); let completionSent = false; window.complete = async (error$2, returnValue) => { if (completionSent) return; completionSent = true; const finalError = error$2 || lastError; if (window.sendRuntimeMessage) { if (finalError) { await window.sendRuntimeMessage({ type: "execution-error", error: finalError }); } else { await window.sendRuntimeMessage({ type: "execution-complete", returnValue }); } } }; }; } async handleMessage(message, respond) { if (message.type === "console") { this.logs.push({ type: message.method === "error" ? "error" : message.method === "warn" ? "warn" : message.method === "info" ? "info" : "log", text: message.text, args: message.args }); respond({ success: true }); } } /** * Get collected console logs */ getLogs() { return this.logs; } /** * Get completion status */ isCompleted() { return this.completed; } /** * Get completion error if any */ getCompletionError() { return this.completionError; } /** * Reset state for reuse */ reset() { this.logs = []; this.completionError = null; this.completed = false; } }; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/components/sandbox/RuntimeMessageBridge.js var RuntimeMessageBridge; var init_RuntimeMessageBridge = __esmMin((() => { RuntimeMessageBridge = class RuntimeMessageBridge { /** * Generate sendRuntimeMessage() function as injectable string. * Returns the function source code to be injected into target context. */ static generateBridgeCode(options) { if (options.context === "sandbox-iframe") { return RuntimeMessageBridge.generateSandboxBridge(options.sandboxId); } else { return RuntimeMessageBridge.generateUserScriptBridge(options.sandboxId); } } static generateSandboxBridge(sandboxId) { return ` window.__completionCallbacks = []; window.sendRuntimeMessage = async (message) => { const messageId = 'msg_' + Date.now() + '_' + Math.random().toString(36).substring(2, 9); return new Promise((resolve, reject) => { const handler = (e) => { if (e.data.type === 'runtime-response' && e.data.messageId === messageId) { window.removeEventListener('message', handler); if (e.data.success) { resolve(e.data); } else { reject(new Error(e.data.error || 'Operation failed')); } } }; window.addEventListener('message', handler); window.parent.postMessage({ ...message, sandboxId: ${JSON.stringify(sandboxId)}, messageId: messageId }, '*'); // Timeout after 30s setTimeout(() => { window.removeEventListener('message', handler); reject(new Error('Runtime message timeout')); }, 30000); }); }; window.onCompleted = (callback) => { window.__completionCallbacks.push(callback); }; `.trim(); } static generateUserScriptBridge(sandboxId) { return ` window.__completionCallbacks = []; window.sendRuntimeMessage = async (message) => { return await chrome.runtime.sendMessage({ ...message, sandboxId: ${JSON.stringify(sandboxId)} }); }; window.onCompleted = (callback) => { window.__completionCallbacks.push(callback); }; `.trim(); } }; })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/components/sandbox/RuntimeMessageRouter.js var RuntimeMessageRouter, RUNTIME_MESSAGE_ROUTER; var init_RuntimeMessageRouter = __esmMin((() => { RuntimeMessageRouter = class { constructor() { this.sandboxes = new Map(); this.messageListener = null; this.userScriptMessageListener = null; } /** * Register a new sandbox with its runtime providers. * Call this BEFORE creating the iframe (for sandbox contexts) or executing user script. */ registerSandbox(sandboxId, providers, consumers) { this.sandboxes.set(sandboxId, { sandboxId, iframe: null, providers, consumers: new Set(consumers) }); this.setupListener(); } /** * Update the iframe reference for a sandbox. * Call this AFTER creating the iframe. * This is needed so providers can send responses back to the sandbox. */ setSandboxIframe(sandboxId, iframe) { const context = this.sandboxes.get(sandboxId); if (context) { context.iframe = iframe; } } /** * Unregister a sandbox and remove all its consumers. * Call this when the sandbox is destroyed. */ unregisterSandbox(sandboxId) { this.sandboxes.delete(sandboxId); if (this.sandboxes.size === 0) { if (this.messageListener) { window.removeEventListener("message", this.messageListener); this.messageListener = null; } if (this.userScriptMessageListener && typeof chrome !== "undefined" && chrome.runtime?.onUserScriptMessage) { chrome.runtime.onUserScriptMessage.removeListener(this.userScriptMessageListener); this.userScriptMessageListener = null; } } } /** * Add a message consumer for a sandbox. * Consumers receive broadcast messages (console, execution-complete, etc.) */ addConsumer(sandboxId, consumer) { const context = this.sandboxes.get(sandboxId); if (context) { context.consumers.add(consumer); } } /** * Remove a message consumer from a sandbox. */ removeConsumer(sandboxId, consumer) { const context = this.sandboxes.get(sandboxId); if (context) { context.consumers.delete(consumer); } } /** * Setup the global message listeners (called automatically) */ setupListener() { if (!this.messageListener) { this.messageListener = async (e$10) => { const { sandboxId, messageId } = e$10.data; if (!sandboxId) return; const context = this.sandboxes.get(sandboxId); if (!context) { return; } const respond = (response) => { context.iframe?.contentWindow?.postMessage({ type: "runtime-response", messageId, sandboxId, ...response }, "*"); }; for (const provider of context.providers) { if (provider.handleMessage) { await provider.handleMessage(e$10.data, respond); } } for (const consumer of context.consumers) { await consumer.handleMessage(e$10.data); } }; window.addEventListener("message", this.messageListener); } if (!this.userScriptMessageListener) { if (typeof chrome === "undefined" || !chrome.runtime?.onUserScriptMessage) { return; } this.userScriptMessageListener = (message, _sender, sendResponse) => { const { sandboxId } = message; if (!sandboxId) return false; const context = this.sandboxes.get(sandboxId); if (!context) return false; const respond = (response) => { sendResponse({ ...response, sandboxId }); }; (async () => { for (const provider of context.providers) { if (provider.handleMessage) { await provider.handleMessage(message, respond); } } for (const consumer of context.consumers) { await consumer.handleMessage(message); } })(); return true; }; chrome.runtime.onUserScriptMessage.addListener(this.userScriptMessageListener); } } }; RUNTIME_MESSAGE_ROUTER = new RuntimeMessageRouter(); })); //#endregion //#region apps/macos/Sources/Clawdis/Resources/WebChat/components/SandboxedIframe.js /** * Escape HTML special sequences in code to prevent premature tag closure * @param code Code that will be injected into